Skip to content

Commit 85392d1

Browse files
committed
fix: rebase from refactored core
1 parent aeb4461 commit 85392d1

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

swanlab/sdk/internal/core_python/api/experiment.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
from swanlab.proto.swanlab.run.v1.run_pb2 import RUN_STATE_ABORTED, RUN_STATE_CRASHED, RunState
1414
from swanlab.sdk.internal.core_python import client
1515
from swanlab.sdk.internal.pkg import helper
16-
from swanlab.sdk.typings.core_python.api.experiment import InitExperimentType
17-
from swanlab.sdk.typings.core_python.api.experiment import RunType
16+
from swanlab.sdk.typings.core_python.api.experiment import InitExperimentType, RunType
1817
from swanlab.sdk.typings.run import ResumeType, RunStateType
1918

2019
from .utils import parse_column_type, to_camel_case
@@ -86,7 +85,7 @@ def stop_experiment(username: str, project: str, cuid: str, *, state: RunState,
8685
this_state = "CRASHED"
8786
elif state == RUN_STATE_ABORTED:
8887
this_state = "ABORTED"
89-
client.put(
88+
resp = client.put(
9089
f"/project/{username}/{project}/runs/{cuid}/state",
9190
{
9291
"state": this_state,

swanlab/sdk/typings/core_python/api/experiment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
"""
77

88
from typing import Dict, List, Optional, TypedDict
9+
910
from swanlab.sdk.typings.run import RunStateType
1011

12+
1113
class InitExperimentType(TypedDict):
1214
# 实验cuid
1315
cuid: str

swanlab/sdk/typings/run/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,3 @@
5959
"""
6060
列过滤类型
6161
"""
62-

0 commit comments

Comments
 (0)