★ Enviroment sensitive progress bar · Issue #47 · unpackAI/unpackai · GitHub
Skip to content

★ Enviroment sensitive progress bar #47

Description

@raynardj

★ Enviroment sensitive progress bar

Is your feature request related to a problem? Please describe.
For now the progress bar we used is for notebook

If we use this in non-frontend situation, this can break.

Describe the solution you'd like
create a function def is_jupyter() -> bool: to return is this environment jupyter

Then we can import progressbar correctly

if  is_jupyter():
    from tqdm.notebook import tqdm
else:
    from tqdm import tqdm

Additional context
of course, mostly, our code will run in jupyter, so this issue isn't very pressing

is_jupyter(), I've tried on other projects. This function is harder than I thought, in many cases it can return wrong value

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions