Skip to content

Conversation

@nfrasser
Copy link
Member

Update an existing log by providing a name for it. Can use the ID of a previously-logged event as a name. Named events are reset when adding a checkpoint.

For example, show a live progress bar in the job log.

for pct in range(1, 10):
    # example log: "Progress: [#####-----] 50%"
    job.log(f"Progress: [{'#' * pct}{'-' * (10 - pct)}] {pct * 10}%", name="progress")
    sleep(1)

Can use the event's ID as its name, named events reset when a checkpoint is created
@vercel
Copy link

vercel bot commented Sep 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cryosparc-tools Ready Ready Preview Comment Oct 2, 2025 9:35pm

@nfrasser nfrasser self-assigned this Sep 19, 2025
No longer use ID as name to reduce ambiguity
@nfrasser nfrasser merged commit 9a771e7 into develop Oct 2, 2025
11 checks passed
@nfrasser nfrasser deleted the nfrasser/sw-523-event-log-update branch October 2, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants