run_agent
autogen.beta.eval.runtime.runner.run_agent async #
run_agent(suite, *, agent, scorers, store_dir, model_config=None, repeats=1, budgets=None, concurrency=4, run_id=None, label=None, stream=None, variant=None)
Run an evaluation suite end-to-end.
Each task gets a fresh :class:~autogen.beta.Agent built from agent (an instance, reused, or a factory), run with a :class:~autogen.beta.middleware.builtin.telemetry.TelemetryMiddleware exporting to an in-memory span exporter; the :class:~autogen.beta.eval.Trace is then reconstructed from those spans (per-task duration timed around the ask) — the same span→Trace path the trace-based sources use. Those traces are graded through the same core :func:~autogen.beta.eval.evaluate_traces uses, and the run is persisted as <store_dir>/<run_id>.json.
| PARAMETER | DESCRIPTION |
|---|---|
suite | A :class: |
agent | The agent to evaluate — either an :class: |
scorers | Scorer instances (typically produced by |
store_dir | Directory under which the run JSON is persisted as |
model_config |
TYPE: |
repeats | Run each task this many times (default TYPE: |
budgets | Optional :class: TYPE: |
concurrency | Maximum number of tasks executed in parallel. Clamped to TYPE: |
run_id | Override for the auto-generated UUID4 run id (unique per run). TYPE: |
label | Optional user-defined identifier recorded on the run. Unlike TYPE: |
stream | Optional :class: TYPE: |
variant | Tags this run's TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
A | class: TYPE: |
RunResult | The result has already been written to disk by the time this |
RunResult | function returns. |
Source code in autogen/beta/eval/runtime/runner.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 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 | |