Step-by-step guide for create run, explaining configuration, best practices, and real-world usage on TrueFoundry.
A run is used to represent a single invocation of a job, a script or a ML experiment. You can create a run at the beginning of your script or notebook, log parameters, metrics, artifacts, models, tags and finally end the run. This provides an easy to keep track of all data related to job runs or ML experiments.A quick code snippet to create a run and end it:
from truefoundry.ml import get_clientclient = get_client()run = client.create_run(ml_repo="iris-demo", run_name="svm-model")# Your code here.run.end()
You can organize multiple runs under a single ml_repo. For example, the run svm-model will be created under the ml_repo iris-demo.You can view these runs in the TrueFoundry dashboard.
TrueFoundry Dashboard
Create and end a run
Python
from truefoundry.ml import get_clientclient = get_client()run = client.create_run(ml_repo="iris-demo", run_name="svm-model")# Your code here.run.end()
Add tags to a run
from truefoundry.ml import get_clientclient = get_client()run = client.create_run(ml_repo="iris-demo", run_name="svm-model")run.set_tags({"env": "development", "task": "classification"})# Your code here.run.end()
You can view the tags from the dashboard and also create new tags.
Log parameters
Parameters are used to store the configuration of a run. This can be either the inputs to your script or the hyperparameters of your model during training like learning_rate, cache_size.
The parameter values are stringified before storing.You can log parameters using the log_params as shown below:
Parameters are immutable and you cannot change the value of param once logged. If you need to change the value of param, it basically means that you are changing your input configuration and it’s best to create a new run for that.
Viewing logged parameter in dashboard
Filtering runs bases on parameter value
To filters runs, click on top right corner of the screen to apply the required filter.
Capturing command-line arguments
We can capture command-line arguments directly from the argparse.Namespace object.
Metrics are values that help you to evaluate and compare different runs - for e.g. accuracy, f1 score. You can log any output of your script as a metric.You can capture metrics using the log_metrics method.
These metrics can be seen in TrueFoundry dashboard. Filters can be used on metrics values to filter out runs as shown in the figure.
Metrics Overview
Filter runs on the basis of metrics
Step-wise metric logging
You can capture step-wise metrics too using the step argument.
for global_step in range(1000): run.log_metrics(metric_dict={"accuracy": 0.7, "loss": 0.6}, step=global_step)
The stepwise-metrics can be visualized as graphs in the dashboard.
Step-wise metrics
Should I use epoch or global step as a value for the step argument?
If available you should use the global step as a value for the step argument. To capture epoch-level metric aggregates, you can use the following pattern.
import osfrom truefoundry.ml import get_clientfrom truefoundry.ml import ArtifactPathclient = get_client()run = client.create_run(ml_repo="iris-demo", run_name="svm-model")run.log_params({"cache_size": 200.0, "kernel": "linear"})run.log_metrics(metric_dict={"accuracy": 0.7, "loss": 0.6})# Just creating sample files to log as artifacts# os.makedirs("my-folder", exist_ok=True)# with open("my-folder/file-inside-folder.txt", "w") as f:# f.write("Hello!")# with open("just-a-file.txt", "w") as f:# f.write("Hello from file!")artifact_version = run.log_artifact( name="my-artifact", artifact_paths=[ # Add files and folders here, `ArtifactPath` takes source and destination # source can be single file path or folder path # destination can be file path or folder path # Note: When source is a folder path, destination is always interpreted as folder path ArtifactPath(src="just-a-file.txt"), ArtifactPath(src="my-folder/", dest="cool-dir"), ArtifactPath(src="just-a-file.txt", dest="cool-dir/copied-file.txt") ], description="This is a sample artifact", metadata={"created_by": "my-username"})print(artifact_version.fqn)run.end()
To interact with runs in TrueFoundry, you can use the provided methods in the TrueFoundryClient class. Here are the different possibilities to access runs:
Get a Run by ID
To retrieve an existing run by its ID, use theget_run_by_id method:
You can search for runs that match specific criteria using the search_runs method:
Python
client = TrueFoundryClient()runs = client.search_runs( ml_repo="project_name_here", filter_string="metrics.accuracy > 0.75", order_by=["metric.accuracy DESC"],)for run in runs: print(run)
Get Tags for a Run
You can use the get_tags method. It returns a dictionary.
from truefoundry.ml import get_clientclient = get_client()run = client.get_run("run-id-of-the-run")print(run.get_tags())
Get Parameters for a Run
You can use the get_params method. It returns a dictionary
from truefoundry.ml import get_clientclient = get_client()run = client.get_run("run-id-of-the-run")print(run.get_params())
Get Metrics for a Run
You can use the get_metricsmethod. It returns a dictionary.
from truefoundry.ml import get_clientclient = get_client()run = client.get_run("run-id-of-the-run")metrics = run.get_metrics()for metric_name, metric_history in metrics.items(): print(f"logged metrics for metric {metric_name}:") for metric in metric_history: print(f"value: {metric.value}") print(f"step: {metric.step}") print(f"timestamp_ms: {metric.timestamp}") print("--")run.end()
FAQs
Can anyone create a run under my ml_repo?
You will need to have minimum of Project Editor role to create a run under a ml_repo. Project Viewer role does not have permission to create a run.
Can I use runs as a context manager?
Yes, we can use runs as a context manager. A run will be automatically ended after the execution exits the with block.
client.create_ml_repo("iris-demo")run = client.create_run(ml_repo="iris-demo", run_name="svm-model")with run: # Your code here. ...# No need to call run.end()
Are run names unique?
Yes. run names under a ml_repo are unique. If a run name already exists, we add a suffix to make it unique.
If you do not pass a run name while creating a run, we generate a random name.
from truefoundry.ml import get_clientclient = get_client()run = client.create_run(ml_repo="iris-demo")print(run.run_name)run.end()
How runs are identified?
Runs are identified by by their id.
from truefoundry.ml import get_clientclient = get_client()run = client.create_run(ml_repo="iris-demo")print(run.run_id)run.end()
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TrueFoundry Docs","description":"TrueFoundry documentation — enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","colors":{"primary":"#4f46e5","light":"#4f46e5","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20","dark":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/dark.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=c1cb26554a546d84500b40f7057bece8"},"favicon":"https://mintcdn.com/truefoundry/6bbtTt95c1iCcyph/favicon.svg?fit=max\u0026auto=format\u0026n=6bbtTt95c1iCcyph\u0026q=85\u0026s=f55bde34214b38034126d05b08ea16c7","appearance":{"default":"light"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://www.truefoundry.com/book-demo","label":"Book Demo"},{"href":"https://www.truefoundry.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Sign Up","href":"https://www.truefoundry.com/register"}},"footer":{"socials":{"x":"https://twitter.com/truefoundry","linkedin":"https://in.linkedin.com/company/truefoundry"}},"seo":{"metatags":{"og:type":"website","og:site_name":"TrueFoundry Docs","og:image":"https://assets.production.truefoundry.com/logo.svg","og:description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane."}},"icons":{"library":"fontawesome"},"styling":{"codeblocks":"dark","latex":true},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"truefoundry","hasAudioNarration":false,"actualSubdomain":"truefoundry","customDomains":["www.truefoundry.com"],"gitSource":{"type":"github","owner":"truefoundry","repo":"docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af72ced07e6a796f0fe3566","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"AI Gateway","count":246},{"language":"default","tag":"API Reference","count":202},{"language":"default","tag":"Platform","count":196},{"language":"default","tag":"Integrations","count":132},{"language":"default","tag":"LLM Gateway","count":113},{"language":"default","tag":"AI Deployment","count":109},{"language":"default","tag":"Integrate Models","count":50},{"language":"default","tag":"Observability","count":47},{"language":"default","tag":"Guardrails and Security","count":46},{"language":"default","tag":"MCP Servers","count":44}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@truefoundry.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".line-highlight{background:rgb(var(--primary-light)/.7)!important}.tfy-cat-anchor{scroll-margin-top:6rem;margin-block:1.75rem}.line-highlight:before{background:rgb(var(--primary-light)/.7)!important}.line-highlight:after{background:rgb(var(--primary-light)/.7)!important}"}],"page":{"pagePath":"docs/create-run","slug":"/docs/create-run","pageMetadata":{"title":"Create Runs and Log Data","description":"Step-by-step guide for create run, explaining configuration, best practices, and real-world usage on TrueFoundry.","href":"/docs/create-run"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Step-by-step guide for create run, explaining configuration, best practices, and real-world usage on TrueFoundry.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,br:`br`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,CodeGroup,Frame,Heading,Info,OptimizedImage}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`A run is used to represent a single invocation of a job, a script or a ML experiment. You can create a run at the beginning of your script or notebook, log parameters, metrics, artifacts, models, tags and finally end the run. This provides an easy to keep track of all data related to job runs or ML experiments.`}),`\n`,_jsx(_components.p,{children:`A quick code snippet to create a run and end it:`}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`run_name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"svm-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Your code here.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can organize multiple runs under a single ml_repo. For example, the run `,_jsx(_components.code,{children:`svm-model`}),` will be created under the ml_repo `,_jsx(_components.code,{children:`iris-demo`}),`.`]}),`\n`,_jsx(_components.p,{children:`You can view these runs in the TrueFoundry dashboard.`}),`\n`,_jsx(Frame,{caption:`TrueFoundry Dashboard`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/9e148d23-7fa8afc-mlfoundry_dashboard.png?fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=c4d9d3c9021f55aa43942f45bb2dd31d`,\"data-og-width\":`3022`,width:`3022`,\"data-og-height\":`1474`,height:`1474`,\"data-path\":`images/9e148d23-7fa8afc-mlfoundry_dashboard.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/9e148d23-7fa8afc-mlfoundry_dashboard.png?w=280\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=0efae1e953b2c2ea9d738a23042e77e1 280w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/9e148d23-7fa8afc-mlfoundry_dashboard.png?w=560\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=3232f2a7cb76e4e1428b3fbe0b72c371 560w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/9e148d23-7fa8afc-mlfoundry_dashboard.png?w=840\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=f406fd8ed4829830ee3d58f7116053a5 840w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/9e148d23-7fa8afc-mlfoundry_dashboard.png?w=1100\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=f0546b158bfd62b26f7125b51ef9986a 1100w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/9e148d23-7fa8afc-mlfoundry_dashboard.png?w=1650\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=78126542db1490fd8877577b1fa0c35a 1650w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/9e148d23-7fa8afc-mlfoundry_dashboard.png?w=2500\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=5fd61a80ce38b460052eadb59225d0c4 2500w`})}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Create and end a run`,id:`create-and-end-a-run`,children:_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`run_name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"svm-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Your code here.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})})}),_jsxs(Accordion,{title:`Add tags to a run`,id:`add-tags-to-a-run`,children:[_jsx(CodeBlock,{filename:``,lines:`true`,highlight:`[5]`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`run_name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"svm-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.set_tags({`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"env\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"development\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"task\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"classification\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Your code here.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})}),_jsx(_components.p,{children:`You can view the tags from the dashboard and also create new tags.`}),_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/4MAaF__cLD4iud16/images/6e1f1d92-4251517-Adding_Tags.png?fit=max\u0026auto=format\u0026n=4MAaF__cLD4iud16\u0026q=85\u0026s=b0f1e0f0bd65b3d323670e079572c2aa`,\"data-og-width\":`2890`,width:`2890`,\"data-og-height\":`1220`,height:`1220`,\"data-path\":`images/6e1f1d92-4251517-Adding_Tags.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/4MAaF__cLD4iud16/images/6e1f1d92-4251517-Adding_Tags.png?w=280\u0026fit=max\u0026auto=format\u0026n=4MAaF__cLD4iud16\u0026q=85\u0026s=3ed39acc5500ffede9667c8374fabb11 280w, https://mintcdn.com/truefoundry/4MAaF__cLD4iud16/images/6e1f1d92-4251517-Adding_Tags.png?w=560\u0026fit=max\u0026auto=format\u0026n=4MAaF__cLD4iud16\u0026q=85\u0026s=396748dbdd4894a7a2e6889c0b6cab01 560w, https://mintcdn.com/truefoundry/4MAaF__cLD4iud16/images/6e1f1d92-4251517-Adding_Tags.png?w=840\u0026fit=max\u0026auto=format\u0026n=4MAaF__cLD4iud16\u0026q=85\u0026s=d4889e33b12d57bb886cadbbe1f905af 840w, https://mintcdn.com/truefoundry/4MAaF__cLD4iud16/images/6e1f1d92-4251517-Adding_Tags.png?w=1100\u0026fit=max\u0026auto=format\u0026n=4MAaF__cLD4iud16\u0026q=85\u0026s=af3f92f3f1d5b9ab8415e56e7c430006 1100w, https://mintcdn.com/truefoundry/4MAaF__cLD4iud16/images/6e1f1d92-4251517-Adding_Tags.png?w=1650\u0026fit=max\u0026auto=format\u0026n=4MAaF__cLD4iud16\u0026q=85\u0026s=c5d952df387bd43918ad0bcf670a0e37 1650w, https://mintcdn.com/truefoundry/4MAaF__cLD4iud16/images/6e1f1d92-4251517-Adding_Tags.png?w=2500\u0026fit=max\u0026auto=format\u0026n=4MAaF__cLD4iud16\u0026q=85\u0026s=1f1d12c22ad606263f68be1bcc41268e 2500w`})]}),_jsxs(Accordion,{title:`Log parameters`,id:`log-parameters`,children:[_jsxs(_components.p,{children:[`Parameters are used to store the configuration of a run. This can be either the inputs to your script or the hyperparameters of your model during training like `,_jsx(_components.code,{children:`learning_rate`}),`, `,_jsx(_components.code,{children:`cache_size`}),`.\nThe parameter values are stringified before storing.`]}),_jsxs(_components.p,{children:[`You can log parameters using the `,_jsx(_components.code,{children:`log_params`}),` as shown below:`]}),_jsx(CodeBlock,{filename:``,lines:`true`,highlight:`[6]`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`run_name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"svm-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_params({`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cache_size\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`200.0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"kernel\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"linear\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})}),_jsx(Info,{children:_jsx(_components.p,{children:`Parameters are immutable and you cannot change the value of param once logged. If you need to change the value of param, it basically means that you are changing your input configuration and it’s best to create a new run for that.`})}),_jsx(Heading,{level:`4`,id:`viewing-logged-parameter-in-dashboard`,children:`Viewing logged parameter in dashboard`}),_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/7f64f35d-be7bcf3-View_logged.png?fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=06dd74445948dfa766a35ce254252385`,\"data-og-width\":`3022`,width:`3022`,\"data-og-height\":`1140`,height:`1140`,\"data-path\":`images/7f64f35d-be7bcf3-View_logged.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/7f64f35d-be7bcf3-View_logged.png?w=280\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=f93427b2de59c26fb2144f51b8a28d63 280w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/7f64f35d-be7bcf3-View_logged.png?w=560\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=5bd48da16dd1b68111292acb9e6e2509 560w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/7f64f35d-be7bcf3-View_logged.png?w=840\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=aedcf469eca3fb0fd38a7b231bd545c5 840w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/7f64f35d-be7bcf3-View_logged.png?w=1100\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=ecebe4d58c315d0514be94ba26cb3934 1100w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/7f64f35d-be7bcf3-View_logged.png?w=1650\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=760a991f11f0fae2066aa7ecfb85aa16 1650w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/7f64f35d-be7bcf3-View_logged.png?w=2500\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=bf481a6f33c2ba4dde15fe09dd365511 2500w`}),_jsx(Heading,{level:`4`,id:`filtering-runs-bases-on-parameter-value`,children:`Filtering runs bases on parameter value`}),_jsx(_components.p,{children:`To filters runs, click on top right corner of the screen to apply the required filter.`}),_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/qZ3yGXZg_Nz17sVV/images/e68b6fe3-9c3da3d-param.png?fit=max\u0026auto=format\u0026n=qZ3yGXZg_Nz17sVV\u0026q=85\u0026s=f484fea6fdb0120cb65817b5762129c1`,\"data-og-width\":`3022`,width:`3022`,\"data-og-height\":`782`,height:`782`,\"data-path\":`images/e68b6fe3-9c3da3d-param.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/qZ3yGXZg_Nz17sVV/images/e68b6fe3-9c3da3d-param.png?w=280\u0026fit=max\u0026auto=format\u0026n=qZ3yGXZg_Nz17sVV\u0026q=85\u0026s=2fd0ba5adfc211509be22d810a126232 280w, https://mintcdn.com/truefoundry/qZ3yGXZg_Nz17sVV/images/e68b6fe3-9c3da3d-param.png?w=560\u0026fit=max\u0026auto=format\u0026n=qZ3yGXZg_Nz17sVV\u0026q=85\u0026s=688ac618c45af8314a614fed60865505 560w, https://mintcdn.com/truefoundry/qZ3yGXZg_Nz17sVV/images/e68b6fe3-9c3da3d-param.png?w=840\u0026fit=max\u0026auto=format\u0026n=qZ3yGXZg_Nz17sVV\u0026q=85\u0026s=2136edf7a5fca61efce8b77bea25ae37 840w, https://mintcdn.com/truefoundry/qZ3yGXZg_Nz17sVV/images/e68b6fe3-9c3da3d-param.png?w=1100\u0026fit=max\u0026auto=format\u0026n=qZ3yGXZg_Nz17sVV\u0026q=85\u0026s=73c64f9aa595e7e22d977f5933d9ae0b 1100w, https://mintcdn.com/truefoundry/qZ3yGXZg_Nz17sVV/images/e68b6fe3-9c3da3d-param.png?w=1650\u0026fit=max\u0026auto=format\u0026n=qZ3yGXZg_Nz17sVV\u0026q=85\u0026s=0ed6cdd50f4d092063079f590e9c3c48 1650w, https://mintcdn.com/truefoundry/qZ3yGXZg_Nz17sVV/images/e68b6fe3-9c3da3d-param.png?w=2500\u0026fit=max\u0026auto=format\u0026n=qZ3yGXZg_Nz17sVV\u0026q=85\u0026s=d0a611819e89b16b0bbdce7275ee8f29 2500w`}),_jsx(Heading,{level:`4`,id:`capturing-command-line-arguments`,children:`Capturing command-line arguments`}),_jsxs(_components.p,{children:[`We can capture command-line arguments directly from the `,_jsx(_components.code,{children:`argparse.Namespace`}),` object.`]}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` argparse`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`parser = argparse.ArgumentParser()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`parser.add_argument(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"--batch_size\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`type`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:`int`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`required`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`args = parser.parse_args()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_params(args)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})})})]}),_jsxs(Accordion,{title:`Log metrics`,id:`log-metrics`,children:[_jsxs(_components.p,{children:[`Metrics are values that help you to evaluate and compare different runs - for e.g. `,_jsx(_components.code,{children:`accuracy`}),`, `,_jsx(_components.code,{children:`f1 score`}),`. You can log any output of your script as a metric.`]}),_jsxs(_components.p,{children:[`You can capture metrics using the `,_jsx(_components.a,{href:`/docs/truefoundry-ml-reference/runs#function-log-metrics`,children:_jsx(_components.code,{children:`log_metrics`})}),` method.`]}),_jsx(CodeBlock,{filename:``,lines:`true`,highlight:`[6]`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`run_name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"svm-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_params({`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cache_size\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`200.0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"kernel\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"linear\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_metrics(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`metric_dict`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`={`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"loss\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.6`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})}),_jsx(_components.p,{children:`These metrics can be seen in TrueFoundry dashboard. Filters can be used on metrics values to filter out runs as shown in the figure.`}),_jsx(Frame,{caption:`Metrics Overview`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/DdP_2rhue4AQQlob/images/2dac81ef-7983f19-filter2.png?fit=max\u0026auto=format\u0026n=DdP_2rhue4AQQlob\u0026q=85\u0026s=26c4bdde91c9887db74d7c2f8ff654a8`,\"data-og-width\":`3022`,width:`3022`,\"data-og-height\":`1730`,height:`1730`,\"data-path\":`images/2dac81ef-7983f19-filter2.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/DdP_2rhue4AQQlob/images/2dac81ef-7983f19-filter2.png?w=280\u0026fit=max\u0026auto=format\u0026n=DdP_2rhue4AQQlob\u0026q=85\u0026s=909ddb7ac3dde22168b26c3412b7b4a2 280w, https://mintcdn.com/truefoundry/DdP_2rhue4AQQlob/images/2dac81ef-7983f19-filter2.png?w=560\u0026fit=max\u0026auto=format\u0026n=DdP_2rhue4AQQlob\u0026q=85\u0026s=ebf618c44023411f6c1c0ac3b138635f 560w, https://mintcdn.com/truefoundry/DdP_2rhue4AQQlob/images/2dac81ef-7983f19-filter2.png?w=840\u0026fit=max\u0026auto=format\u0026n=DdP_2rhue4AQQlob\u0026q=85\u0026s=be21d7831c3bca0c9d523e02112c7703 840w, https://mintcdn.com/truefoundry/DdP_2rhue4AQQlob/images/2dac81ef-7983f19-filter2.png?w=1100\u0026fit=max\u0026auto=format\u0026n=DdP_2rhue4AQQlob\u0026q=85\u0026s=7586993ae1be8ed27d87d162071bfc0b 1100w, https://mintcdn.com/truefoundry/DdP_2rhue4AQQlob/images/2dac81ef-7983f19-filter2.png?w=1650\u0026fit=max\u0026auto=format\u0026n=DdP_2rhue4AQQlob\u0026q=85\u0026s=08b79782cfb41dbf40accf9787322e24 1650w, https://mintcdn.com/truefoundry/DdP_2rhue4AQQlob/images/2dac81ef-7983f19-filter2.png?w=2500\u0026fit=max\u0026auto=format\u0026n=DdP_2rhue4AQQlob\u0026q=85\u0026s=88346482c268013449a169dee3661ffc 2500w`})}),_jsx(Frame,{caption:`Filter runs on the basis of metrics`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/86e6cdb0-82b97e0-filter1.png?fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=0a8e6515c441ee9373b598b00d190a61`,\"data-og-width\":`3022`,width:`3022`,\"data-og-height\":`928`,height:`928`,\"data-path\":`images/86e6cdb0-82b97e0-filter1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/86e6cdb0-82b97e0-filter1.png?w=280\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=4df11585b95763db858b61b3db0e6ab5 280w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/86e6cdb0-82b97e0-filter1.png?w=560\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=3257d6287f9b373b783bb3f551ab3cdd 560w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/86e6cdb0-82b97e0-filter1.png?w=840\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=55a91ecb129ee66df532eda00db095ab 840w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/86e6cdb0-82b97e0-filter1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=9065ad3d38f72e3ee7880dea39413c8f 1100w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/86e6cdb0-82b97e0-filter1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=f35960247985cf1166e37e1a0dccf344 1650w, https://mintcdn.com/truefoundry/s4Aj2_qGCrSP-zc8/images/86e6cdb0-82b97e0-filter1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=s4Aj2_qGCrSP-zc8\u0026q=85\u0026s=42f7eb615b9ff8807f476e0be6931159 2500w`})}),_jsx(Heading,{level:`3`,id:`step-wise-metric-logging`,children:`Step-wise metric logging`}),_jsxs(_components.p,{children:[`You can capture step-wise metrics too using the `,_jsx(_components.code,{children:`step`}),` argument.`]}),_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` global_step `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` range`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1000`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` run.log_metrics(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`metric_dict`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`={`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"loss\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.6`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`step`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=global_step)`})]}),`\n`]})})}),_jsx(_components.p,{children:`The stepwise-metrics can be visualized as graphs in the dashboard.`}),_jsx(Frame,{caption:`Step-wise metrics`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/PSBc0bX31_cIC7pm/images/d7d1514e-7a516f2-filter3.png?fit=max\u0026auto=format\u0026n=PSBc0bX31_cIC7pm\u0026q=85\u0026s=957e2b9f32497f21786b69714386c1ef`,\"data-og-width\":`3022`,width:`3022`,\"data-og-height\":`1610`,height:`1610`,\"data-path\":`images/d7d1514e-7a516f2-filter3.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/PSBc0bX31_cIC7pm/images/d7d1514e-7a516f2-filter3.png?w=280\u0026fit=max\u0026auto=format\u0026n=PSBc0bX31_cIC7pm\u0026q=85\u0026s=ea4b6cf5b552afbaa3bfe96cd9a17929 280w, https://mintcdn.com/truefoundry/PSBc0bX31_cIC7pm/images/d7d1514e-7a516f2-filter3.png?w=560\u0026fit=max\u0026auto=format\u0026n=PSBc0bX31_cIC7pm\u0026q=85\u0026s=8253a5a6ff15a70873f1f711d31cf29c 560w, https://mintcdn.com/truefoundry/PSBc0bX31_cIC7pm/images/d7d1514e-7a516f2-filter3.png?w=840\u0026fit=max\u0026auto=format\u0026n=PSBc0bX31_cIC7pm\u0026q=85\u0026s=9e7773a2a6c700bae69988fd96f97e95 840w, https://mintcdn.com/truefoundry/PSBc0bX31_cIC7pm/images/d7d1514e-7a516f2-filter3.png?w=1100\u0026fit=max\u0026auto=format\u0026n=PSBc0bX31_cIC7pm\u0026q=85\u0026s=67b2c36b8e14409801af1e6e5fa4bc14 1100w, https://mintcdn.com/truefoundry/PSBc0bX31_cIC7pm/images/d7d1514e-7a516f2-filter3.png?w=1650\u0026fit=max\u0026auto=format\u0026n=PSBc0bX31_cIC7pm\u0026q=85\u0026s=87134811c03e053e72c7ed608367de94 1650w, https://mintcdn.com/truefoundry/PSBc0bX31_cIC7pm/images/d7d1514e-7a516f2-filter3.png?w=2500\u0026fit=max\u0026auto=format\u0026n=PSBc0bX31_cIC7pm\u0026q=85\u0026s=639af3ecb12ebb10cf9adf444939a74f 2500w`})}),_jsxs(Heading,{level:`4`,id:`should-i-use-epoch-or-global-step-as-a-value-for-the-step-argument%3F`,children:[`Should I use epoch or global step as a value for the `,_jsx(_components.code,{children:`step`}),` argument?`]}),_jsxs(_components.p,{children:[`If available you should use the global step as a value for the `,_jsx(_components.code,{children:`step`}),` argument. To capture epoch-level metric aggregates, you can use the following pattern.`]}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_metrics(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` (metric_dict = { `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"epoch/train_accuracy\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, epoch: epoch }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` (step = global_step)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#F44747`,\"--shiki-dark\":`#F44747`},children:`;`})]}),`\n`]})})})})]}),_jsx(Accordion,{title:`Log Artifacts`,id:`log-artifacts`,children:_jsx(CodeBlock,{filename:``,lines:`true`,highlight:`[18,19,20,21,22,23,24,25,26,27,28,29,30,31]`,numberOfLines:`33`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ArtifactPath`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`run_name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"svm-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_params({`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cache_size\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`200.0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"kernel\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"linear\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_metrics(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`metric_dict`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`={`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"loss\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.6`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Just creating sample files to log as artifacts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# os.makedirs(\"my-folder\", exist_ok=True)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# with open(\"my-folder/file-inside-folder.txt\", \"w\") as f:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# f.write(\"Hello!\")`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# with open(\"just-a-file.txt\", \"w\") as f:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# f.write(\"Hello from file!\")`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`artifact_version = run.log_artifact(`})}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"my-artifact\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` artifact_paths`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=[`})]}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:\" # Add files and folders here, `ArtifactPath` takes source and destination\"})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # source can be single file path or folder path`})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # destination can be file path or folder path`})}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # Note: When source is a folder path, destination is always interpreted as folder path`})}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ArtifactPath(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`src`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"just-a-file.txt\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ArtifactPath(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`src`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"my-folder/\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`dest`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cool-dir\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ArtifactPath(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`src`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"just-a-file.txt\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`dest`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cool-dir/copied-file.txt\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` description`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"This is a sample artifact\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` metadata`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`={`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"created_by\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"my-username\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(artifact_version.fqn)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})})}),_jsx(Accordion,{title:`Log Models`,id:`log-models`,children:_jsx(CodeBlock,{filename:``,lines:`true`,highlight:`[8,9,10,11,12]`,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`run_name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"svm-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_params({`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cache_size\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`200.0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"kernel\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"linear\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.log_metrics(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`metric_dict`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`={`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"loss\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.6`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`model_version = run.log_model(`})}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"name-for-the-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` model_file_or_folder`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"path/to/model/file/or/folder/on/disk\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` framework`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` or`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` Framework> `}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Check `})]}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`accessing-runs-in-truefoundry`,children:`Accessing Runs in TrueFoundry`}),`\n`,_jsx(_components.p,{children:`To interact with runs in TrueFoundry, you can use the provided methods in the TrueFoundryClient class. Here are the different possibilities to access runs:`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Get a Run by ID`,id:`get-a-run-by-id`,children:[_jsxs(_components.p,{children:[`To retrieve an existing run by its ID, use the`,_jsx(_components.a,{href:`/docs/mlfoundry#function-get-run-by-id`,children:_jsx(_components.code,{children:`get_run_by_id`})}),` method:`]}),_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = TrueFoundryClient()`}),_jsx(_components.span,{style:{color:`#F44747`,\"--shiki-dark\":`#F44747`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.get_run_by_id(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"run_id_here\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#F44747`,\"--shiki-dark\":`#F44747`},children:`;`})]}),`\n`]})})})]}),_jsxs(Accordion,{title:`Get a Run by Fully Qualified Name (FQN)`,id:`get-a-run-by-fully-qualified-name-fqn`,children:[_jsxs(_components.p,{children:[`If you have the fully qualified name (FQN) of a run, which follows the pattern tenant_name/ml_repo/run_name, you can use the `,_jsx(_components.code,{children:`get_run_by_fqn`}),` method:`]}),_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = TrueFoundryClient()`}),_jsx(_components.span,{style:{color:`#F44747`,\"--shiki-dark\":`#F44747`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.get_run_by_fqn(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"tenant_name/ml_repo/run_name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#F44747`,\"--shiki-dark\":`#F44747`},children:`;`})]}),`\n`]})})})]}),_jsxs(Accordion,{title:`Get All Runs for a Project`,id:`get-all-runs-for-a-project`,children:[_jsxs(_components.p,{children:[`To retrieve all the runs’ names and IDs for a project, use the `,_jsx(_components.a,{href:`/docs/mlfoundry#function-get-all-runs`,children:_jsx(_components.code,{children:`get_all_runs`})}),` method:`]}),_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = TrueFoundryClient()`}),_jsx(_components.span,{style:{color:`#F44747`,\"--shiki-dark\":`#F44747`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`runs_df = client.get_all_runs((ml_repo = `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"project_name_here\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`))`}),_jsx(_components.span,{style:{color:`#F44747`,\"--shiki-dark\":`#F44747`},children:`;`})]}),`\n`]})})})]}),_jsxs(Accordion,{title:`Search Runs`,id:`search-runs`,children:[_jsxs(_components.p,{children:[`You can search for runs that match specific criteria using the `,_jsx(_components.a,{href:`/docs/mlfoundry#function-search-runs`,children:_jsx(_components.code,{children:`search_runs`})}),` method:`]}),_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = TrueFoundryClient()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`runs = client.search_runs(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"project_name_here\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` filter_string`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"metrics.accuracy > 0.75\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` order_by`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"metric.accuracy DESC\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` run `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` runs:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(run)`})]}),`\n`]})})})]}),_jsxs(Accordion,{title:`Get Tags for a Run`,id:`get-tags-for-a-run`,children:[_jsxs(_components.p,{children:[`You can use the `,_jsx(_components.code,{children:`get_tags`}),` method. It returns a dictionary.`]}),_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.get_run(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"run-id-of-the-run\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(run.get_tags())`})]}),`\n`]})})})]}),_jsxs(Accordion,{title:`Get Parameters for a Run`,id:`get-parameters-for-a-run`,children:[_jsxs(_components.p,{children:[`You can use the `,_jsx(_components.a,{href:`/docs/truefoundry-ml-reference/runs#function-get-params`,children:_jsx(_components.code,{children:`get_params`})}),` method. It returns a dictionary`]}),_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.get_run(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"run-id-of-the-run\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(run.get_params())`})]}),`\n`]})})})]}),_jsxs(Accordion,{title:`Get Metrics for a Run`,id:`get-metrics-for-a-run`,children:[_jsxs(_components.p,{children:[`You can use the `,_jsx(_components.code,{children:`get_metrics`}),`method. It returns a dictionary.`]}),_jsx(CodeBlock,{filename:``,lines:`true`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.get_run(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"run-id-of-the-run\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`metrics = run.get_metrics()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` metric_name, metric_history `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` metrics.items():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"logged metrics for metric `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`metric_name`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`:\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` metric `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` metric_history:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"value: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`metric.value`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"step: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`metric.step`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"timestamp_ms: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`metric.timestamp`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"--\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`faqs`,children:`FAQs`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Can anyone create a run under my ml_repo?`,id:`can-anyone-create-a-run-under-my-ml-repo`,children:_jsxs(_components.p,{children:[`You will need to have minimum of `,_jsx(_components.code,{children:`Project Editor`}),` role to create a run under a ml_repo. `,_jsx(_components.code,{children:`Project Viewer`}),` role does not have permission to create a run.`]})}),_jsxs(Accordion,{title:`Can I use runs as a context manager?`,id:`can-i-use-runs-as-a-context-manager`,children:[_jsxs(_components.p,{children:[`Yes, we can use runs as a context manager. A run will be automatically ended after the execution exits the `,_jsx(_components.code,{children:`with`}),` block.`]}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client.create_ml_repo(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`run_name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"svm-model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` run:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # Your code here.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# No need to call run.end()`})}),`\n`]})})})})]}),_jsxs(Accordion,{title:`Are run names unique?`,id:`are-run-names-unique`,children:[_jsxs(_components.p,{children:[`Yes. run names under a ml_repo are unique. If a run name already exists, we add a suffix to make it unique.`,_jsx(_components.br,{}),`\n`,`If you do not pass a run name while creating a run, we generate a random name.`]}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(run.run_name)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})})})]}),_jsxs(Accordion,{title:`How runs are identified?`,id:`how-runs-are-identified`,children:[_jsxs(_components.p,{children:[`Runs are identified by by their `,_jsx(_components.code,{children:`id`}),`.`]}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,lines:`true`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` truefoundry.ml `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` get_client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`client = get_client()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run = client.create_run(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`ml_repo`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"iris-demo\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(run.run_id)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`run.end()`})}),`\n`]})})})})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Create Runs and Log Data","description":"Step-by-step guide for create run, explaining configuration, best practices, and real-world usage on TrueFoundry.","href":"/docs/create-run"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Accessing Runs in TrueFoundry","slug":"accessing-runs-in-truefoundry","depth":2,"children":[]},{"title":"FAQs","slug":"faqs","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/truefoundry/9e0085f7ed271180/scripts.js"],"subdomain":"truefoundry","siteName":"TrueFoundry Docs","title":"Create Runs and Log Data - TrueFoundry Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T07:27:51.532Z","originalFileLocation":"docs/create-run.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Step-by-step guide for create run, explaining configuration, best practices, and real-world usage on TrueFoundry.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Runs and Log Data - TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.truefoundry.com/docs/create-run\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Runs and Log Data - TrueFoundry Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.truefoundry.com/docs/create-run\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/create-run.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.truefoundry.com/#organization\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.truefoundry.com#website\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.truefoundry.com/docs/create-run#webpage\",\"url\":\"https://www.truefoundry.com/docs/create-run\",\"name\":\"Create Runs and Log Data\",\"description\":\"Step-by-step guide for create run, explaining configuration, best practices, and real-world usage on TrueFoundry.\",\"dateModified\":\"2026-11-13T07:27:51.532Z\",\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.truefoundry.com/docs/create-run#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.truefoundry.com/docs/create-run#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Experiment Tracking\",\"item\":\"https://www.truefoundry.com/docs/ml-repo-quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Runs and Log Data\",\"item\":\"https://www.truefoundry.com/docs/create-run\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.truefoundry.com/docs/create-run#article\",\"headline\":\"Create Runs and Log Data\",\"name\":\"Create Runs and Log Data\",\"description\":\"Step-by-step guide for create run, explaining configuration, best practices, and real-world usage on TrueFoundry.\",\"url\":\"https://www.truefoundry.com/docs/create-run\",\"mainEntityOfPage\":{\"@id\":\"https://www.truefoundry.com/docs/create-run#webpage\"},\"image\":\"https://assets.production.truefoundry.com/logo.svg\",\"dateModified\":\"2026-11-13T07:27:51.532Z\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TrueFoundry Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TrueFoundry Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/create-run.md","siteName":"TrueFoundry Docs","nav":{"global":null,"tabs":[{"tab":"AI Gateway","pages":[{"title":"AI Gateway","href":"/docs/ai-gateway/intro-to-llm-gateway"}]},{"tab":"Agent Platform","pages":[{"title":"Agent Platform","href":"/docs/agent-platform/agent-harness/overview"}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/docs/platform/overview"}]},{"tab":"AI Deployment","groups":[{"group":"Introduction","pages":[{"title":"Introduction to AI Deployment","sidebarTitle":"Overview","href":"/docs/ai-deployment-overview"},{"title":"Key Concepts","href":"/docs/key-concepts"}]},{"group":"Train and Deploy Models","pages":[{"title":"Model Deployment Introduction","sidebarTitle":"Introduction","href":"/docs/model-deployment-introduction"},{"group":"Develop and Iterate","pages":[{"title":"Launch Jupyter Notebook","href":"/docs/launch-notebooks"},{"title":"Launch a SSH Server","href":"/docs/launch-an-ssh-server"},{"title":"Launch Notebook with Spark","href":"/docs/launch-notebook-with-spark"}]},{"title":"Model Registry","href":"/docs/model-registry"},{"group":"Deploy Model As API","pages":[{"title":"Model Deployment Overview","sidebarTitle":"Overview","href":"/docs/model-deployment/overview"},{"title":"HuggingFace","href":"/docs/model-deployment/deploy-model-from-huggingface"},{"title":"Scikit Learn / XGBoost","href":"/docs/model-deployment/deploy-sklearn-xgboost"},{"title":"FastAPI","href":"/docs/model-deployment/deploy-model-fastapi"},{"title":"LitServe","href":"/docs/model-deployment/deploy-litserve"},{"title":"AWS Multi-Model Server","href":"/docs/model-deployment/deploy-model-mms"},{"title":"TorchServe","href":"/docs/model-deployment/deploy-torchserve"},{"title":"TensorFlow Serve (TFServe)","href":"/docs/model-deployment/deploy-tfserve"},{"title":"MlFlow","href":"/docs/model-deployment/deploy-model-mlflow"},{"title":"Migrate Sagemaker Pytorch Endpoint","href":"/docs/model-deployment/migrate-from-sagemaker-pytorch-endpoint"}]}]},{"group":"Service Deployment","pages":[{"title":"Introduction","href":"/docs/introduction-to-a-service"},{"title":"Deploy Your First Service","sidebarTitle":"Getting Started","href":"/docs/deploy-first-service"},{"group":"Configuring your service","pages":[{"title":"Dockerize Your Code","href":"/docs/dockerize-code"},{"title":"Define Ports And Domains","href":"/docs/define-ports-and-domains"},{"title":"Add authentication to your Endpoints","sidebarTitle":"Endpoint Authentication","href":"/docs/endpoint-authentication"},{"group":"Resources","pages":[{"title":"Set Resources","href":"/docs/resources-cpu-memory-storage"},{"title":"Using Fractional GPUs","href":"/docs/using-fractional-gpus"},{"title":"Using TPUs","href":"/docs/using-tpus"}]},{"title":"Environment Variables \u0026 Secrets","sidebarTitle":"Environment Variables And Secrets","href":"/docs/environment-variables-and-secrets"},{"title":"Autoscaling Overview","sidebarTitle":"Autoscaling","href":"/docs/autoscaling-overview"},{"title":"Pause / Resume Service","href":"/docs/pause-resume-service"},{"title":"Scale Service to 0","href":"/docs/scale-service-to-0"},{"title":"Liveness/Readiness Probe","href":"/docs/liveness-readiness-probe"},{"title":"Rollout Strategy","href":"/docs/rollout-strategy"},{"title":"Access Cloud Services Like S3","href":"/docs/access-data-from-s3-or-other-clouds-services"},{"title":"Download Models/Artifacts","href":"/docs/download-and-cache-models"},{"title":"Redirect And Mirror Traffic","href":"/docs/intercepts"},{"title":"Kustomize Support","href":"/docs/kustomize"},{"title":"Sticky Routing","href":"/docs/sticky-routing"},{"title":"Mounting Volumes/Files","href":"/docs/mounting-volumes-service"},{"title":"Deploy a Service Programmatically","sidebarTitle":"Deploy Programatically","href":"/docs/deploy-service-programatically"},{"title":"Set Up CI/CD","href":"/docs/setting-up-cicd-for-your-service"},{"title":"Update, Rollback, Promote","href":"/docs/update-rollback-promote-your-service"},{"title":"View Logs, Metrics And Events","href":"/docs/monitor-your-service"},{"title":"Log \u0026 Monitor Custom Metrics","href":"/docs/log-monitor-custom-metrics"},{"title":"Setup Alerts","href":"/docs/setup-alerts"},{"title":"Docker Build Secrets","href":"/docs/docker-build-secrets"}]}]},{"group":"Job Deployment","pages":[{"title":"Jobs Introduction","sidebarTitle":"Introduction","href":"/docs/introduction-to-a-job"},{"title":"Deploy Job from GitHub","sidebarTitle":"Getting Started","href":"/docs/deploy-job-from-a-public-github-repository"},{"group":"Configuring your Job","pages":[{"title":"Parameterize A Job","href":"/docs/deploy-a-job-with-additional-parameters"},{"title":"Env Variables \u0026 Secrets for Jobs","sidebarTitle":"Environment Variables And Secrets","href":"/docs/environment-variables-and-secrets-jobs"},{"title":"Mounting Volumes","href":"/docs/mounting-volumes-job"},{"title":"Set Retries And Timeout","href":"/docs/retries-and-timeout"},{"title":"Set Concurrency Limit","href":"/docs/concurrency-limits"},{"title":"Deploy a Job Programmatically","sidebarTitle":"Deploy Programatically","href":"/docs/deploy-job-programatically"},{"title":"Monitor Your Job","href":"/docs/monitor-your-job"},{"title":"Access Data From S3 Or Other Clouds","href":"/docs/access-data-from-s3-or-other-clouds-jobs"},{"title":"Add Alerts To Your Job","href":"/docs/add-alerts-to-your-job"},{"title":"Logging Data in Job Runs","href":"/docs/job-runs-and-logging"}]},{"group":"Configuring your Spark Job","pages":[{"title":"Use blob storage with your Spark job","href":"/docs/deploy-a-spark-job-with-blob-storage"},{"title":"JVM metrics for Spark jobs","href":"/docs/spark-job-jvm-metrics"}]}]},{"group":"LLM Deployment","pages":[{"title":"Deploying LLMs","href":"/docs/deploying-an-llm-model-from-the-model-catalogue"},{"title":"Deploying NVIDIA NIM Models","href":"/docs/deploying-nvidia-nims"},{"title":"Benchmarking LLMs","href":"/docs/benchmarking-llms"}]},{"group":"LLM Finetuning","pages":[{"title":"Finetuning LLMs","href":"/docs/finetuning-a-model-from-the-model-catalogue"}]},{"group":"MCP Server Deployment","pages":[{"title":"MCP Server Deployment Overview","sidebarTitle":"Overview","href":"/docs/mcp-server-deployment/mcp-server-deployment-overview"},{"title":"Deploy MCP Server From Code","sidebarTitle":"Deploy From Code","href":"/docs/mcp-server-deployment/deploy-mcp-server-from-code"},{"title":"Deploy MCP Server from npx/uvx","sidebarTitle":"Deploy from npx/uvx","href":"/docs/mcp-server-deployment/deploy-mcp-server-from-npx-uvx"}]},{"group":"Workflow Deployment","pages":[{"title":"Introduction To Workflow","href":"/docs/introduction-to-workflow"},{"title":"Creating Your First Workflow","href":"/docs/creating-your-first-workflow"},{"title":"Interacting With Workflow","href":"/docs/interacting-with-workflow"},{"title":"Workflow Concepts","href":"/docs/workflow-concepts"},{"group":"Guides","pages":[{"title":"Creating A Workflow With Different Container Images","href":"/docs/creating-a-workflow-with-gpu-and-non-gpu-image"},{"title":"Using Dockerfile For Python Function Task","href":"/docs/python-function-tasks-with-dockefile"},{"title":"Using Raw Container Task","href":"/docs/container-task"},{"title":"Adding Environment Variable","href":"/docs/adding-environment-variable"},{"title":"Configuring Resources","href":"/docs/configuring-resources"},{"title":"Creating A Conditional Task","href":"/docs/conditional-task"},{"title":"Creating A Map Task","href":"/docs/creating-a-map-task"},{"title":"Creating A Cron Workflow","href":"/docs/cron-workflow"},{"title":"Creating A Spark Task","href":"/docs/spark-task"},{"title":"Creating A Databricks Task","href":"/docs/databricks-task"},{"title":"Creating A Snowflake Task","href":"/docs/snowflake-task"},{"title":"Task Config","href":"/docs/task-config"},{"title":"Attaching Mounts","href":"/docs/attaching-mounts"},{"title":"Passing Files/Artifacts Between Tasks","href":"/docs/passing-filesartifacts-between-tasks"},{"title":"Example Of Task Config With Different Parameters","href":"/docs/example-of-task-config-with-different-parameters"},{"title":"Adding Retries And Handling Failures","href":"/docs/adding-retries-and-handling-failures"},{"title":"Running Workflow Locally","href":"/docs/running-workflow-locally"},{"title":"Adding Alerts For Workflow","href":"/docs/adding-alerts-for-workflow"},{"title":"Handling Failure using Failure Task/Node","href":"/docs/handling-workflow-failure"},{"title":"Recovering a Failed Workflow Execution","href":"/docs/recovering-workflow-execution"}]}]},{"group":"Async Service Deployment","pages":[{"title":"Introduction to Async Service","href":"/docs/introduction-to-async-service"},{"title":"Deploy your first Async Service","href":"/docs/deploy-your-first-asyncservice"},{"group":"Configure async service","pages":[{"title":"Configure Ports","href":"/docs/configure-ports"},{"title":"Configure Queue","href":"/docs/configure-queue"},{"title":"Autoscaling","href":"/docs/autoscaling"},{"title":"Configure Sidecar","href":"/docs/configure-sidecar"}]},{"group":"Queue Integrations","pages":[{"title":"AWS SQS","href":"/docs/aws-sqs"}]},{"title":"Monitor Your Async Service","href":"/docs/monitoring-your-async-service"}]},{"group":"Volumes","pages":[{"title":"Introduction to Volume","href":"/docs/introduction-to-volume"},{"title":"Creating And Using Volumes","href":"/docs/creating-a-volume"}]},{"group":"Experiment Tracking","pages":[{"title":"ML Repo: Getting Started","sidebarTitle":"Getting Started","description":"Get started with experiment tracking by setting up the CLI, creating runs, and logging parameters, metrics, and artifacts.","href":"/docs/ml-repo-quickstart"},{"title":"Create Runs and Log Data","href":"/docs/create-run"},{"title":"Artifacts and Artifact Versions","description":"Uploading files and directories as Artifacts. Downloading contents of Artifact to disk.","href":"/docs/log-artifacts"},{"title":"Models and Model Versions","href":"/docs/log-models"},{"title":"Huggingface Trainer Callback","href":"/docs/huggingface-trainer-callback"}]},{"group":"Advanced Features","pages":[{"title":"Secret Management","href":"/docs/manage-secrets"},{"title":"Deployment Guardrails and Policies","href":"/docs/applying-custom-policies"},{"title":"Deploy Helm Charts","href":"/docs/deploy-helm-charts"},{"title":"Deploy Kubernetes Manifests","href":"/docs/deploy-kubernetes-manifests"},{"title":"Ingress Controller Configuration","href":"/docs/ingress-controller-configuration"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/docs/truefoundry_sdk"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/docs/ai-gateway/ecosystem"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/changelog"}]}]},"basePath":"","title":"Create Runs and Log Data - TrueFoundry Docs","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DL7q6v_h.js","DynamicMarkdown-CaSwclgK.js","zoom-image-lightbox-BLUesUNd.js","lightbox-handle-r17bVUz3.js"]}