Skip to content

Commit

Permalink
refactor: sys-model
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKURA-CAT committed Dec 9, 2024
1 parent 0c1d1c0 commit 6cbb528
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "hatchling.build"

[project]
name = "swankit"
version = "0.1.2b2"
version = "0.1.2b3"
dynamic = ["readme", "dependencies"]
description = "Base toolkit for SwanLab"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion swankit/callback/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ def __str__(self) -> str:
pass


__all__ = ["SwanKitCallback", "models"]
__all__ = ["SwanKitCallback", "ColumnInfo", "MetricInfo", "ColumnConfig", "OperateErrorInfo", "RuntimeInfo"]
13 changes: 11 additions & 2 deletions swankit/callback/models/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,21 @@
YRange = Optional[Tuple[Optional[float], Optional[float]]]


class ColumnConfig(TypedDict):
class ColumnConfig:
"""
列信息配置
"""

y_range: YRange
def __init__(self, y_range: YRange = None, chart_name: Optional[str] = None, metric_name: Optional[str] = None):
"""
生成的列信息配置对象
:param y_range: y轴范围
:param chart_name: 图表名称
:param metric_name: 指标名称
"""
self.y_range: YRange = y_range
self.chart_name: Optional[str] = chart_name
self.metric_name: Optional[str] = metric_name


class ColumnInfo:
Expand Down

0 comments on commit 6cbb528

Please sign in to comment.