Browse Source

调整默认ProgressCallback在callback中的位置

tags/v1.0.0alpha
yh_cc 2 years ago
parent
commit
16c986af9d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      fastNLP/core/callbacks/callback_manager.py

+ 1
- 1
fastNLP/core/callbacks/callback_manager.py View File

@@ -57,7 +57,7 @@ def prepare_callbacks(callbacks, progress_bar):
if has_no_progress and progress_bar is not None:
callback = choose_progress_callback(progress_bar)
if callback is not None:
_callbacks.append(callback)
_callbacks = [callback] + _callbacks # 放在最前面,方便分割不同 epoch
has_no_progress = False
elif has_no_progress is False and progress_bar not in ('auto', None):
logger.rank_zero_warning(f"Since you have passed in ProgressCallback, progress_bar={progress_bar} will be ignored.")


Loading…
Cancel
Save