Skip to content

Commit

Permalink
fix: download-data progressbars should work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Dec 31, 2024
1 parent 503eb1e commit 9beae3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions freqtrade/optimize/hyperopt/hyperopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from freqtrade.constants import FTHYPT_FILEVERSION, LAST_BT_RESULT_FN, Config
from freqtrade.enums import HyperoptState
from freqtrade.exceptions import OperationalException
from freqtrade.loggers import error_console
from freqtrade.misc import file_dump_json, plural
from freqtrade.optimize.hyperopt.hyperopt_logger import logging_mp_handle, logging_mp_setup
from freqtrade.optimize.hyperopt.hyperopt_optimizer import HyperOptimizer
Expand Down Expand Up @@ -282,10 +281,7 @@ def start(self) -> None:
logger.info(f"Effective number of parallel workers used: {jobs}")

# Define progressbar
with get_progress_tracker(
console=error_console,
cust_callables=[self._hyper_out],
) as pbar:
with get_progress_tracker(cust_callables=[self._hyper_out]) as pbar:
task = pbar.add_task("Epochs", total=self.total_epochs)

start = 0
Expand Down
2 changes: 2 additions & 0 deletions freqtrade/util/progress_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
TimeRemainingColumn,
)

from freqtrade.loggers import error_console
from freqtrade.util.rich_progress import CustomProgress


Expand All @@ -30,5 +31,6 @@ def get_progress_tracker(**kwargs) -> CustomProgress:
"•",
TimeRemainingColumn(),
expand=True,
console=error_console,
**kwargs,
)

0 comments on commit 9beae3d

Please sign in to comment.