research
agentic_ml.research
¶
The research orchestrator and agent glue (requires the research extra).
Researcher
¶
Researcher(task: Task, model: object | None = None)
Run agent-driven research for a given task and export the best model.
Attributes:
| Name | Type | Description |
|---|---|---|
task |
The :class: |
|
model |
The Strands model instance driving the agent, or |
|
agent |
object | None
|
The Strands agent built from |
context |
ResearchContext
|
The :class: |
Source code in src/agentic_ml/research/researcher.py
71 72 73 74 75 | |
context
property
¶
context: ResearchContext
The :class:~agentic_ml.core.engine.ResearchContext from the last research run.
research
¶
research(
data: DataFrame,
schema: DatasetSchema,
*,
metrics: list[str] | None = None,
partitions: list[Partition] | None = None,
n_splits: int = 5,
seed: int = 0,
tolerance: float = 1e-06,
timeout: float = 120.0,
iterations: int = 10,
ideas: str | None = None,
research_dir: str | None = None,
sleep: float = 0.0,
new_session: bool = True,
agent_config: AgentConfig | None = None,
) -> ResearchContext
Drive the research loop and return the resulting context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
DataFrame
|
The tabular dataset, including the target column. |
required |
schema
|
DatasetSchema
|
Variable descriptions and the target column name. |
required |
metrics
|
list[str] | None
|
Metric names to track; defaults to the task's metrics. |
None
|
partitions
|
list[Partition] | None
|
Optional explicit (train_idx, val_idx) splits; otherwise built by the task (K-Fold by default). |
None
|
iterations
|
int
|
Hard cap on the number of trials |
10
|
ideas
|
str | None
|
Natural-language ideas the user wants the agent to try. |
None
|
research_dir
|
str | None
|
Where to store trials and the leaderboard. Defaults to a
timestamped directory under |
None
|
sleep
|
float
|
How long to wait between iterations, in seconds. This is useful to avoid RateLimit errors with the LLM provider. |
0.0
|
new_session
|
bool
|
If |
True
|
agent_config
|
AgentConfig | None
|
Tunes the Strands agent's conversation manager and context offloader
(see :class: |
None
|
Source code in src/agentic_ml/research/researcher.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |
export_model
¶
export_model(trial: str | None = None) -> AgenticModel
Export a trial (the best by default) as a light production model.
Source code in src/agentic_ml/research/researcher.py
219 220 221 222 223 224 225 | |