API Reference / agent / user_algorithms /

research_log.py

Per-algorithm experiment history recorded from benchmark runs.

Functions

Func

record_experiment_runs

Line 83
record_experiment_runs(experiment_result: Dict[str, Any]) -> List[Dict[str, Any]]

Append matching experiment results to user algorithms' runs.jsonl files.

Scans a tuiml_benchmark result for algorithms that resolve to user algorithms on disk and logs one entry per (dataset, algorithm) pair. Never raises: logging failures are swallowed so the caller's experiment result is not affected.

Parameters

experiment_result
Dict[str, Any]
Full result dict returned by tuiml_benchmark; must have status='success' and a results mapping of dataset name to per-algorithm scores.

Returns

appended
List[Dict[str, Any]]
One dict per logged run with keys name, version, dataset, and path (the runs.jsonl file). Empty if nothing matched.
Func

research_log

Line 146
research_log(name: Optional[str]=None) -> Dict[str, Any]

Return the aggregated research view for one (or all) user algorithms.

Combines metadata.json (static: class, kind, version, source hash) with runs.jsonl (dynamic: every recorded experiment run) and computes: best primary score per version, run count per version, and the most recent timestamp. Agents use this as the equivalent of the landing-page "research log" panel.

Parameters

name
str
Restrict the view to one user algorithm. When None, all algorithms under USER_ALGS_DIR are included.

Returns

result
Dict[str, Any]
On success: keys status, count, root, and algorithms, a list of dicts with name, overall_best_version, and versions (per-version dicts: version, class_name, kind, description, source_hash, pinned_alias, run_count, best_score, best_on_dataset, best_metric, last_run, path). On failure: keys status, error_type, error.