Skip to content

Commit

Permalink
add before_run (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKURA-CAT authored Jun 15, 2024
1 parent 67d5fa7 commit 38f3e06
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions swankit/callback/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from typing import Callable
from abc import ABC, abstractmethod
from .models import *
from swankit.core import SwanLabSharedSettings


class SwanKitCallback(ABC):
Expand All @@ -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,
Expand Down

0 comments on commit 38f3e06

Please sign in to comment.