Draw curves in the terminal, and stop waiting five seconds to hear
`space` ticks runs on the serve dashboard's table and `enter` compares them: one metric in braille, five distinct hues, and the table of what actually differs under it. Both halves are routes that already existed — the browser's own comparison endpoint for the curves, the runs export for the table, whose input columns are filtered to the ones that vary. The palette is hue rather than the web's lightness ramp on purpose: five steps of one brand hue collapse to a single colour on a 16-colour tty. The screen also subscribes to the engine's event bus over the same websocket a browser uses, so a run that starts and finishes inside a tick is seen rather than only recorded. `a` lists what a run left behind and fetches it.
This commit is contained in:
@@ -390,12 +390,17 @@ class Client:
|
||||
query["name"] = name
|
||||
return self._call("GET", f"/runs/{run_id}/metrics", params=query)
|
||||
|
||||
def compare(self, ids: Iterable[str], metric: str) -> Any:
|
||||
return self._call(
|
||||
"GET",
|
||||
"/runs/series/compare",
|
||||
params={"ids": ",".join(ids), "metric": metric},
|
||||
)
|
||||
def compare(self, ids: Iterable[str], metric: str, x: str = "") -> Any:
|
||||
"""One metric across several runs, in the chart widget's series shape.
|
||||
|
||||
``x`` is what the readings are plotted against: the step they were
|
||||
recorded at, "time" for the seconds since each run's own first one, or
|
||||
another metric of the same runs.
|
||||
"""
|
||||
query = {"ids": ",".join(ids), "metric": metric}
|
||||
if x:
|
||||
query["x"] = x
|
||||
return self._call("GET", "/runs/series/compare", params=query)
|
||||
|
||||
def export_metrics(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user