Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Data]Update Data progress bars to use row as the iteration unit #46699
[Data]Update Data progress bars to use row as the iteration unit #46699
Changes from 3 commits
4cb78b0
7161754
1f5ddac
6b5857c
1501a6c
6e5a784
d4fc58c
813b2e6
7d3e049
1c8a618
b57fea4
190e38e
bcafb6e
c8885ed
833f8da
7ffe665
e3da096
37791cb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here and elsewhere, i don't think we need the special case for handling if
self._bar_total is None
. according to tqdm docs, this is already handled by not showing the denominator (only basic stats showing numerator and rows/s):There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I update the progress bar manually, I need to make sure the number or None pass to format_num handled correctly. So I add ?? here. As when None is passed to format_num, it will raise error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we change to:
so we only apply
format_num
ifself._bar_total
is not None.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of updating the bar description itself and calling
format_num()
for the updated description, maybe we can passbar_format
parameter totqdm.tqdm()
. specifically in thisr_bar
section:something like this. then, i think we wouldn't need to manually update the entire description here and in
_get_state()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried, this is current what bar looks like
but if we use bar_format, it will lose some infomation here, so I think the simplest solution is just change the number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of duplicating
tqdm
source code logic here, could we directly usetqdm.tqdm.format_num()
in other places instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have consider this but finnally I just copy the codes from format_num. The reason I just define it here is 1. tqdm is not import in tqdm_ray currently.. and in fact we just only want to use format_num function. 2 .In addition, we self defined a class tqdm, so I just doesn't want to import tqdm here..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah got it, that makes sense. i see the
real_tqdm
import is importingtqdm.auto
, which does not haveformat_num
. let's keep the method you copied here, thanks