From 845277de2c912d6788d7d2cf147b416202086cc3 Mon Sep 17 00:00:00 2001 From: yh_cc Date: Tue, 10 May 2022 21:52:43 +0800 Subject: [PATCH] add fitlogcallback to init --- fastNLP/core/__init__.py | 1 + fastNLP/core/callbacks/__init__.py | 5 ++++- fastNLP/core/callbacks/fitlog_callback.py | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fastNLP/core/__init__.py b/fastNLP/core/__init__.py index 8800e1d6..fc47b470 100644 --- a/fastNLP/core/__init__.py +++ b/fastNLP/core/__init__.py @@ -14,6 +14,7 @@ __all__ = [ "TorchGradClipCallback", "ResultsMonitor", 'HasMonitorCallback', + "FitlogCallback", # collators 'Collator', diff --git a/fastNLP/core/callbacks/__init__.py b/fastNLP/core/callbacks/__init__.py index 9ba0d227..efd9280f 100644 --- a/fastNLP/core/callbacks/__init__.py +++ b/fastNLP/core/callbacks/__init__.py @@ -17,7 +17,9 @@ __all__ = [ "TorchGradClipCallback", "ResultsMonitor", - 'HasMonitorCallback' + 'HasMonitorCallback', + + "FitlogCallback" ] @@ -32,4 +34,5 @@ from .early_stop_callback import EarlyStopCallback from .torch_callbacks import * from .more_evaluate_callback import MoreEvaluateCallback from .has_monitor_callback import ResultsMonitor, HasMonitorCallback +from .fitlog_callback import FitlogCallback diff --git a/fastNLP/core/callbacks/fitlog_callback.py b/fastNLP/core/callbacks/fitlog_callback.py index cbdccddc..39fbb684 100644 --- a/fastNLP/core/callbacks/fitlog_callback.py +++ b/fastNLP/core/callbacks/fitlog_callback.py @@ -1,3 +1,6 @@ +__all__ = [ + 'FitlogCallback' +] from fastNLP import HasMonitorCallback import fitlog