Skip to content
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
4 changes: 2 additions & 2 deletions swanlab/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def runs_get(
def user(self) -> User:
return User(self._ctx)

@deprecated("Use `series()` method instead.")
@deprecated("`columns()` is deprecated and will be removed in v0.11, use `series()` instead.")
def columns(
self,
path: str,
Expand Down Expand Up @@ -287,7 +287,7 @@ def columns(
exp_created_at=exp.created_at_ts,
)

@deprecated("Use `series()` method instead.")
@deprecated("`column()` is deprecated and will be removed in v0.11, use `series()` instead.")
def column(
self,
path: str,
Expand Down
4 changes: 2 additions & 2 deletions swanlab/api/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def profile(self) -> ApiExperimentProfileType:
data = self._data
return cast(ApiExperimentProfileType, self._ensure_data().get("profile", {}))

@deprecated("Use `series()` method instead.")
@deprecated("`column()` is deprecated and will be removed in v0.11, use `series()` instead.")
def column(
self,
key: str,
Expand Down Expand Up @@ -452,7 +452,7 @@ def export_logs(
)
return metric.export_logs(start=start, rows=rows)

@deprecated("Use `series()` method instead.")
@deprecated("`columns()` is deprecated and will be removed in v0.11, use `series()` instead.")
def columns(
self,
page: int = 1,
Expand Down
8 changes: 6 additions & 2 deletions swanlab/deprecated/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
from swanlab.sdk.cmd.merge_callbacks import merge_callbacks


@deprecated("use `swanlab.merge_callbacks()` instead")
@deprecated(
"`swanlab.register_callbacks()` is deprecated and will be removed in v0.11, "
"use `swanlab.merge_callbacks()` instead."
)
def register_callbacks(*args, **kwargs):
warnings.warn(
"`swanlab.register_callbacks()` is deprecated, use `swanlab.merge_callbacks()` instead",
"`swanlab.register_callbacks()` is deprecated and will be removed in v0.11, "
"use `swanlab.merge_callbacks()` instead",
FutureWarning,
stacklevel=2,
)
Expand Down
24 changes: 17 additions & 7 deletions swanlab/deprecated/echarts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,39 @@
from swanlab.sdk.internal.run.transforms import echarts


@deprecated("use `swanlab.echarts.roc_curve()` instead")
@deprecated(
"`swanlab.roc_curve()` is deprecated and will be removed in v0.11, use `swanlab.echarts.roc_curve()` instead."
)
def roc_curve(*args, **kwargs):
warnings.warn(
"`swanlab.roc_curve()` is deprecated, use `swanlab.echarts.roc_curve()` instead",
"`swanlab.roc_curve()` is deprecated and will be removed in v0.11, use `swanlab.echarts.roc_curve()` instead",
FutureWarning,
stacklevel=2,
)
return echarts.roc_curve(*args, **kwargs)


@deprecated("use `swanlab.echarts.pr_curve()` instead")
@deprecated(
"`swanlab.pr_curve()` is deprecated and will be removed in v0.11, use `swanlab.echarts.pr_curve()` instead."
)
def pr_curve(*args, **kwargs):
warnings.warn(
"`swanlab.pr_curve()` is deprecated, use `swanlab.echarts.pr_curve()` instead", FutureWarning, stacklevel=2
"`swanlab.pr_curve()` is deprecated and will be removed in v0.11, use `swanlab.echarts.pr_curve()` instead",
FutureWarning,
stacklevel=2,
)
return echarts.pr_curve(*args, **kwargs)


@deprecated("use `swanlab.echarts.confusion_matrix()` instead")
@deprecated(
"`swanlab.confusion_matrix()` is deprecated and will be removed in v0.11, "
"use `swanlab.echarts.confusion_matrix()` instead."
)
def confusion_matrix(*args, **kwargs):
warnings.warn(
"`swanlab.confusion_matrix()` is deprecated, use `swanlab.echarts.confusion_matrix()` instead",
DeprecationWarning,
"`swanlab.confusion_matrix()` is deprecated and will be removed in v0.11, "
"use `swanlab.echarts.confusion_matrix()` instead",
FutureWarning,
stacklevel=2,
)
return echarts.confusion_matrix(*args, **kwargs)
4 changes: 2 additions & 2 deletions swanlab/deprecated/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from swanlab.sdk.internal.core_python import client


@deprecated("legacy projects without views will no longer be supported in v0.10.")
@deprecated("legacy projects without views will no longer be supported in v0.11.")
def get_or_create_old_project(*, data: dict):
"""
旧接口创建、获取项目信息,主要用于兼容旧版本的项目创建接口
Expand All @@ -20,7 +20,7 @@ def get_or_create_old_project(*, data: dict):
"""
warnings.warn(
"You are accessing a legacy project that does not support views. "
"Legacy projects will no longer be supported in v0.10, scheduled for release on 2026-10-01. "
"Legacy projects will no longer be supported in v0.11 and will be removed soon. "
"Please create a new project or upgrade this project in the web app.",
FutureWarning,
stacklevel=2,
Expand Down
2 changes: 1 addition & 1 deletion swanlab/deprecated/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from swanlab.sdk.typings.core_python.api.upload import DeprecatedUploadColumn, DeprecatedUploadColumns


@deprecated("legacy projects without views will no longer be supported in v0.10.")
@deprecated("legacy projects without views will no longer be supported in v0.11.")
class DeprecatedHttpRecordSender(HttpRecordSender):
"""
DeprecatedHttpRecordSender 是一个过时的类,用于适应多视图版本前的列上传逻辑
Expand Down
2 changes: 1 addition & 1 deletion swanlab/sdk/internal/core_python/transport/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ def encode_column(record: ColumnRecord) -> Optional[UploadColumn]:
"""
将列记录编码为后端所需的格式(DTO)
"""
# TODO 在 v0.10.0 版本 精简一下 column 的类型定义
# TODO 在 v0.11 版本 精简一下 column 的类型定义
column: UploadColumn = {"key": record.column_key, "type": adapter.column[record.column_type]}
if record.column_class == ColumnClass.COLUMN_CLASS_SYSTEM:
column["type"] = "SYSTEM"
Expand Down
2 changes: 1 addition & 1 deletion swanlab/sdk/internal/core_python/transport/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def start(self) -> None:
return

# 初始化sender,根据不同的项目版本选择不同的请求器,以兼容历史版本
# NOTE: 相关兼容逻辑将在v0.10.0版本后移除
# NOTE: 相关兼容逻辑将在v0.11版本后移除
sender = self._sender
if sender is None:
sender = (
Expand Down