-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add stepsize + autodetection of initial, total and stepsize in trange() #273
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
Conversation
Signed-off-by: Stephen L. <lrq3000@gmail.com>
Signed-off-by: Stephen L. <lrq3000@gmail.com>
2d8e028
to
f9ca871
Compare
8cade97
to
a65e347
Compare
hmm, is this essentially a scale factor? eg instead of displaying 123/1000, show 234/2000? |
For stepsize yes, this is essentially a scale factor as far as i can see.
|
In that case I'd rather have this implemented as a |
Yes and they should multply at printing, like the other PR proposed. Indeed 2016-11-13 11:56 GMT+01:00 Casper da Costa-Luis notifications@github.com:
|
closing in favour of #378 |
Implement #265 with 2 strategies: autodetection of stepsize if
len(iterable) != total
(total is explicitly specified) + autodetection intrange()
ofrange()
arguments to feedtqdm()
(using a new functiontrange_preprocess()
-- I wanted to turntrange()
into a class but then the wrapper did not work anymore, it cannot just return a wrapped range under tqdm without wrapping in trange also).TODO:
trange_preprocess()
in alltrange()
-like of submodules.examples/simple_tests.py
) -> significative difference: 15% in manual mode and 5-10% in iterable mode. All because oftqdm.stepsize
. If we removetqdm.stepsize
but keeptrange_preprocess()
, we would remove all performance impact, but iterable mode tqdm won't be able to account forrange()
's stepsize (onlyinitial
andtotal
, which is already good but not perfect). What should we do @casperdcl ?