★ Enviroment sensitive progress bar
Is your feature request related to a problem? Please describe.
For now the progress bar we used is for notebook
|
from tqdm.notebook import tqdm |
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
★ Enviroment sensitive progress bar
Is your feature request related to a problem? Please describe.
For now the progress bar we used is for notebook
unpackai/unpackai/utils.py
Line 21 in 640a24f
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 jupyterThen we can import progressbar correctly
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