Merge remote-tracking branch 'origin/master' into fix/issue-83
CI / Sync project version with tag (pull_request) Has been skipped
CI / Format (ruff format) (pull_request) Successful in 1m21s
CI / Type check (ty) (pull_request) Successful in 1m21s
CI / Lint (ruff check) (pull_request) Successful in 1m26s
CI / Tests (pull_request) Successful in 2m41s
CI / Bump version, tag, and update changelog on merge to master (pull_request) Has been skipped
CI / Publish package to Gitea package registry (pull_request) Has been skipped
CI / Sync project version with tag (pull_request) Has been skipped
CI / Format (ruff format) (pull_request) Successful in 1m21s
CI / Type check (ty) (pull_request) Successful in 1m21s
CI / Lint (ruff check) (pull_request) Successful in 1m26s
CI / Tests (pull_request) Successful in 2m41s
CI / Bump version, tag, and update changelog on merge to master (pull_request) Has been skipped
CI / Publish package to Gitea package registry (pull_request) Has been skipped
# Conflicts: # .bumpversion.toml # giant/cli.py # pyproject.toml # uv.lock
This commit is contained in:
@@ -239,6 +239,22 @@ def test_compute_one_from_run_dir(tmp_path: Path):
|
||||
assert list(partial.data["r"]) == ["rollout"]
|
||||
|
||||
|
||||
def test_timing_survives_plot_meta_to_compute_one(tmp_path: Path):
|
||||
yaml_path = _write_inputs(tmp_path)
|
||||
d = yaml.safe_load(yaml_path.read_text())
|
||||
d["timing"] = {"us_per_step": 7.0, "write_us_per_step": 1.0}
|
||||
yaml_path.write_text(yaml.safe_dump(d))
|
||||
|
||||
run_dir = _prep([yaml_path])
|
||||
meta = RunMeta.load(run_dir / "run_meta.json")
|
||||
assert meta.rollouts[0]["plot_meta"]["timing"] == {"us_per_step": 7.0, "write_us_per_step": 1.0}
|
||||
|
||||
out = compute_one("eval_cost_per_step", run_dir)
|
||||
reduced = Reduced(**Partial.load(out).data["reduced"])
|
||||
assert reduced.kind == "bar"
|
||||
assert reduced.payload["series"]["rollout"] == [7.0, 1.0, 8.0]
|
||||
|
||||
|
||||
def test_compute_reduced_explicit_paths(tmp_path: Path):
|
||||
run_dir = _prep([_write_inputs(tmp_path)])
|
||||
meta = RunMeta.load(run_dir / "run_meta.json")
|
||||
|
||||
Reference in New Issue
Block a user