Skip to content

Commit 6122070

Browse files
committed
further simplify
1 parent 17c3f6f commit 6122070

3 files changed

Lines changed: 5 additions & 31 deletions

File tree

tests/e2e-local/test_cli_agent_commands.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -150,21 +150,6 @@ def test_summary(temp_dir):
150150
assert {"run", "status", "last_step", "num_logs", "config", "metric_value"} <= run_entry.keys()
151151

152152

153-
def test_list_runs_json_includes_status(temp_dir):
154-
_seed(temp_dir)
155-
r = _cli(["list", "runs", "--project", PROJECT, "--json"], temp_dir)
156-
assert r.returncode == 0
157-
data = json.loads(r.stdout)
158-
assert "runs" in data
159-
for entry in data["runs"]:
160-
assert "name" in entry
161-
assert "status" in entry
162-
statuses = {e["name"]: e["status"] for e in data["runs"]}
163-
assert statuses.get("run-lr0.01") == "finished"
164-
assert statuses.get("run-lr0.1") == "finished"
165-
assert statuses.get("run-lr1.0") == "finished"
166-
167-
168153
def test_best_error_cases(temp_dir):
169154
_seed(temp_dir)
170155
assert _cli(["best", "--project", "nope", "--metric", "loss", "--json"], temp_dir).returncode != 0

tests/e2e-local/test_run_status.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,14 @@ def test_status_failed_not_overwritten_by_finish(temp_dir):
3232
)
3333

3434

35-
def test_api_run_status(temp_dir):
36-
trackio.init(project="api_status", name="run1")
37-
trackio.log({"loss": 0.5}, step=0)
38-
trackio.finish()
39-
40-
run = trackio.Api().runs("api_status")[0]
41-
assert run.status == "finished"
42-
43-
44-
def test_api_run_final_metrics(temp_dir):
45-
trackio.init(project="final_metrics_test", name="run1")
35+
def test_api_run_access(temp_dir):
36+
trackio.init(project="api_test", name="run1")
4637
trackio.log({"loss": 1.0, "acc": 0.5}, step=0)
4738
trackio.log({"loss": 0.5, "acc": 0.8}, step=1)
4839
trackio.finish()
4940

50-
run = trackio.Api().runs("final_metrics_test")[0]
41+
run = trackio.Api().runs("api_test")[0]
42+
assert run.status == "finished"
5143
fm = run.final_metrics
5244
assert abs(fm["loss"] - 0.5) < 1e-6
5345
assert abs(fm["acc"] - 0.8) < 1e-6

tests/e2e-local/test_watchers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,12 @@ def test_max_value_with_dedup():
2424
assert len(w.check(15.0, step=4)) == 1
2525

2626

27-
def test_min_value_with_dedup():
27+
def test_min_value_triggers():
2828
w = MetricWatcher("acc", min_value=0.5)
2929
assert len(w.check(0.8, step=0)) == 0
3030
alerts = w.check(0.3, step=1)
3131
assert len(alerts) == 1
3232
assert alerts[0]["data"]["reason"] == AlertReason.MIN_EXCEEDED
33-
assert len(w.check(0.3, step=2)) == 0
34-
w.check(0.8, step=3)
35-
assert len(w.check(0.3, step=4)) == 1
3633

3734

3835
def test_spike_detection_with_dedup_and_reset():

0 commit comments

Comments
 (0)