Create a ML Repo

ML Repositories are backed by a blob storage. So, you need to have atleast one blob storage integration to create an ML Repo. You can follow the guides to integrate AWS S3, Google Cloud Storage, Azure Blob Storage or any S3 compatible storage to TrueFoundry.
You can then create an ML Repo from the ML Repo’s tab in the Platform.

Setup the TrueFoundry CLI

To get started, we need to have the truefoundry library installed. You can install it following the instructions in the CLI Setup docs.

Add Log Lines to your code

You can use the code below to create a run, log metrics and parameters and then finally end the run.
Python
from truefoundry.ml import get_client

client = get_client()
# Create a new run
run = client.create_run(ml_repo="iris-demo", run_name="svm-model")
# Log parameters
run.log_params({"learning_rate": 0.001})
# Log metrics
run.log_metrics({"accuracy": 0.7, "loss": 0.6})
# End the run
run.end()
This run will now appear on the TrueFoundry dashboard under ML Repos Tab.
Congratulations! You have successfully created a new ML repository. It is now ready for use, and you can start populating it with your data, code, models, and other related resources.