Buckets:

hf-doc-build/doc-dev / openenv /pr_749 /en /tutorials /evaluation-inspect.html
download
raw
45.2 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Evaluating agents with Inspect AI&quot;,&quot;local&quot;:&quot;evaluating-agents-with-inspect-ai&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;How the pieces fit together&quot;,&quot;local&quot;:&quot;how-the-pieces-fit-together&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Install dependencies&quot;,&quot;local&quot;:&quot;install-dependencies&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Set your model provider&quot;,&quot;local&quot;:&quot;set-your-model-provider&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Define an Inspect AI task for an OpenEnv environment&quot;,&quot;local&quot;:&quot;define-an-inspect-ai-task-for-an-openenv-environment&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Run the eval with InspectAIHarness&quot;,&quot;local&quot;:&quot;run-the-eval-with-inspectaiharness&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Using a task file instead of a task object&quot;,&quot;local&quot;:&quot;using-a-task-file-instead-of-a-task-object&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Adapting to your own environment and task&quot;,&quot;local&quot;:&quot;adapting-to-your-own-environment-and-task&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Next steps&quot;,&quot;local&quot;:&quot;next-steps&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}">
<link href="/docs/openenv/pr_749/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/entry/start.85477f45.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/scheduler.2b22cead.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/singletons.63566282.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/paths.dd876c7b.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/entry/app.51835dc5.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/preload-helper.0820fbc7.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/index.1a0e8013.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/nodes/0.167255c0.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/each.e59479a4.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/nodes/59.aa4af3c9.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/Heading.c0d3f116.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/MermaidChart.svelte_svelte_type_style_lang.21bcf336.js">
<link rel="modulepreload" href="/docs/openenv/pr_749/en/_app/immutable/chunks/CodeBlock.c8d73295.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Evaluating agents with Inspect AI&quot;,&quot;local&quot;:&quot;evaluating-agents-with-inspect-ai&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;How the pieces fit together&quot;,&quot;local&quot;:&quot;how-the-pieces-fit-together&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Install dependencies&quot;,&quot;local&quot;:&quot;install-dependencies&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Set your model provider&quot;,&quot;local&quot;:&quot;set-your-model-provider&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Define an Inspect AI task for an OpenEnv environment&quot;,&quot;local&quot;:&quot;define-an-inspect-ai-task-for-an-openenv-environment&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Run the eval with InspectAIHarness&quot;,&quot;local&quot;:&quot;run-the-eval-with-inspectaiharness&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Using a task file instead of a task object&quot;,&quot;local&quot;:&quot;using-a-task-file-instead-of-a-task-object&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Adapting to your own environment and task&quot;,&quot;local&quot;:&quot;adapting-to-your-own-environment-and-task&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Next steps&quot;,&quot;local&quot;:&quot;next-steps&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg></button></div> </div> <h1 class="relative group"><a id="evaluating-agents-with-inspect-ai" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#evaluating-agents-with-inspect-ai"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Evaluating agents with Inspect AI</span></h1> <p data-svelte-h="svelte-1cenuwu"><a href="https://colab.research.google.com/github/huggingface/OpenEnv/blob/main/examples/evaluation_inspect.ipynb" rel="nofollow"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></p> <p data-svelte-h="svelte-mr7257">After training a model in an OpenEnv environment, you need to measure how it
actually performs on a held-out set of episodes. OpenEnv integrates with
<a href="https://inspect.aisi.org.uk/" rel="nofollow">Inspect AI</a> — an open-source evaluation
framework by the UK AI Safety Institute — through <code>InspectAIHarness</code>.</p> <h2 class="relative group"><a id="how-the-pieces-fit-together" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#how-the-pieces-fit-together"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>How the pieces fit together</span></h2> <p data-svelte-h="svelte-in7fxo">Inspect AI and OpenEnv are complementary, not overlapping:</p> <ul data-svelte-h="svelte-iezebx"><li><strong>OpenEnv</strong> provides the environment (reset, step, reward) and the training
infrastructure (GRPO via TRL).</li> <li><strong>Inspect AI</strong> provides the evaluation infrastructure: datasets, solvers,
scorers, and structured logs.</li></ul> <p data-svelte-h="svelte-js0uop"><code>InspectAIHarness</code> is the bridge. It wraps <code>inspect_ai.eval()</code> inside
OpenEnv’s <code>EvalHarness</code> interface so that eval runs are tracked with the same
structured <code>EvalConfig</code> / <code>EvalResult</code> types you use across all harnesses.</p> <p data-svelte-h="svelte-1hejy7e">The typical workflow is:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=" "><!-- HTML_TAG_START -->Train <span class="hljs-built_in">with</span> OpenEnv (GRPO / SFT)
Define an <span class="hljs-keyword">Inspect</span> AI Task
- dataset: held-out episodes or prompts
- solver: calls your model + the OpenEnv env
- scorer: grades correctness <span class="hljs-built_in">using</span> env reward or <span class="hljs-built_in">exact</span> <span class="hljs-keyword">match</span>
Run via InspectAIHarness → EvalResult <span class="hljs-built_in">with</span> structured scores<!-- HTML_TAG_END --></pre></div> <h2 class="relative group"><a id="install-dependencies" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#install-dependencies"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Install dependencies</span></h2> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-bash "><!-- HTML_TAG_START -->pip install <span class="hljs-string">&quot;inspect-ai&gt;=0.3.0&quot;</span>
pip install <span class="hljs-string">&quot;openenv @ git+https://github.com/huggingface/OpenEnv.git&quot;</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1wrnw4v"><code>inspect-ai</code> is an optional dependency — <code>InspectAIHarness</code> is importable
without it, but raises a clear <code>ImportError</code> at call time if it is missing.</p> <h2 class="relative group"><a id="set-your-model-provider" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#set-your-model-provider"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Set your model provider</span></h2> <p data-svelte-h="svelte-v9d7i">Uncomment exactly one option. All three feed into the same task and harness —
no other cells need to change.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> getpass, os
<span class="hljs-comment"># --- Option A: OpenAI ---</span>
os.environ.setdefault(<span class="hljs-string">&quot;OPENAI_API_KEY&quot;</span>, getpass.getpass(<span class="hljs-string">&quot;OpenAI API key: &quot;</span>))
MODEL = <span class="hljs-string">&quot;openai/gpt-5-mini&quot;</span>
<span class="hljs-comment"># --- Option B: Anthropic ---</span>
<span class="hljs-comment"># os.environ.setdefault(&quot;ANTHROPIC_API_KEY&quot;, getpass.getpass(&quot;Anthropic API key: &quot;))</span>
<span class="hljs-comment"># MODEL = &quot;anthropic/claude-haiku-4-5-20251001&quot;</span>
<span class="hljs-comment"># --- Option C: local transformers model (no API key needed) ---</span>
<span class="hljs-comment"># Requires a GPU for reasonable speed. Omit &#x27;temperature&#x27; from eval_parameters below.</span>
<span class="hljs-comment"># !pip install -U transformers</span>
<span class="hljs-comment"># MODEL = &quot;hf/Qwen/Qwen3.5-0.8B&quot;</span>
<span class="hljs-comment"># Use a local checkpoint path to skip the download:</span>
<span class="hljs-comment"># MODEL = &quot;hf/./outputs/my-trained-model&quot;</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1jm8jsi">The <code>model</code> string uses <code>provider/model-name</code> format for API providers.
For local models, the <code>hf/</code> prefix loads the model with <code>transformers</code> — point
it at a Hub ID to download, or a local path (<code>hf/./path/to/checkpoint</code>) to use
weights you already have on disk (e.g. from TRL training).</p> <h2 class="relative group"><a id="define-an-inspect-ai-task-for-an-openenv-environment" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#define-an-inspect-ai-task-for-an-openenv-environment"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Define an Inspect AI task for an OpenEnv environment</span></h2> <p data-svelte-h="svelte-1kxwbnx">An Inspect AI <code>Task</code> has three parts: a <strong>dataset</strong> of samples to evaluate,
a <strong>solver</strong> that runs the model (and optionally the environment), and a
<strong>scorer</strong> that grades each sample.</p> <p data-svelte-h="svelte-1ov2w1s">The example below evaluates a model against <code>echo_env</code> — the reference
OpenEnv environment. The model is asked to repeat a phrase; the solver sends
the phrase to the environment and records the echoed response; the scorer
checks it matches the expected output.</p> <p data-svelte-h="svelte-q0fjij">The solver calls Inspect AI’s <code>generate()</code> to get the model’s output, then
sends it to the environment. The dataset, scorer, and harness are identical
for both providers.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> asyncio
<span class="hljs-keyword">from</span> inspect_ai <span class="hljs-keyword">import</span> Task, task
<span class="hljs-keyword">from</span> inspect_ai.dataset <span class="hljs-keyword">import</span> Sample
<span class="hljs-keyword">from</span> inspect_ai.scorer <span class="hljs-keyword">import</span> CORRECT, INCORRECT, Score, Target, accuracy, scorer
<span class="hljs-keyword">from</span> inspect_ai.solver <span class="hljs-keyword">import</span> Generate, TaskState, solver
<span class="hljs-keyword">from</span> openenv.core <span class="hljs-keyword">import</span> MCPToolClient
ECHO_ENV_URL = <span class="hljs-string">&quot;https://openenv-echo-env.hf.space&quot;</span>
<span class="hljs-comment"># Limit concurrent env connections to match the server&#x27;s MAX_CONCURRENT_ENVS.</span>
_env_sem = asyncio.Semaphore(<span class="hljs-number">1</span>) <span class="hljs-comment"># increase if your Space supports more sessions</span>
<span class="hljs-meta">@task</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">openenv_echo_eval</span>(<span class="hljs-params">base_url: <span class="hljs-built_in">str</span> = ECHO_ENV_URL</span>):
<span class="hljs-keyword">return</span> Task(
dataset=[
Sample(<span class="hljs-built_in">input</span>=<span class="hljs-string">&quot;Repeat exactly: hello world&quot;</span>, target=<span class="hljs-string">&quot;hello world&quot;</span>),
Sample(<span class="hljs-built_in">input</span>=<span class="hljs-string">&quot;Repeat exactly: inspect ai&quot;</span>, target=<span class="hljs-string">&quot;inspect ai&quot;</span>),
Sample(<span class="hljs-built_in">input</span>=<span class="hljs-string">&quot;Repeat exactly: openenv eval&quot;</span>, target=<span class="hljs-string">&quot;openenv eval&quot;</span>),
Sample(<span class="hljs-built_in">input</span>=<span class="hljs-string">&quot;Repeat exactly: reinforcement learning&quot;</span>, target=<span class="hljs-string">&quot;reinforcement learning&quot;</span>),
Sample(<span class="hljs-built_in">input</span>=<span class="hljs-string">&quot;Repeat exactly: hugging face&quot;</span>, target=<span class="hljs-string">&quot;hugging face&quot;</span>),
],
solver=echo_env_solver(base_url=base_url),
scorer=echo_scorer(),
)
<span class="hljs-meta">@solver</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">echo_env_solver</span>(<span class="hljs-params">base_url: <span class="hljs-built_in">str</span></span>):
<span class="hljs-string">&quot;&quot;&quot;Ask the model to repeat the phrase, then echo it through the env.&quot;&quot;&quot;</span>
<span class="hljs-keyword">async</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">solve</span>(<span class="hljs-params">state: TaskState, generate: Generate</span>) -&gt; TaskState:
state = <span class="hljs-keyword">await</span> generate(state)
model_output = state.output.completion.strip()
<span class="hljs-keyword">async</span> <span class="hljs-keyword">with</span> _env_sem: <span class="hljs-comment"># one env connection at a time</span>
env = MCPToolClient(base_url=base_url)
<span class="hljs-keyword">try</span>:
<span class="hljs-keyword">await</span> env.reset()
echoed = <span class="hljs-keyword">await</span> env.call_tool(<span class="hljs-string">&quot;echo_message&quot;</span>, message=model_output)
state.metadata[<span class="hljs-string">&quot;echoed&quot;</span>] = <span class="hljs-built_in">str</span>(echoed) <span class="hljs-keyword">if</span> echoed <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span> <span class="hljs-keyword">else</span> <span class="hljs-string">&quot;&quot;</span>
<span class="hljs-keyword">finally</span>:
<span class="hljs-keyword">await</span> env.close()
<span class="hljs-keyword">return</span> state
<span class="hljs-keyword">return</span> solve
<span class="hljs-meta">@scorer(<span class="hljs-params">metrics=[accuracy(<span class="hljs-params"></span>)]</span>)</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">echo_scorer</span>():
<span class="hljs-string">&quot;&quot;&quot;CORRECT if the env echoed back exactly what the target phrase was.&quot;&quot;&quot;</span>
<span class="hljs-keyword">async</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">score</span>(<span class="hljs-params">state: TaskState, target: Target</span>) -&gt; Score:
echoed = state.metadata.get(<span class="hljs-string">&quot;echoed&quot;</span>, <span class="hljs-string">&quot;&quot;</span>).strip()
expected = target.text.strip()
<span class="hljs-keyword">return</span> Score(
value=CORRECT <span class="hljs-keyword">if</span> echoed == expected <span class="hljs-keyword">else</span> INCORRECT,
explanation=<span class="hljs-string">f&quot;Env echoed <span class="hljs-subst">{echoed!r}</span>, expected <span class="hljs-subst">{expected!r}</span>&quot;</span>,
)
<span class="hljs-keyword">return</span> score<!-- HTML_TAG_END --></pre></div> <blockquote class="note" data-svelte-h="svelte-o8j1kg"><p><code>echo_env</code> is a pure MCP environment. Interact with it via <code>MCPToolClient</code>
and <code>call_tool(&quot;echo_message&quot;, ...)</code>. For non-MCP environments, use
<code>GenericEnvClient</code> instead.</p></blockquote> <h2 class="relative group"><a id="run-the-eval-with-inspectaiharness" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#run-the-eval-with-inspectaiharness"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Run the eval with InspectAIHarness</span></h2> <p data-svelte-h="svelte-1mmc1or">Pass the task to <code>InspectAIHarness</code> via <code>EvalConfig</code>. The <code>task</code> key in
<code>eval_parameters</code> takes a task object or a registered task name string.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> inspect_ai
<span class="hljs-keyword">import</span> openenv
<span class="hljs-keyword">from</span> openenv.core.evals <span class="hljs-keyword">import</span> EvalConfig, EvalResult, InspectAIHarness
harness = InspectAIHarness(log_dir=<span class="hljs-string">&quot;./eval-logs&quot;</span>)
config = EvalConfig(
harness_name=<span class="hljs-string">&quot;InspectAIHarness&quot;</span>,
harness_version=inspect_ai.__version__,
library_versions={<span class="hljs-string">&quot;openenv&quot;</span>: openenv.__version__},
dataset=<span class="hljs-string">&quot;openenv_echo_eval&quot;</span>,
eval_parameters={
<span class="hljs-string">&quot;model&quot;</span>: MODEL,
<span class="hljs-string">&quot;task&quot;</span>: openenv_echo_eval(base_url=ECHO_ENV_URL),
<span class="hljs-comment"># temperature is supported for API providers (Options A/B).</span>
<span class="hljs-comment"># Omit it for local transformers models (Option C).</span>
<span class="hljs-string">&quot;temperature&quot;</span>: <span class="hljs-number">0.0</span>,
},
)
result: EvalResult = harness.run_from_config(config)
<span class="hljs-built_in">print</span>(result.scores)
<span class="hljs-comment"># {&#x27;accuracy&#x27;: 1.0}</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-o254nq">The <code>EvalResult</code> carries both the config and the scores, making it easy to
log, compare across runs, or serialize to JSON:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> json
<span class="hljs-keyword">class</span> <span class="hljs-title class_">_StrFallback</span>(json.JSONEncoder):
<span class="hljs-keyword">def</span> <span class="hljs-title function_">default</span>(<span class="hljs-params">self, o</span>):
<span class="hljs-keyword">return</span> <span class="hljs-built_in">str</span>(o)
<span class="hljs-built_in">print</span>(json.dumps(result.model_dump(), indent=<span class="hljs-number">2</span>, cls=_StrFallback))<!-- HTML_TAG_END --></pre></div> <h2 class="relative group"><a id="using-a-task-file-instead-of-a-task-object" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#using-a-task-file-instead-of-a-task-object"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Using a task file instead of a task object</span></h2> <p data-svelte-h="svelte-1d96re8">Inspect AI tasks can also be defined in standalone <code>.py</code> files and referenced
by path. This is useful for CI pipelines where the task definition lives in
the repo and the harness is called from a script:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-comment"># tasks/echo_eval.py (contains the @task definition above)</span>
result = harness.run_from_config(EvalConfig(
harness_name=<span class="hljs-string">&quot;InspectAIHarness&quot;</span>,
harness_version=inspect_ai.__version__,
library_versions={<span class="hljs-string">&quot;openenv&quot;</span>: openenv.__version__},
dataset=<span class="hljs-string">&quot;tasks/echo_eval.py@openenv_echo_eval&quot;</span>,
eval_parameters={
<span class="hljs-string">&quot;model&quot;</span>: <span class="hljs-string">&quot;openai/gpt-5-mini&quot;</span>,
<span class="hljs-string">&quot;task&quot;</span>: <span class="hljs-string">&quot;tasks/echo_eval.py@openenv_echo_eval&quot;</span>,
},
))<!-- HTML_TAG_END --></pre></div> <h2 class="relative group"><a id="adapting-to-your-own-environment-and-task" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#adapting-to-your-own-environment-and-task"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Adapting to your own environment and task</span></h2> <p data-svelte-h="svelte-1epmotp">Replace <code>echo_env_solver</code> with a solver that uses your env and model:</p> <ol data-svelte-h="svelte-1qj6khl"><li><strong>Dataset</strong> — collect held-out episodes from your env (or a static
benchmark); each <code>Sample</code> needs <code>input</code> and <code>target</code> fields.</li> <li><strong>Solver</strong> — call your trained model against the env via <code>generate()</code>.
If you used GRPO training with an <code>environment_factory</code>, reuse the same
factory here so the eval env matches training exactly.</li> <li><strong>Scorer</strong> — use the env’s reward signal directly, or write an Inspect AI
<code>@scorer</code> that checks the final observation against a ground-truth target.</li></ol> <blockquote class="tip" data-svelte-h="svelte-n88mqq"><p>Run this eval <strong>before training</strong> on your base model to establish a baseline,
then again after training to measure the improvement. The delta (post − pre)
is more informative than either number alone — a model that scores 60% after
training tells you little without knowing it started at 4%.</p></blockquote> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> asyncio
<span class="hljs-keyword">from</span> inspect_ai.solver <span class="hljs-keyword">import</span> Generate, TaskState, solver
<span class="hljs-keyword">from</span> openenv.core <span class="hljs-keyword">import</span> MCPToolClient
_env_sem = asyncio.Semaphore(<span class="hljs-number">1</span>) <span class="hljs-comment"># raise if your Space supports more sessions</span>
<span class="hljs-meta">@solver</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">my_env_solver</span>(<span class="hljs-params">base_url: <span class="hljs-built_in">str</span></span>):
<span class="hljs-keyword">async</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">solve</span>(<span class="hljs-params">state: TaskState, generate: Generate</span>) -&gt; TaskState:
state = <span class="hljs-keyword">await</span> generate(state)
model_output = state.output.completion.strip()
<span class="hljs-keyword">async</span> <span class="hljs-keyword">with</span> _env_sem:
env = MCPToolClient(base_url=base_url)
<span class="hljs-keyword">try</span>:
<span class="hljs-keyword">await</span> env.reset()
result = <span class="hljs-keyword">await</span> env.call_tool(<span class="hljs-string">&quot;your_tool_name&quot;</span>, message=model_output)
state.metadata[<span class="hljs-string">&quot;env_result&quot;</span>] = result
<span class="hljs-keyword">finally</span>:
<span class="hljs-keyword">await</span> env.close()
<span class="hljs-keyword">return</span> state
<span class="hljs-keyword">return</span> solve<!-- HTML_TAG_END --></pre></div> <h2 class="relative group"><a id="next-steps" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#next-steps"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Next steps</span></h2> <ul data-svelte-h="svelte-1g6s95r"><li><a href="end-to-end-walkthrough">End-to-end walkthrough</a> — full GRPO training loop that produces a model you can evaluate with this tutorial</li> <li><a href="sft-warmup">SFT warm-up tutorial</a> — collect rollouts, filter by reward, and fine-tune a student model before running GRPO</li> <li><a href="rubrics">Rubrics tutorial</a> — define reward functions inside
the environment using composable rubrics</li> <li><a href="https://inspect.aisi.org.uk/" rel="nofollow">Inspect AI documentation</a> — full reference
for tasks, solvers, scorers, and the log viewer</li></ul> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/openenv/blob/main/docs/source/tutorials/evaluation-inspect.md" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg> <span data-svelte-h="svelte-zjs2n5"><span class="underline">Update</span> on GitHub</span></a> <p></p>
<script>
{
__sveltekit_1qwoa43 = {
assets: "/docs/openenv/pr_749/en",
base: "/docs/openenv/pr_749/en",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/openenv/pr_749/en/_app/immutable/entry/start.85477f45.js"),
import("/docs/openenv/pr_749/en/_app/immutable/entry/app.51835dc5.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 59],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
45.2 kB
·
Xet hash:
68c987faf5a75ddccbf1980c6f35b3dcdeed84d6ff485aeeb1add6ec1f78d2cf

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.