Initialize an experiment

With the platform (UI)

You can create experiments manually in Picsell.ia in the 'Experiments' tab. It's a basic usage that allows you to initialize an experiment instance with a few parameters :

  • name

  • description

  • base architecture

  • hyperparameters (will be stored in a data asset)

  • dataset

Let's dive into the concept of base architecture and dataset !

Base architecture

If you click on one of the button, a modal will open and a list of available base architecture will appear.

And then if you select a base model, you will see it appear like this

What is the point ?

As ML and AI training process is an iterative process, you may or may not want to use previous checkpoints, trained model, config file of a previous version of your experiments.

This is done automatically when selecting a base experiment or model 😌

Dataset

If you are doing a computer vision experiment, you might have some data in your Datalake and have created some Datasets.

To attach a dataset to your experiment so you can download the images or annotations in your code, you can select one here (alternatively you can always pull your datasets by using the Dataset class of the Python SDK).

You can now observe the experiments you created in the experiment list of your project, it will look like this.

With the Python SDK

Create a new experiment

Here is the following snippet that allows you to create a new and clean experiment directly from your python interpreter (or jupyter notebook or IDE or whatever you like).

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
)
exp = experiment.create(name='classification-v4')

You should see the following printed :

{
'id': '0503901d-ebfb-4b0a-b240-233560d4f8c4',
'date_created': '2021-02-09T12:55:17.775657Z',
'last_update': '2021-02-09T12:55:17.775302Z',
'owner': 1,
'project': '49ac1b48-13c8-4651-bfd1-89542d8d3681',
'name': 'classification-v4',
'description': '',
'status': 'started',
'logging': None,
'files': [],
'data': []
}

The experiment_id parameter is saved in the Client.Experiment instance, you can now call any method without specifying the id of the experiment.

If you go to Picsell.ia in the experiment list of your project, your brand new experiment should appear, waiting for you to feed him with your best parameters, performance metrics or trained models !

Experiment names must be unique within a project, which means that if you try to create an experiment with a name that is already taken (let's say 'classification-v4') it will be automatically created as 'my_experiment-v5' and so on.

Create with dataset

If you are doing a computer vision experiment, you might have some data in your Datalake and have created some Datasets.

To attach a dataset to your experiment so you can download the images or annotations with the experiment class you can specify a dataset argument in the create method :

You must have attached the desired dataset to the project of your experiment first !

experiment.create(
name='classification-v5',
dataset='test-dataset/first'
)

Then you will be able to download images and annotations by using the corresponding methods, please check the sdk reference for more details.

Iterate from a previous experiment

If you are for example training a neural network, you might need to do several trainings and need to change the dataset or the hyperparameters from one to another. Instead of starting from scratch you can clone your old experiment's assets such as checkpoint files to iterate over your model.

To do so you can just call the create method and specify the name the experiment you want to clone.

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
)
exp = experiment.create(
previous='classification-v5',
name='classification-v6',
)

You can also specify what assets you want to clone from the previous experiment, for example :

experiment.create(
previous='classification-v5',
name='classification-v6',
with_file=True
)

will create a new experiment and get all the file assets from the previous one, or

experiment.create(
previous='classification-v5',
name='classification-v6',
with_data=True
)

will clone every data assets, you can also do both by specifying both arguments.

Clone a model from the HUB or from your organization

As you may know, Picsell.ia has a public model HUB where you can find state-of-the-art trained models but also the public models from all of our user.

If you want to perform transfer learning from one of those model or from a trained model of your organization, you can also initialize an experiment like this :

experiment.create(
name='my_new_experiment',
source='picsell/efficientdet-d0',
)

This will create an experiment and clone all the files that has been saved in this model.