Skip to content

Commit

Permalink
update:params
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKURA-CAT committed Sep 20, 2024
1 parent e6e08f1 commit 732f4f2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
13 changes: 8 additions & 5 deletions swankit/callback/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from abc import ABC, abstractmethod
from .models import *
from swankit.core import SwanLabSharedSettings
from typing import Tuple


class SwanKitCallback(ABC):
Expand All @@ -37,18 +38,20 @@ def before_run(self, settings: SwanLabSharedSettings):
pass

def before_init_experiment(
self,
run_id: str,
exp_name: str,
description: str,
num: int
self,
run_id: str,
exp_name: str,
description: str,
num: int,
colors: Tuple[str, str],
):
"""
在初始化实验之前调用,此时SwanLabRun已经初始化完毕
:param run_id: str, SwanLabRun的运行id
:param exp_name: str, 实验名称
:param description: str, 实验描述
:param num: int, 历史实验数量
:param colors: Tuple[str, str], 实验颜色,[light, dark]
"""
pass

Expand Down
12 changes: 6 additions & 6 deletions swankit/log/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class FONT:

@staticmethod
def loading(
s: str,
func: Callable,
args: Tuple = (),
interval: float = 0.4,
prefix: str = None,
brush_length: int = 100
s: str,
func: Callable,
args: Tuple = (),
interval: float = 0.4,
prefix: str = None,
brush_length: int = 100,
):
"""
实现终端打印的加载效果,输入的字符串会在开头出现loading效果以等待传入的函数执行完毕
Expand Down

0 comments on commit 732f4f2

Please sign in to comment.