Buckets:

hf-doc-build/doc-dev / trackio /pr_305 /en /migration.html
rtrm's picture
download
raw
31.2 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Migrating to Trackio&quot;,&quot;local&quot;:&quot;migrating-to-trackio&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Weights &amp; Biases ( wandb )&quot;,&quot;local&quot;:&quot;weights--biases--wandb-&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Simple Migration&quot;,&quot;local&quot;:&quot;simple-migration&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Complete Example&quot;,&quot;local&quot;:&quot;complete-example&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Advanced Features&quot;,&quot;local&quot;:&quot;advanced-features&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Neptune ( neptune )&quot;,&quot;local&quot;:&quot;neptune--neptune-&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Basic Logging Migration&quot;,&quot;local&quot;:&quot;basic-logging-migration&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Complete Training Loop Migration&quot;,&quot;local&quot;:&quot;complete-training-loop-migration&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Key Migration Points&quot;,&quot;local&quot;:&quot;key-migration-points&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Benefits to Migrating&quot;,&quot;local&quot;:&quot;benefits-to-migrating&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}">
<link href="/docs/trackio/pr_305/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/entry/start.b7c0274d.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/chunks/scheduler.cfabe6e6.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/chunks/singletons.62fc52fc.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/chunks/index.9f0f4ad4.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/chunks/paths.ef706775.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/entry/app.661c2968.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/chunks/preload-helper.e0a9e74a.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/chunks/index.2eae04e0.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/nodes/0.ee485fe4.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/chunks/each.e59479a4.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/nodes/10.c5d3e066.js">
<link rel="modulepreload" href="/docs/trackio/pr_305/en/_app/immutable/chunks/MermaidChart.svelte_svelte_type_style_lang.5be4f506.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Migrating to Trackio&quot;,&quot;local&quot;:&quot;migrating-to-trackio&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Weights &amp; Biases ( wandb )&quot;,&quot;local&quot;:&quot;weights--biases--wandb-&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Simple Migration&quot;,&quot;local&quot;:&quot;simple-migration&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Complete Example&quot;,&quot;local&quot;:&quot;complete-example&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Advanced Features&quot;,&quot;local&quot;:&quot;advanced-features&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Neptune ( neptune )&quot;,&quot;local&quot;:&quot;neptune--neptune-&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Basic Logging Migration&quot;,&quot;local&quot;:&quot;basic-logging-migration&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Complete Training Loop Migration&quot;,&quot;local&quot;:&quot;complete-training-loop-migration&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Key Migration Points&quot;,&quot;local&quot;:&quot;key-migration-points&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Benefits to Migrating&quot;,&quot;local&quot;:&quot;benefits-to-migrating&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 max-sm:gap-0.5 h-6 max-sm:h-5 px-2 max-sm:px-1.5 text-[11px] max-sm:text-[9px] 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"><svg class="w-3 h-3 max-sm:w-2.5 max-sm:h-2.5" 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-6 max-sm:h-5 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 w-3 h-3 max-sm:w-2.5 max-sm:h-2.5 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="migrating-to-trackio" 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="#migrating-to-trackio"><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>Migrating to Trackio</span></h1> <p data-svelte-h="svelte-1bthnxo">It’s easy to migrate to Trackio from other experiment tracking libraries with minimal code changes. This guide shows you how to migrate from popular experiment tracking tools.</p> <h2 class="relative group"><a id="weights--biases--wandb-" 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="#weights--biases--wandb-"><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>Weights &amp; Biases ( wandb )</span></h2> <p data-svelte-h="svelte-9vcicb">Migrating from Weights &amp; Biases to Trackio is extremely easy because <strong>Trackio uses the exact same API syntax as wandb</strong>. In most cases, you only need to change the import statement!</p> <h3 class="relative group"><a id="simple-migration" 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="#simple-migration"><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>Simple Migration</span></h3> <p data-svelte-h="svelte-ipqi03">The most basic migration requires just changing your import:</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 --><span class="hljs-deletion">- import wandb</span>
<span class="hljs-addition">+ import trackio as wandb</span>
wandb.init(project=&quot;my-project&quot;)
wandb.log({&quot;loss&quot;: 0.5, &quot;accuracy&quot;: 0.8})
wandb.finish()<!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="complete-example" 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="#complete-example"><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>Complete Example</span></h3> <p data-svelte-h="svelte-19wey0q">Here’s a more complete example showing how the rest of your code stays exactly the same!</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 --><span class="hljs-deletion">- import wandb</span>
<span class="hljs-addition">+ import trackio as wandb</span>
import numpy as np
wandb.init(
project=&quot;image-classification&quot;,
name=&quot;experiment-1&quot;,
config={
&quot;learning_rate&quot;: 0.01,
&quot;batch_size&quot;: 32,
&quot;epochs&quot;: 10
}
)
for epoch in range(10):
loss = np.random.random()
accuracy = np.random.random()
wandb.log({
&quot;epoch&quot;: epoch,
&quot;loss&quot;: loss,
&quot;accuracy&quot;: accuracy,
&quot;learning_rate&quot;: wandb.config.learning_rate
})
wandb.finish()<!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="advanced-features" 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="#advanced-features"><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>Advanced Features</span></h3> <p data-svelte-h="svelte-ltxiyg">Trackio supports logging Tables, Images, Audio, etc. - same API as wandb:</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 --><span class="hljs-deletion">- import wandb</span>
<span class="hljs-addition">+ import trackio as wandb</span>
import numpy as np
wandb.init(project=&quot;data-analysis&quot;)
image_array = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)
wandb.log({
&quot;sample_image&quot;: wandb.Image(image_array, caption=&quot;Generated sample&quot;),
&quot;model_diagram&quot;: wandb.Image(&quot;architecture.png&quot;)
})
columns = [&quot;epoch&quot;, &quot;train_loss&quot;, &quot;val_loss&quot;, &quot;accuracy&quot;]
data = [
[1, 0.8, 0.6, 0.75],
[2, 0.6, 0.5, 0.82],
[3, 0.4, 0.45, 0.89]
]
table = wandb.Table(data=data, columns=columns)
wandb.log({&quot;training_results&quot;: table})
wandb.finish()<!-- HTML_TAG_END --></pre></div> <h2 class="relative group"><a id="neptune--neptune-" 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="#neptune--neptune-"><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>Neptune ( neptune )</span></h2> <p data-svelte-h="svelte-1w1fdk9">Migrating from Neptune requires a few more changes since Neptune has a different API structure, but the migration is still straightforward.</p> <h3 class="relative group"><a id="basic-logging-migration" 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="#basic-logging-migration"><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>Basic Logging Migration</span></h3> <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 --><span class="hljs-deletion">- import neptune</span>
<span class="hljs-addition">+ import trackio</span>
<span class="hljs-deletion">- run = neptune.init_run(</span>
<span class="hljs-deletion">- project=&quot;my-workspace/my-project&quot;,</span>
<span class="hljs-deletion">- api_token=&quot;your-token&quot;</span>
<span class="hljs-deletion">- )</span>
<span class="hljs-addition">+ trackio.init(project=&quot;my-project&quot;)</span>
<span class="hljs-deletion">- run[&quot;parameters&quot;] = {&quot;learning_rate&quot;: 0.01, &quot;batch_size&quot;: 32}</span>
<span class="hljs-deletion">- run[&quot;metrics/loss&quot;].log(0.5)</span>
<span class="hljs-deletion">- run[&quot;metrics/accuracy&quot;].log(0.8)</span>
<span class="hljs-addition">+ trackio.config.update({&quot;learning_rate&quot;: 0.01, &quot;batch_size&quot;: 32})</span>
<span class="hljs-addition">+ trackio.log({&quot;loss&quot;: 0.5, &quot;accuracy&quot;: 0.8})</span>
<span class="hljs-deletion">- run.stop()</span>
<span class="hljs-addition">+ trackio.finish()</span><!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="complete-training-loop-migration" 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="#complete-training-loop-migration"><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>Complete Training Loop Migration</span></h3> <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 --><span class="hljs-deletion">- import neptune</span>
<span class="hljs-addition">+ import trackio</span>
import numpy as np
<span class="hljs-deletion">- run = neptune.init_run(</span>
<span class="hljs-deletion">- project=&quot;my-workspace/classification-project&quot;,</span>
<span class="hljs-deletion">- name=&quot;experiment-1&quot;,</span>
<span class="hljs-deletion">- tags=[&quot;pytorch&quot;, &quot;cnn&quot;]</span>
<span class="hljs-deletion">- )</span>
<span class="hljs-addition">+ trackio.init(</span>
<span class="hljs-addition">+ project=&quot;classification-project&quot;,</span>
<span class="hljs-addition">+ name=&quot;experiment-1&quot;,</span>
<span class="hljs-addition">+ tags=[&quot;pytorch&quot;, &quot;cnn&quot;]</span>
<span class="hljs-addition">+ )</span>
config = {&quot;learning_rate&quot;: 0.01, &quot;epochs&quot;: 10, &quot;batch_size&quot;: 32}
<span class="hljs-deletion">- run[&quot;parameters&quot;] = config</span>
<span class="hljs-addition">+ trackio.config.update(config)</span>
for epoch in range(config[&quot;epochs&quot;]):
# Simulate training
train_loss = np.random.random()
val_accuracy = np.random.random()
# Neptune logging
<span class="hljs-deletion">- run[&quot;metrics/train/loss&quot;].log(train_loss)</span>
<span class="hljs-deletion">- run[&quot;metrics/val/accuracy&quot;].log(val_accuracy)</span>
<span class="hljs-deletion">- run[&quot;metrics/epoch&quot;].log(epoch)</span>
# Trackio logging
<span class="hljs-addition">+ trackio.log({</span>
<span class="hljs-addition">+ &quot;train/loss&quot;: train_loss,</span>
<span class="hljs-addition">+ &quot;val/accuracy&quot;: val_accuracy,</span>
<span class="hljs-addition">+ &quot;epoch&quot;: epoch</span>
<span class="hljs-addition">+ })</span>
<span class="hljs-deletion">- run[&quot;model/weights&quot;].upload(&quot;model.pth&quot;)</span>
<span class="hljs-addition">+ trackio.save(&quot;model.pth&quot;)</span>
<span class="hljs-deletion">- run.stop()</span>
<span class="hljs-addition">+ trackio.finish()</span><!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="key-migration-points" 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="#key-migration-points"><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>Key Migration Points</span></h3> <ol data-svelte-h="svelte-1ma4sg"><li><strong>Initialization</strong>: Replace <code>neptune.init_run()</code> with <code>trackio.init()</code></li> <li><strong>Logging</strong>: Use <code>trackio.log()</code> with dictionaries instead of individual metric assignments</li> <li><strong>Cleanup</strong>: Replace <code>run.stop()</code> with <code>trackio.finish()</code></li></ol> <h2 class="relative group"><a id="benefits-to-migrating" 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="#benefits-to-migrating"><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>Benefits to Migrating</span></h2> <ul data-svelte-h="svelte-1y6j6e"><li><strong>Simpler API</strong>: Flat dictionary logging vs nested attribute access</li> <li><strong>Local development</strong>: Work offline by default</li> <li><strong>Free hosting</strong>: Deploy dashboards on Hugging Face Spaces at no cost</li> <li><strong>Familiar interface</strong>: If you’ve used <code>wandb</code> before in particular, the API is unchanged</li></ul> <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/migration.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_12msm3f = {
assets: "/docs/trackio/pr_305/en",
base: "/docs/trackio/pr_305/en",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/trackio/pr_305/en/_app/immutable/entry/start.b7c0274d.js"),
import("/docs/trackio/pr_305/en/_app/immutable/entry/app.661c2968.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 10],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
31.2 kB
·
Xet hash:
54469adf0b98ca5c9bf5fc5da3757a55685c0fdb06d550477c52a29a4e47e531

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