Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change:file name #708

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions swanlab/data/run/exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Dict, Optional
from swankit.env import create_time
from swankit.callback import MetricInfo, ColumnInfo
from .operator import SwanLabRunOperator
from .helper import SwanLabRunOperator
from swankit.core import SwanLabSharedSettings
import json
import math
Expand Down Expand Up @@ -178,8 +178,7 @@ def chart_created(self):

@property
def is_chart_valid(self) -> bool:
"""判断当前tag对应的自动创建图表是否成功
"""
"""判断当前tag对应的自动创建图表是否成功"""
return self.column_info.error is None

def add(self, data: DataWrapper) -> MetricInfo:
Expand Down
26 changes: 9 additions & 17 deletions swanlab/data/run/operator.py → swanlab/data/run/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
r"""
@DATE: 2024/5/12 14:20
@File: operator.py
@File: helper.py
@IDE: pycharm
@Description:
回调函数操作员,批量处理回调函数的调用
Expand Down Expand Up @@ -73,23 +73,15 @@ def before_run(self, settings: SwanLabSharedSettings):
return self.__run_all("before_run", settings)

def before_init_experiment(
self,
run_id: str,
exp_name: str,
description: str,
num: int,
suffix: str,
setter: Callable[[str, str, str, str], None]
self,
run_id: str,
exp_name: str,
description: str,
num: int,
suffix: str,
setter: Callable[[str, str, str, str], None],
):
return self.__run_all(
"before_init_experiment",
run_id,
exp_name,
description,
num,
suffix,
setter
)
return self.__run_all("before_init_experiment", run_id, exp_name, description, num, suffix, setter)

def on_run(self):
try:
Expand Down
2 changes: 1 addition & 1 deletion swanlab/data/run/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .exp import SwanLabExp
from datetime import datetime
from typing import Callable, Optional, Dict
from .operator import SwanLabRunOperator, RuntimeInfo
from .helper import SwanLabRunOperator, RuntimeInfo
from ..formater import check_key_format
from swanlab.env import get_mode, get_swanlog_dir
import random
Expand Down
2 changes: 1 addition & 1 deletion swanlab/data/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .formater import check_load_json_yaml, check_proj_name_format
from .callback_cloud import CloudRunCallback
from .callback_local import LocalRunCallback
from .run.operator import SwanLabRunOperator
from .run.helper import SwanLabRunOperator
from swanlab.log import swanlog
from swanlab.api import code_login
from swanlab.env import SwanLabEnv
Expand Down