Export runs and their curves as tables an analysis reads
Docs / docs (push) Successful in 35s
Playwright Tests / test-playwright (1, 2) (push) Successful in 3m11s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m17s
pre-commit / pre-commit (push) Failing after 2m44s
Test Backend / test-backend (push) Successful in 3m0s
Compose Smoke Test / test-compose (push) Successful in 41s
Playwright Tests / merge-reports (push) Successful in 8m14s
Docs / docs (push) Successful in 35s
Playwright Tests / test-playwright (1, 2) (push) Successful in 3m11s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m17s
pre-commit / pre-commit (push) Failing after 2m44s
Test Backend / test-backend (push) Successful in 3m0s
Compose Smoke Test / test-compose (push) Successful in 41s
Playwright Tests / merge-reports (push) Successful in 8m14s
`fluksio export metrics` is the long table — a row per run, metric and step —
and `fluksio export runs` the wide one, a row per run with the inputs that
*vary* across the selection as columns beside its final numbers, status,
duration and the commit and digest of the code it ran. Both carry the run id
on every row, which is the join back to the run page and what makes an
exported file auditable. `Client.export_metrics`/`export_runs` answer the same
rows to a notebook.
The engine streams csv or jsonl from two routes declared above `/{run_id}`;
parquet is a client-side conversion behind the new `fluksio[parquet]` extra,
so nobody pays for pyarrow who does not want dtypes kept. The long export
reads each run through `_series`, so a cached node's curve comes with it, and
`--stride` thins each series rather than the concatenation of all of them.
Two things they needed on the way: `GET /runs` takes `?since=` and `?before=`,
so a long history pages by the last row's own timestamp instead of an offset
that shifts under it; and a read that reaches no engine now says so in half a
second rather than seven, because `runs`, `flavors`, `export` and an unwatched
`status` pass `retries=0`. Everything that submits keeps them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9Hdrmf2cwNABCnE5x9UJa
This commit is contained in:
@@ -312,3 +312,36 @@ def test_the_run_prompt_names_an_answer_of_the_wrong_type() -> None:
|
||||
with patch("builtins.input", side_effect=["fast"]):
|
||||
with pytest.raises(SyncError, match="lr"):
|
||||
_ask_params(definition)
|
||||
|
||||
|
||||
def test_an_export_is_parsed_with_its_selection() -> None:
|
||||
"""`export` is a group of two tables, and both take the same filters."""
|
||||
from fluksio.cli import _parser
|
||||
from fluksio.sdk.cli import cmd_export_metrics, cmd_export_runs
|
||||
|
||||
parser = _parser()
|
||||
metrics = parser.parse_args(
|
||||
[
|
||||
"export",
|
||||
"metrics",
|
||||
"--flow",
|
||||
"train",
|
||||
"--run",
|
||||
"a",
|
||||
"--run",
|
||||
"b",
|
||||
"--name",
|
||||
"loss,val",
|
||||
"--stride",
|
||||
"5",
|
||||
]
|
||||
)
|
||||
assert metrics.func is cmd_export_metrics
|
||||
assert metrics.run == ["a", "b"]
|
||||
assert metrics.stride == 5
|
||||
assert metrics.format == "csv"
|
||||
|
||||
runs = parser.parse_args(["export", "runs", "--params", "lr", "--format", "jsonl"])
|
||||
assert runs.func is cmd_export_runs
|
||||
assert runs.params == "lr"
|
||||
assert runs.format == "jsonl"
|
||||
|
||||
Reference in New Issue
Block a user