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

allow choice of tqdm submodule #22

Merged
merged 2 commits into from
Jul 17, 2024
Merged

Conversation

mdmould
Copy link
Contributor

@mdmould mdmould commented Jul 16, 2024

Sometimes its convenient to choose the tqdm submodule the constructs the progress bar. For example, to manually select the 'std' backend rather than 'notebook' when working in a jupyter notebook. Before, jax-tqdm only allowed automatic selection using tqdm.auto.tqdm. Here, the user can specify the tqdm_type argument as one of 'auto', 'std', or 'notebook' (default 'auto') which uses the corresponding option, e.g., tqdm_type='std' uses getattr(tqdm, 'std').tqdm.

I only included those three options. If there's a more general way to specify any tqdm submodule that would be better.

Copy link
Collaborator

@zombie-einstein zombie-einstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, a couple very small comments

jax_tqdm/pbar.py Show resolved Hide resolved
jax_tqdm/pbar.py Show resolved Hide resolved
@zombie-einstein
Copy link
Collaborator

LGTM @jeremiecoullon any thoughts?

@jeremiecoullon
Copy link
Owner

Sounds great! : )

@zombie-einstein
Copy link
Collaborator

Bonza, will merge and setup a release later

@zombie-einstein zombie-einstein merged commit 9050d7d into jeremiecoullon:main Jul 17, 2024
3 checks passed
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.

3 participants