-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix tqdm
zip bug
#5120
Fix tqdm
zip bug
#5120
Conversation
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.
Thanks for trying to fix this bug, @david1542.
However the proposed solution will not work: please note that pbar
is also used if not batched
:
datasets/src/datasets/arrow_dataset.py
Lines 2951 to 2952 in 07b7c38
if not batched: | |
for i, example in enumerate(pbar): |
- there it is expected that iterating over
pbar
returns examples, not a tuple like with your implementation.
@albertvillanova Thanks for your comment. What do you think about creating 2 |
@albertvillanova Another solution I implemented is to change |
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.
Thanks for the improvement.
I think it is a good idea to include the indices in pbar_iterable
.
You need to fix the style to pass the CI test on code quality. Please run:
make style
To be consistent, I would recommend to do the same (include the enumerate
in pbar_iterable
) for the non batched case.
The documentation is not available anymore as the PR was closed or merged. |
@albertvillanova Done :) Let me know what you think. |
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.
Hi @david1542, awesome work!
I'm just wondering if it could be possible to implement a regression test for this, but I don't see any straightforward way...
Otherwise, this PR seems good to me!
@albertvillanova Thanks :) I also don't see an easy way to test this. This was just a problem in the way |
Hi, First of all, thanks for this PR. I am running Each time I run my notebook, I do:
As I understand, the issue has been resolved and the solution merged to the released version of the code? Do I get something wrong? Thanks in advance for your help! |
@Cochonaki Hi :) The problem was fixed but there wasn't a release since then. I believe a new release should come out in the upcoming weeks. Maybe someone from the core maintainers can answer that :) cc: @albertvillanova |
Baby Haiti Coffee SE is born
NH watch
…On Sun, Oct 23, 2022 at 02:39 Dudu Lasry ***@***.***> wrote:
@Cochonaki <https://github.com/Cochonaki> Hi :) The problem was fixed but
there wasn't a release since then. I believe a new release should come out
in the upcoming weeks. Maybe someone from the core maintainers can answer
that :)
cc: @albertvillanova <https://github.com/albertvillanova>
—
Reply to this email directly, view it on GitHub
<#5120 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB4E2NCT7QO7W3PTQGDIKDWETMQ7ANCNFSM6AAAAAARGRBY2M>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi, @Cochonaki. As @david1542 pointed out, we have not made a release since this bug was fixed. We will make one in the following weeks. In the meantime, if you would like to incorporate the bug fix, you can install pip install git+https://github.com/huggingface/datasets#egg=datasets |
Thanks a lot @albertvillanova and @david1542, it works now! |
Welcome!!! 🤗 |
This PR solves #5117, by wrapping the entire
zip
clause in tqdm.For more information, please checkout this Stack Overflow thread:
https://stackoverflow.com/questions/41171191/tqdm-progressbar-and-zip-built-in-do-not-work-together