diff --git a/swankit/callback/__init__.py b/swankit/callback/__init__.py index 83d9f04..b6f0f8a 100644 --- a/swankit/callback/__init__.py +++ b/swankit/callback/__init__.py @@ -11,6 +11,7 @@ from typing import Callable from abc import ABC, abstractmethod from .models import * +from swankit.core import SwanLabSharedSettings class SwanKitCallback(ABC): @@ -29,6 +30,13 @@ def on_init(self, proj_name: str, workspace: str, logdir: str = None, **kwargs): """ pass + def before_run(self, settings: SwanLabSharedSettings): + """ + 在运行实验之前调用 + :param settings: SwanLabSharedSettings, 运行时的共享配置 + """ + pass + def before_init_experiment( self, run_id: str,