Experiment

Experiments are attempts to reach a specific objective based on hypothesis by using a pipeline.

Experiments are used to tests your pipelines, it is common also to train machine learning models with them.

Running a pipeline

You can run your pipeline using the wizata_dsapi to experiment manually. You should perform various manual experimentation to train models and to test your pipeline before scheduling them with a Trigger.

To run a pipeline you need its logical key (str) or technical identifier (uuid).

Here is a sample how you can run a pipeline my_pipeline on twin unit my_twin in experiment mode:

execution = wizata_dsapi.api().experiment(
    experiment='my_experiment',
    pipeline='my_pipeline',
    twin='my_twin',
    properties={
        'start_q': 'now-7d',
        'end_q': 'now'
    }
)

Ideally, link your pipeline to an experiment to track result of its execution in the experimenting screen. You can create/update one with the following logic :

wizata_dsapi.api().upsert_experiment(key='my_experiment_key', name='My Experiment Display Name', 
                                     pipeline='my_pipeline_key')

To run an experiment using the UI, just click on the button, that will display...

To update the experiment name, or change the template, pipeline or twin linked, you can click on the icon next to the experiment key.

Image 2. Updating an experiment.

Image 2. Updating an experiment.

Twin

Twin must be referred using its hardware ID that is registered on template used by the pipeline.

Pipeline Images

Additionally, you can also pass your pipeline image ID inside the experiment using the following logic:

wizata_dsapi.api().experiment(
    experiment='my_experiment_key',
    pipeline='my_pipeline_key',
    twin='my_twin_name',
    image='my_pipeline_image_id'
)

📘

There is an article regarding Pipeline Images

You can access to by clicking here

Properties

Properties can be referring to any parameter within your pipeline (using the @var_name notation) or simply a value you would like to use within your script.

A variable doesn’t need to be necessary declared on a pipeline to be used but note that end-user will not be able to specify it from UI if not declared.

Options

In experiment mode, by default ML model are trained and scored, plots steps are executed, but no data are modified inside the platform.

To change this behavior you can use execution_options. When using non-default executions_options those are copied into properties[‘execution_options’]

execution = wizata_dsapi.api().experiment(
    experiment='my_experiment',
    pipeline='my_pipeline',
    twin='my_twin',
    properties={
        'start_q': 'now-7d',
        'end_q': 'now'
    },
    train=False,
    plot=False,
    write=True
)
{
   "properties" : {
      "execution_options" : {
        "train" : false,
        "plot" : false,
        "write" : true
      }
   }
}