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
Tqdm Indicator #2079
Tqdm Indicator #2079
Conversation
Alternative API.Originally I would have liked the api to be, i.e. tqdm = TQDMProgress(width=800, layout="column")
def run(*events):
for index in tqdm(range(0,10)):
time.sleep(0.2) But I ended up with. tqdm = TQDMProgress(width=800, layout="column")
def run(*events):
for index in tqdm.tqdm(range(0,10)):
time.sleep(0.2) I don't think it will make a difference. Maybe the api I ended up with makes more sense. |
This looks pretty cool! To get it to works with def __call__(self, *args, **kwargs):
return self.tqdm(*args, **kwargs) |
Thanks @hoxbro . It was actually |
Got it working @hoxbro . It was easy. Maybe I forgot I think the simplification is worth it. tqdm-progress4.mp4UPDATE: I am now in doubt whether |
Added notebook documentation. tqdm-reference.mp4 |
as a minor point,
😜 |
Ahh. Thanks @casperdcl. I will rename to Tqdm ❤️😀 |
Hi @philippjfr The PR is now at a stage where it would be helpful with a first review and some feedback on
You can see the list of outstanding things that would be nice to solve at the top. I am stuck there solving those things and would need some hints, guidance or help there. I don't plan to do more work before I get the feedback :-) Thanks. |
FYI. @philippjfr I have implemented your suggestions. Thanks. There are two minor, nice to have items (see todo at top) that I don't know how to fix. I don't think they are important. Let me know if there is more I should do. I don't plan to do more on this. I think its fine. |
Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
d331ab0
to
3a7b347
Compare
One very powerful tool for progress reporting is tqdm. It gives very nice reporting for loops and also for a lot of numpy/ Pandas operations.
I would like to have the same capabilities inside my Panel apps whether its on the server or in a notebook. But especially in combination with the new
--auto
flag that makes the panel server really suited for exploratory work also it would be really nice to display tqdm in the app.So this is a PR to contribute the Tqdm Progress Indicator
Must Do:
[x] Notebook Reference Guide
[x] Consider renaming
TQDMProgress
toTQDM
.[x] Rename to
Tqdm
.[x] Remove initial
not active
indication.[x] Move test to test file.
[x] Fix problems that ipywidgets are required but not used in notebook
Nice to Have
[] Set
value
,max
andtext
parameters to constant- When I try I get
TypeError: Constant parameter 'max' cannot be modified
even though I useparam.edit_constant
. DON'T KNOW HOW TO FIX THIS.[] Fix layout/ margin issues for "row" layout in notebook (see pictures in discussion below). DON'T KNOW HOW TO FIX THIS.
[x] Consider whether adding
__call__
is good or bad for the user.- With
call
it's easier to use but it also might confuse some users asTqdm.tqdm
now contains thepandas
method. (C.f. notebook). I WILL KEEP IT. I THINK ITS OK.[x] Consider converting to Bokeh Extension instead of
Viewer
. WONT DO.[x] Move to indicators.py file (throws errors if I try).
[x] Inherit from Indicator (throws errors if I try). WON'T DO. Tqdm is a
Viewer
and not aWidget
.[] Verify that nested tqdm works.