Skip to content
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

show pipeline progress #48

Merged
merged 4 commits into from
Feb 7, 2022
Merged

show pipeline progress #48

merged 4 commits into from
Feb 7, 2022

Conversation

ArneBinder
Copy link
Owner

No description provided.

@@ -279,7 +280,7 @@ def __call__(

model_outputs: List = []
with torch.no_grad():
for batch in dataloader:
for batch in tqdm.tqdm(dataloader, total=len(dataloader), desc="inference"):
Copy link
Collaborator

@ChristophAlt ChristophAlt Jan 30, 2022

Choose a reason for hiding this comment

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

Is the total=len(dataloader) actually necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also lets make this optional. I'd suggest a show_progress_bar: bool = False as parameter. tqdm has a parameter disable which can be used as disable=not show_progress_bar.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also tqdm must be added to the dependencies.

@ArneBinder ArneBinder force-pushed the show_pipeline_progress branch from 1c8705f to 81123d0 Compare February 7, 2022 10:10
@ChristophAlt ChristophAlt merged commit a501f03 into main Feb 7, 2022
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.

2 participants