tars-cli 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tars_cli-1.0.1 → tars_cli-1.0.2}/PKG-INFO +2 -2
- {tars_cli-1.0.1 → tars_cli-1.0.2}/README.md +1 -1
- {tars_cli-1.0.1 → tars_cli-1.0.2}/pyproject.toml +1 -1
- tars_cli-1.0.2/tars_cli/__init__.py +1 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/dataset_cmd.py +1 -1
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/eval_cmd.py +13 -6
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/hints.py +1 -1
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/output.py +4 -3
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/PKG-INFO +2 -2
- tars_cli-1.0.1/tars_cli/__init__.py +0 -1
- {tars_cli-1.0.1 → tars_cli-1.0.2}/setup.cfg +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/__main__.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/app.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/auth.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/client.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/__init__.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/auth_cmd.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/plugin_cmd.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/template_cmd.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/config.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/utils/__init__.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/utils/polling.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/utils/progress.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/SOURCES.txt +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/dependency_links.txt +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/entry_points.txt +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/requires.txt +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/top_level.txt +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_auth.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_client.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_config.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_hints.py +0 -0
- {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_output.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tars-cli
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: tars 平台命令行工具
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -32,7 +32,7 @@ pip install tars-cli
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
$ tars --version
|
|
35
|
-
tars-cli 1.0.
|
|
35
|
+
tars-cli 1.0.2
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### 升级
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.2"
|
|
@@ -251,7 +251,7 @@ def list_versions(
|
|
|
251
251
|
[str(item.get("id", "")), item.get("status", ""), str(item.get("test_case_count", "")), str(item.get("created_at", ""))]
|
|
252
252
|
for item in items
|
|
253
253
|
]
|
|
254
|
-
render_table("数据集版本列表", columns, rows)
|
|
254
|
+
render_table("数据集版本列表", columns, rows, no_wrap_cols=[0])
|
|
255
255
|
else:
|
|
256
256
|
render({"items": items, "total": len(items)}, output_format=output_fmt, quiet=quiet)
|
|
257
257
|
finally:
|
|
@@ -98,13 +98,20 @@ def run(
|
|
|
98
98
|
typer.echo(f"\n轮询超时,任务仍在后台运行。可用以下命令查看结果:\n tars eval status {task_id}", err=True)
|
|
99
99
|
raise
|
|
100
100
|
|
|
101
|
-
detail_resp = client.get(f"/
|
|
101
|
+
detail_resp = client.get(f"/evaluation-report/{task_id}")
|
|
102
102
|
if detail_resp.status_code == 200:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
report_data = detail_resp.json()
|
|
104
|
+
score = report_data.get("overall_score") or 0
|
|
105
|
+
stats = report_data.get("test_case_stats", {})
|
|
106
|
+
total = stats.get("total_cases", 0)
|
|
107
|
+
passed = stats.get("passed_cases", 0)
|
|
108
|
+
failed = stats.get("failed_cases", 0)
|
|
109
|
+
pass_rate = passed / total if total > 0 else 0
|
|
110
|
+
status = report_data.get("status", "")
|
|
111
|
+
else:
|
|
112
|
+
score = final_data.get("score", 0)
|
|
113
|
+
pass_rate = final_data.get("pass_rate", 0)
|
|
114
|
+
status = final_data.get("status", "")
|
|
108
115
|
|
|
109
116
|
# 获取诊断分析结论
|
|
110
117
|
conclusion = _fetch_diagnosis_conclusion(client, task_id)
|
|
@@ -32,7 +32,7 @@ def build_web_url(server_url: str, command: str, **kwargs: str) -> str:
|
|
|
32
32
|
path = route.format(**kwargs)
|
|
33
33
|
except KeyError:
|
|
34
34
|
return ""
|
|
35
|
-
web_base = server_url.rstrip("/")
|
|
35
|
+
web_base = server_url.rstrip("/")
|
|
36
36
|
return f"{web_base}{path}"
|
|
37
37
|
|
|
38
38
|
|
|
@@ -13,10 +13,11 @@ console = Console()
|
|
|
13
13
|
OutputFormat = str # "table" | "json" | "yaml"
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
def render_table(title: str, columns: list[str], rows: list[list[str]]) -> None:
|
|
16
|
+
def render_table(title: str, columns: list[str], rows: list[list[str]], no_wrap_cols: list[int] | None = None) -> None:
|
|
17
17
|
table = Table(title=title, show_lines=True)
|
|
18
|
-
for col in columns:
|
|
19
|
-
|
|
18
|
+
for i, col in enumerate(columns):
|
|
19
|
+
no_wrap = no_wrap_cols is not None and i in no_wrap_cols
|
|
20
|
+
table.add_column(col, no_wrap=no_wrap, overflow="ellipsis")
|
|
20
21
|
for row in rows:
|
|
21
22
|
table.add_row(*row)
|
|
22
23
|
console.print(table)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tars-cli
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: tars 平台命令行工具
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -32,7 +32,7 @@ pip install tars-cli
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
$ tars --version
|
|
35
|
-
tars-cli 1.0.
|
|
35
|
+
tars-cli 1.0.2
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### 升级
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|