workspace
agentic_ml.core.workspace
¶
On-disk layout of a research run.
A research directory looks like::
<research_dir>/
run.json # run configuration (for reproducibility)
leaderboard.csv # metric table, the audit of every trial
_dataset.joblib # the research dataset, saved once
session/ # Strands SnapshotSessionManager state (conversation history)
trial_1/
model.py
helpers.py # optional
description.txt # the agent's natural-language description of the trial
error.txt # only present if the trial failed
trial_2/
...
Workspace
¶
Workspace(root: str | Path)
Owns paths and file operations for a single research run.
Source code in src/agentic_ml/core/workspace.py
34 35 36 37 | |
save_dataset
¶
save_dataset(x_data: DataFrame, y_data: Series) -> None
Persist the research dataset once so trials can reload it in the subprocess.
Source code in src/agentic_ml/core/workspace.py
54 55 56 | |
next_trial_id
¶
next_trial_id() -> str
Return the next unused trial_N id.
Source code in src/agentic_ml/core/workspace.py
61 62 63 64 65 66 67 68 | |
write_trial
¶
write_trial(
trial_id: str, model_py: str, helpers_py: str = ""
) -> Path
Write the agent-provided code for a trial and return its directory.
Source code in src/agentic_ml/core/workspace.py
73 74 75 76 77 78 79 80 | |
write_error
¶
write_error(trial_id: str, error: str) -> None
Persist the failure reason so a failed trial can be debugged after the fact.
Source code in src/agentic_ml/core/workspace.py
85 86 87 | |
copy_trial_artifacts
¶
copy_trial_artifacts(
trial_id: str, destination: str | Path
) -> Path
Copy a trial's source files into destination (used when exporting a model).
Source code in src/agentic_ml/core/workspace.py
97 98 99 100 101 102 103 | |