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

cvat-sdk: make sure to redraw the progress bar after use #5235

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Nov 4, 2022

tqdm does not necessarily redraw the progress bar after every update, and without the call to close it might not update it to the final state.

Motivation and context

I discovered this while writing a test in which the progress bar is updated in chunks, and the last chunk is smaller than the previous ones.

How has this been tested?

Indirectly through the test I'm about to add to #5204.

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@SpecLad SpecLad requested a review from zhiltsov-max November 4, 2022 13:11
@SpecLad SpecLad requested a review from nmanovic as a code owner November 4, 2022 13:11
@SpecLad SpecLad marked this pull request as draft November 4, 2022 13:16
tqdm does not necessarily redraw the progress bar after every update,
and without the call to `refresh` it might not update it to the final state.

I discovered this while writing a test in which the progress bar is updated
in chunks, and the last chunk is smaller than the previous ones.
@SpecLad SpecLad marked this pull request as ready for review November 4, 2022 13:32
@SpecLad
Copy link
Contributor Author

SpecLad commented Nov 4, 2022

I changed it to .refresh() instead of .close(), because I saw that the same tqdm object can be reused for multiple uploaded files.

@SpecLad SpecLad changed the title cvat-sdk: make sure to close the tqdm object after use cvat-sdk: make sure to redraw the progress bar after use Nov 4, 2022
@nmanovic nmanovic merged commit 12961b3 into cvat-ai:develop Nov 7, 2022
@SpecLad SpecLad deleted the close-tqdm branch March 16, 2023 18:01
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