fastai / fastprogress

Simple and flexible progress bar for Jupyter Notebook and console
Apache License 2.0
1.08k stars 105 forks source link

force_console_behavior does not modify behavior #103

Open codewithcheese opened 1 year ago

codewithcheese commented 1 year ago

Hi there, I am confused about the force_console_behavior function, it does not force any behavior itself, it simply returns the console master and progress bars. I can't tell if it is misnamed or this is a regression.

fastai ProgressCallback uses the master_bar imported from fastprogress, so to force console the master_bar and progress_bar variables should be updated.

The current implementation is:

#export
def force_console_behavior():
    "Return the console progress bars"
    return ConsoleMasterBar, ConsoleProgressBar

I would expect this instead:

#export
def force_console_behavior():
    master_bar = ConsoleMasterBar
    progress_bar = ConsoleProgressBar