Publish your model

Here we will see how to publish a version of your experiment so it can be used outside of the project scope and deployed for production use

Once you are happy with one of your experiment after analyzing the evaluation metrics or sample predictions, you can publish it into a new frozen entity that we call a model.

Once your experiment is frozen into a model, you can then deploy it, use it live in the playground, or use it as a source for other experiments that can be in other projects (remember the checkoutmethod ?)

To freeze your experiment into a model, you can use the following method :

from picsellia.client import Client

api_token = '4a54b5d45e45f4c454b54dee5b54bac4dd4'
project_token = '9a7d45b4c-691d-4c3a-9972-6a22b1dcd6f'

experiment = Client.Experiment(
    api_token=api_token,
    project_token=project_token
    )
experiment.checkout(
    name='my_finished_experiment'
    )
experiment.publish('my_awesome_model')

As we can see, the only thing we have to specify is the name of the model instance we want to create. When publishing, you will automatically clone the file assets of the experiment such as :

  • checkpoints

  • trained model

  • .config

  • ...

Last updated