Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Hide percentage progress until process is closed #4588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bentsherman wants to merge 5 commits into master
base: master
Choose a base branch
Loading
from improve-progress-logging

Conversation

Copy link
Member

@bentsherman bentsherman commented Dec 14, 2023
edited
Loading

Spun off from #4573 (comment) and below

This PR changes the progress logging to not show the percentage until the process is "closed", i.e. all tasks have been received. This prevents Nextflow from overestimating the progress before it knows the total task count of a process. Instead a question mark is shown.

This requires a new trace event onProcessClosed() in order to know how many tasks a process will execute.

As an example, consider a process that executes 4 tasks.

Before all tasks are received (i.e. process is still "open"):

[70/0de758] process > bar (3) [ ?%] 1 of 3

Once all tasks are created:

[70/0de758] process > bar (3) [ 75%] 3 of 4

Once all tasks are completed:

[70/0de758] process > bar (3) [100%] 4 of 4 ✔

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Copy link

netlify bot commented Dec 14, 2023
edited
Loading

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit df77f24
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/681eac34dc4bc20008a7742b

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice 👏🏻

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Copy link
Member Author

Now that Phil's PR is merged, this PR is ready for review.

Copy link
Member Author

@pditommaso can you review this one

Copy link
Member

Not sure what's the difference closed vs terminated and how this information is showed

Copy link
Member Author

Closed means the process has created all of the tasks it's going to create (except possibly for retries).

At this point we know how many tasks the process must execute and so we can show a percentage. Before this point, it makes no sense to show a percentage.

Whereas terminated means all tasks completed and the process was terminated.

See my example at the top for how I show this:

  • before the process is closed, show a question mark instead of a percentage, but still show the <completed> of <total>
  • when a task fails, don't include it in the progress because a task failure doesn't get you any closer to completion, but instead show the number of failed tasks that have been retried vs ignored

bentsherman added 2 commits May 9, 2025 20:10
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman bentsherman changed the title (削除) Improve logging of task progress (削除ここまで) (追記) Hide percentage progress until process is closed (追記ここまで) May 10, 2025
@bentsherman bentsherman marked this pull request as ready for review May 10, 2025 01:38
Copy link
Member Author

Updating this PR to focus on the "process closed" concept.

I think this PR would be a nice improvement, but I don't know anymore if it's worth adding the new trace event. If this onProcessClosed event actually ends up being useful for other things, maybe then we could tack this one on. I'd like to see if it actually ends up being used for garbage collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ewels ewels ewels approved these changes

@pditommaso pditommaso Awaiting requested review from pditommaso

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /