Buckets:

hf-doc-build/doc-dev / trackio /pr_660 /en /storage_schema.html
qgallouedec's picture
download
raw
57.4 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Storage Schema and Direct Queries&quot;,&quot;local&quot;:&quot;storage-schema-and-direct-queries&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Where Data Lives&quot;,&quot;local&quot;:&quot;where-data-lives&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Querying Data Directly&quot;,&quot;local&quot;:&quot;querying-data-directly&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;SQLite Schema&quot;,&quot;local&quot;:&quot;sqlite-schema&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;metrics&quot;,&quot;local&quot;:&quot;metrics&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;configs&quot;,&quot;local&quot;:&quot;configs&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;system_metrics&quot;,&quot;local&quot;:&quot;systemmetrics&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;project_metadata&quot;,&quot;local&quot;:&quot;projectmetadata&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;pending_uploads&quot;,&quot;local&quot;:&quot;pendinguploads&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;alerts&quot;,&quot;local&quot;:&quot;alerts&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;artifacts&quot;,&quot;local&quot;:&quot;artifacts&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;artifact_versions&quot;,&quot;local&quot;:&quot;artifactversions&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;artifact_aliases&quot;,&quot;local&quot;:&quot;artifactaliases&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;run_artifact_links&quot;,&quot;local&quot;:&quot;runartifactlinks&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;How Metric Payloads Are Stored&quot;,&quot;local&quot;:&quot;how-metric-payloads-are-stored&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Parquet Layout&quot;,&quot;local&quot;:&quot;parquet-layout&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Local parquet exports&quot;,&quot;local&quot;:&quot;local-parquet-exports&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Static Space and dataset exports&quot;,&quot;local&quot;:&quot;static-space-and-dataset-exports&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Useful Query Examples&quot;,&quot;local&quot;:&quot;useful-query-examples&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Stability Notes&quot;,&quot;local&quot;:&quot;stability-notes&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/>
<link href="/docs/trackio/v0.34.0/en/_app/immutable/entry/start.qOC3rgkk.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/chunks/99SEdJFH.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/chunks/c5epZbRJ.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/entry/app.C1IMScd_.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/chunks/CTPvGMXu.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/chunks/nFfuFHB_.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/chunks/CldSabhm.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/nodes/0.B8US0jOa.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/chunks/DoyOpfDJ.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/nodes/20.nHVKl5aZ.js" rel="modulepreload">
<link href="/docs/trackio/v0.34.0/en/_app/immutable/chunks/CYwJY_et.js" rel="modulepreload">
<!--1jq3ibu--><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Storage Schema and Direct Queries&quot;,&quot;local&quot;:&quot;storage-schema-and-direct-queries&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Where Data Lives&quot;,&quot;local&quot;:&quot;where-data-lives&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Querying Data Directly&quot;,&quot;local&quot;:&quot;querying-data-directly&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;SQLite Schema&quot;,&quot;local&quot;:&quot;sqlite-schema&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;metrics&quot;,&quot;local&quot;:&quot;metrics&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;configs&quot;,&quot;local&quot;:&quot;configs&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;system_metrics&quot;,&quot;local&quot;:&quot;systemmetrics&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;project_metadata&quot;,&quot;local&quot;:&quot;projectmetadata&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;pending_uploads&quot;,&quot;local&quot;:&quot;pendinguploads&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;alerts&quot;,&quot;local&quot;:&quot;alerts&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;artifacts&quot;,&quot;local&quot;:&quot;artifacts&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;artifact_versions&quot;,&quot;local&quot;:&quot;artifactversions&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;artifact_aliases&quot;,&quot;local&quot;:&quot;artifactaliases&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;run_artifact_links&quot;,&quot;local&quot;:&quot;runartifactlinks&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;How Metric Payloads Are Stored&quot;,&quot;local&quot;:&quot;how-metric-payloads-are-stored&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Parquet Layout&quot;,&quot;local&quot;:&quot;parquet-layout&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Local parquet exports&quot;,&quot;local&quot;:&quot;local-parquet-exports&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Static Space and dataset exports&quot;,&quot;local&quot;:&quot;static-space-and-dataset-exports&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Useful Query Examples&quot;,&quot;local&quot;:&quot;useful-query-examples&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Stability Notes&quot;,&quot;local&quot;:&quot;stability-notes&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/><!---->
<link href="/docs/trackio/v0.34.0/en/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><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> <!--[-1--><!--]--></div><!----> <!--[0--><h1 class="relative group"><a id="storage-schema-and-direct-queries" 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="#storage-schema-and-direct-queries"><span><svg 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>Storage Schema and Direct Queries</span></h1><!--]--><!----> <p>Trackio stores each project in its own SQLite database and can export that data to parquet for syncing, static Spaces, and direct analysis. This page documents the live SQLite schema, the derived parquet layout, and the new <code>trackio query</code> command for running read-only SQL.</p> <!--[1--><h2 class="relative group"><a id="where-data-lives" 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="#where-data-lives"><span><svg 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>Where Data Lives</span></h2><!--]--><!----> <ul><li>Local project databases live in <code>TRACKIO_DIR</code>, which defaults to <code>~/.cache/huggingface/trackio</code>.</li> <li>Each project is stored as a separate SQLite file: <code>{project}.db</code>.</li> <li>Media and uploaded files live under <code>TRACKIO_DIR/media/</code>.</li> <li>When syncing to Hugging Face, Trackio exports parquet files from the SQLite database before upload.</li></ul> <!--[1--><h2 class="relative group"><a id="querying-data-directly" 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="#querying-data-directly"><span><svg 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>Querying Data Directly</span></h2><!--]--><!----> <p>Use the CLI when you need a catch-all query that is not already covered by <code>trackio list</code> or <code>trackio get</code>:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;SELECT run_name, MAX(step) AS last_step FROM metrics GROUP BY run_name ORDER BY last_step DESC&quot;</span><!----></pre></div><!----> <p>Add <code>--json</code> for machine-readable output:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;SELECT name FROM sqlite_master WHERE type = &#x27;table&#x27; ORDER BY name&quot;</span> --json<!----></pre></div><!----> <p>The same command works against a remote Space:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;SELECT COUNT(*) AS num_alerts FROM alerts&quot;</span> --space username/my-space --json<!----></pre></div><!----> <p><code>trackio query</code> only accepts read-only <code>SELECT</code>, <code>WITH</code>, and safe schema <code>PRAGMA</code> queries.</p> <!--[1--><h2 class="relative group"><a id="sqlite-schema" 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="#sqlite-schema"><span><svg 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>SQLite Schema</span></h2><!--]--><!----> <p>The live schema is defined in <code>trackio/sqlite_storage.py</code> by <code>SQLiteStorage.init_db()</code>.</p> <!--[2--><h3 class="relative group"><a id="metrics" 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="#metrics"><span><svg 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>metrics</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>INTEGER</code></td><td>Primary key</td></tr><tr><td><code>timestamp</code></td><td><code>TEXT</code></td><td>ISO timestamp</td></tr><tr><td><code>run_name</code></td><td><code>TEXT</code></td><td>Run identifier</td></tr><tr><td><code>step</code></td><td><code>INTEGER</code></td><td>Training step</td></tr><tr><td><code>metrics</code></td><td><code>TEXT</code></td><td>JSON blob containing logged metric values</td></tr><tr><td><code>log_id</code></td><td><code>TEXT</code></td><td>Optional deduplication key added by additive migration</td></tr><tr><td><code>space_id</code></td><td><code>TEXT</code></td><td>Optional pending-sync marker added by additive migration</td></tr></tbody></table> <p>Indexes:</p> <ul><li><code>idx_metrics_run_step</code> on <code>(run_name, step)</code></li> <li><code>idx_metrics_run_timestamp</code> on <code>(run_name, timestamp)</code></li> <li><code>idx_metrics_log_id</code> unique partial index on <code>log_id</code></li> <li><code>idx_metrics_pending</code> partial index on <code>space_id</code></li></ul> <!--[2--><h3 class="relative group"><a id="configs" 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="#configs"><span><svg 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>configs</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>INTEGER</code></td><td>Primary key</td></tr><tr><td><code>run_name</code></td><td><code>TEXT</code></td><td>Run identifier</td></tr><tr><td><code>config</code></td><td><code>TEXT</code></td><td>JSON blob containing run config</td></tr><tr><td><code>created_at</code></td><td><code>TEXT</code></td><td>ISO timestamp</td></tr></tbody></table> <p>Indexes and constraints:</p> <ul><li><code>UNIQUE(run_name)</code></li> <li><code>idx_configs_run_name</code> on <code>(run_name)</code></li></ul> <!--[2--><h3 class="relative group"><a id="systemmetrics" 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="#systemmetrics"><span><svg 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>system_metrics</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>INTEGER</code></td><td>Primary key</td></tr><tr><td><code>timestamp</code></td><td><code>TEXT</code></td><td>ISO timestamp</td></tr><tr><td><code>run_name</code></td><td><code>TEXT</code></td><td>Run identifier</td></tr><tr><td><code>metrics</code></td><td><code>TEXT</code></td><td>JSON blob containing system metrics</td></tr><tr><td><code>log_id</code></td><td><code>TEXT</code></td><td>Optional deduplication key added by additive migration</td></tr><tr><td><code>space_id</code></td><td><code>TEXT</code></td><td>Optional pending-sync marker added by additive migration</td></tr></tbody></table> <p>Indexes:</p> <ul><li><code>idx_system_metrics_run_timestamp</code> on <code>(run_name, timestamp)</code></li> <li><code>idx_system_metrics_log_id</code> unique partial index on <code>log_id</code></li> <li><code>idx_system_metrics_pending</code> partial index on <code>space_id</code></li></ul> <!--[2--><h3 class="relative group"><a id="projectmetadata" 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="#projectmetadata"><span><svg 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>project_metadata</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>key</code></td><td><code>TEXT</code></td><td>Primary key</td></tr><tr><td><code>value</code></td><td><code>TEXT</code></td><td>Metadata value</td></tr></tbody></table> <!--[2--><h3 class="relative group"><a id="pendinguploads" 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="#pendinguploads"><span><svg 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>pending_uploads</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>INTEGER</code></td><td>Primary key</td></tr><tr><td><code>space_id</code></td><td><code>TEXT</code></td><td>Destination Space</td></tr><tr><td><code>run_name</code></td><td><code>TEXT</code></td><td>Optional run name</td></tr><tr><td><code>step</code></td><td><code>INTEGER</code></td><td>Optional step</td></tr><tr><td><code>file_path</code></td><td><code>TEXT</code></td><td>Absolute local path</td></tr><tr><td><code>relative_path</code></td><td><code>TEXT</code></td><td>Relative media path</td></tr><tr><td><code>created_at</code></td><td><code>TEXT</code></td><td>ISO timestamp</td></tr></tbody></table> <!--[2--><h3 class="relative group"><a id="alerts" 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="#alerts"><span><svg 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>alerts</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>INTEGER</code></td><td>Primary key</td></tr><tr><td><code>timestamp</code></td><td><code>TEXT</code></td><td>ISO timestamp</td></tr><tr><td><code>run_name</code></td><td><code>TEXT</code></td><td>Run identifier</td></tr><tr><td><code>title</code></td><td><code>TEXT</code></td><td>Alert title</td></tr><tr><td><code>text</code></td><td><code>TEXT</code></td><td>Optional alert body</td></tr><tr><td><code>level</code></td><td><code>TEXT</code></td><td><code>info</code>, <code>warn</code>, or <code>error</code></td></tr><tr><td><code>step</code></td><td><code>INTEGER</code></td><td>Optional training step</td></tr><tr><td><code>alert_id</code></td><td><code>TEXT</code></td><td>Optional deduplication key</td></tr></tbody></table> <p>Indexes:</p> <ul><li><code>idx_alerts_run</code> on <code>(run_name)</code></li> <li><code>idx_alerts_timestamp</code> on <code>(timestamp)</code></li> <li><code>idx_alerts_alert_id</code> unique partial index on <code>alert_id</code></li></ul> <!--[2--><h3 class="relative group"><a id="artifacts" 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="#artifacts"><span><svg 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>artifacts</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>INTEGER</code></td><td>Primary key</td></tr><tr><td><code>name</code></td><td><code>TEXT</code></td><td>Artifact name</td></tr><tr><td><code>type</code></td><td><code>TEXT</code></td><td>Free-form category such as <code>model</code> or <code>dataset</code></td></tr><tr><td><code>description</code></td><td><code>TEXT</code></td><td>Optional description</td></tr><tr><td><code>created_at</code></td><td><code>TEXT</code></td><td>ISO timestamp</td></tr></tbody></table> <p>Indexes and constraints:</p> <ul><li><code>UNIQUE(name)</code></li></ul> <!--[2--><h3 class="relative group"><a id="artifactversions" 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="#artifactversions"><span><svg 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>artifact_versions</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>INTEGER</code></td><td>Primary key</td></tr><tr><td><code>artifact_id</code></td><td><code>INTEGER</code></td><td>References <code>artifacts.id</code></td></tr><tr><td><code>version</code></td><td><code>INTEGER</code></td><td>Sequential version number starting at 0</td></tr><tr><td><code>manifest_digest</code></td><td><code>TEXT</code></td><td>SHA-256 hex digest of the canonical manifest JSON</td></tr><tr><td><code>manifest</code></td><td><code>TEXT</code></td><td>JSON blob listing manifest entries with <code>path</code>, <code>digest</code>, <code>size</code>, and optional <code>ref</code></td></tr><tr><td><code>metadata</code></td><td><code>TEXT</code></td><td>Optional JSON metadata</td></tr><tr><td><code>size_bytes</code></td><td><code>INTEGER</code></td><td>Total size of the version’s manifest entries (sum of <code>size</code>) in bytes</td></tr><tr><td><code>producer_run_id</code></td><td><code>TEXT</code></td><td>Optional identifier of the producing run</td></tr><tr><td><code>producer_run_name</code></td><td><code>TEXT</code></td><td>Optional name of the producing run</td></tr><tr><td><code>created_at</code></td><td><code>TEXT</code></td><td>ISO timestamp</td></tr></tbody></table> <p>Indexes and constraints:</p> <ul><li><code>UNIQUE(artifact_id, version)</code></li> <li><code>UNIQUE(artifact_id, manifest_digest)</code></li></ul> <!--[2--><h3 class="relative group"><a id="artifactaliases" 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="#artifactaliases"><span><svg 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>artifact_aliases</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>artifact_id</code></td><td><code>INTEGER</code></td><td>References <code>artifacts.id</code></td></tr><tr><td><code>alias</code></td><td><code>TEXT</code></td><td>Alias name such as <code>latest</code></td></tr><tr><td><code>artifact_version_id</code></td><td><code>INTEGER</code></td><td>References <code>artifact_versions.id</code></td></tr></tbody></table> <p>Indexes and constraints:</p> <ul><li><code>PRIMARY KEY (artifact_id, alias)</code></li></ul> <!--[2--><h3 class="relative group"><a id="runartifactlinks" 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="#runartifactlinks"><span><svg 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_artifact_links</span></h3><!--]--><!----> <table><thead><tr><th>Column</th><th>Type</th><th>Notes</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>INTEGER</code></td><td>Primary key</td></tr><tr><td><code>run_id</code></td><td><code>TEXT</code></td><td>Optional run identifier</td></tr><tr><td><code>run_name</code></td><td><code>TEXT</code></td><td>Optional run name</td></tr><tr><td><code>artifact_version_id</code></td><td><code>INTEGER</code></td><td>References <code>artifact_versions.id</code></td></tr><tr><td><code>direction</code></td><td><code>TEXT</code></td><td><code>input</code> or <code>output</code></td></tr><tr><td><code>created_at</code></td><td><code>TEXT</code></td><td>ISO timestamp</td></tr></tbody></table> <p>Indexes and constraints:</p> <ul><li><code>CHECK(direction IN ('input', 'output'))</code></li> <li><code>idx_run_artifact_links_run</code> on <code>(run_id, run_name)</code></li> <li><code>idx_run_artifact_links_version</code> on <code>(artifact_version_id)</code></li> <li><code>idx_run_artifact_links_unique</code> unique index on <code>(run_id, artifact_version_id, direction)</code></li></ul> <!--[1--><h2 class="relative group"><a id="how-metric-payloads-are-stored" 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-metric-payloads-are-stored"><span><svg 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 Metric Payloads Are Stored</span></h2><!--]--><!----> <ul><li>User metrics are stored as JSON text in <code>metrics.metrics</code>.</li> <li>System metrics are stored as JSON text in <code>system_metrics.metrics</code>.</li> <li>Run configuration is stored as JSON text in <code>configs.config</code>.</li> <li>Trackio’s higher-level APIs deserialize these JSON blobs before returning them.</li></ul> <p>Common direct-query pattern:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;SELECT timestamp, step, metrics FROM metrics WHERE run_name = &#x27;run-1&#x27; ORDER BY step DESC LIMIT 5&quot;</span><!----></pre></div><!----> <p>Schema introspection example:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;PRAGMA table_info(metrics)&quot;</span><!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="parquet-layout" 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="#parquet-layout"><span><svg 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>Parquet Layout</span></h2><!--]--><!----> <p>Trackio derives parquet files from SQLite by flattening JSON columns into regular columns.</p> <!--[2--><h3 class="relative group"><a id="local-parquet-exports" 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="#local-parquet-exports"><span><svg 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>Local parquet exports</span></h3><!--]--><!----> <p><code>SQLiteStorage.export_to_parquet()</code> writes:</p> <ul><li><code>{project}.parquet</code> from <code>metrics</code></li> <li><code>{project}_system.parquet</code> from <code>system_metrics</code></li> <li><code>{project}_configs.parquet</code> from <code>configs</code></li> <li><code>{project}_traces.parquet</code> from <code>traces</code></li> <li><code>{project}_{table}.parquet</code> for each artifact table (<code>artifacts</code>, <code>artifact_versions</code>, <code>artifact_aliases</code>, <code>run_artifact_links</code>)</li></ul> <p>The flattened parquet files keep the structural columns such as <code>timestamp</code>, <code>run_name</code>, and <code>step</code>, then add one column per key found in the JSON payload.</p> <!--[2--><h3 class="relative group"><a id="static-space-and-dataset-exports" 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="#static-space-and-dataset-exports"><span><svg 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>Static Space and dataset exports</span></h3><!--]--><!----> <p><code>SQLiteStorage.export_for_static_space()</code> writes:</p> <ul><li><code>metrics.parquet</code></li> <li><code>aux/system_metrics.parquet</code></li> <li><code>aux/configs.parquet</code></li> <li><code>aux/traces.parquet</code></li> <li><code>aux/artifacts.parquet</code>, <code>aux/artifact_versions.parquet</code>, <code>aux/artifact_aliases.parquet</code>, and <code>aux/run_artifact_links.parquet</code></li> <li><code>runs.json</code></li> <li><code>settings.json</code></li></ul> <p>Static deployment copies media files to <code>media/</code> and artifact blobs to <code>artifacts/blobs/sha256/{prefix}/{digest}</code> alongside these exports, so the browser-only dashboard can serve artifact downloads directly from the dataset or bucket.</p> <p>This is the layout used for static Spaces and exported datasets.</p> <!--[1--><h2 class="relative group"><a id="useful-query-examples" 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="#useful-query-examples"><span><svg 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>Useful Query Examples</span></h2><!--]--><!----> <p>List tables:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;SELECT name FROM sqlite_master WHERE type = &#x27;table&#x27; ORDER BY name&quot;</span><!----></pre></div><!----> <p>Find the latest step for each run:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;SELECT run_name, MAX(step) AS last_step FROM metrics GROUP BY run_name ORDER BY last_step DESC&quot;</span><!----></pre></div><!----> <p>Inspect recent alerts:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;SELECT timestamp, run_name, level, title, step FROM alerts ORDER BY timestamp DESC LIMIT 20&quot;</span><!----></pre></div><!----> <p>Inspect stored configs:</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 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-sh "><!---->trackio query project --project <span class="hljs-string">&quot;my-project&quot;</span> --sql <span class="hljs-string">&quot;SELECT run_name, created_at, config FROM configs ORDER BY created_at DESC&quot;</span><!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="stability-notes" 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="#stability-notes"><span><svg 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>Stability Notes</span></h2><!--]--><!----> <p>Trackio is still in beta. The schema is documented here so humans and agents can query it directly, but future releases may evolve the schema and require migrations or regenerated local databases.</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/gradio-app/trackio/blob/main/docs/source/storage_schema.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><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]-->
<script>
{
__sveltekit_koazbp = {
base: "/docs/trackio/v0.34.0/en",
assets: "/docs/trackio/v0.34.0/en"
};
const element = document.currentScript.parentElement;
Promise.all([
import("/docs/trackio/v0.34.0/en/_app/immutable/entry/start.qOC3rgkk.js"),
import("/docs/trackio/v0.34.0/en/_app/immutable/entry/app.C1IMScd_.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 20],
data: [null,null],
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
57.4 kB
·
Xet hash:
e347ab89a12137b4a4b99dfeafa1f73914ee1024108a35a28a90103fee3df6fd

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