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.
Files changed (33) hide show
  1. {tars_cli-1.0.1 → tars_cli-1.0.2}/PKG-INFO +2 -2
  2. {tars_cli-1.0.1 → tars_cli-1.0.2}/README.md +1 -1
  3. {tars_cli-1.0.1 → tars_cli-1.0.2}/pyproject.toml +1 -1
  4. tars_cli-1.0.2/tars_cli/__init__.py +1 -0
  5. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/dataset_cmd.py +1 -1
  6. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/eval_cmd.py +13 -6
  7. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/hints.py +1 -1
  8. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/output.py +4 -3
  9. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/PKG-INFO +2 -2
  10. tars_cli-1.0.1/tars_cli/__init__.py +0 -1
  11. {tars_cli-1.0.1 → tars_cli-1.0.2}/setup.cfg +0 -0
  12. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/__main__.py +0 -0
  13. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/app.py +0 -0
  14. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/auth.py +0 -0
  15. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/client.py +0 -0
  16. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/__init__.py +0 -0
  17. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/auth_cmd.py +0 -0
  18. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/plugin_cmd.py +0 -0
  19. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/commands/template_cmd.py +0 -0
  20. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/config.py +0 -0
  21. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/utils/__init__.py +0 -0
  22. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/utils/polling.py +0 -0
  23. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli/utils/progress.py +0 -0
  24. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/SOURCES.txt +0 -0
  25. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/dependency_links.txt +0 -0
  26. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/entry_points.txt +0 -0
  27. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/requires.txt +0 -0
  28. {tars_cli-1.0.1 → tars_cli-1.0.2}/tars_cli.egg-info/top_level.txt +0 -0
  29. {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_auth.py +0 -0
  30. {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_client.py +0 -0
  31. {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_config.py +0 -0
  32. {tars_cli-1.0.1 → tars_cli-1.0.2}/tests/test_hints.py +0 -0
  33. {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.1
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.0
35
+ tars-cli 1.0.2
36
36
  ```
37
37
 
38
38
  ### 升级
@@ -12,7 +12,7 @@ pip install tars-cli
12
12
 
13
13
  ```bash
14
14
  $ tars --version
15
- tars-cli 1.0.0
15
+ tars-cli 1.0.2
16
16
  ```
17
17
 
18
18
  ### 升级
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tars-cli"
7
- version = "1.0.1"
7
+ version = "1.0.2"
8
8
  description = "tars 平台命令行工具"
9
9
  requires-python = ">=3.11"
10
10
  dependencies = [
@@ -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"/plugins/{plugin_id}/evaluations/{task_id}")
101
+ detail_resp = client.get(f"/evaluation-report/{task_id}")
102
102
  if detail_resp.status_code == 200:
103
- final_data.update(detail_resp.json())
104
-
105
- score = final_data.get("score", 0)
106
- pass_rate = final_data.get("pass_rate", 0)
107
- status = final_data.get("status", "")
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("/").rsplit(":", 1)[0] + ":8000"
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
- table.add_column(col)
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.1
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.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