Guides

Upgrade your solution Python version

This tutorial explains the steps necessary to update a pipeline made for an anterior version of Python to a new one.

Check available versions

To check versions available in your app, please navigate to AI Lab and look at the overview. If you don't find the versions you aim to use, please contact our team.

Prepare your local environment

Prepare locally a notebook or any python IDE environment with the desired python version and install the wizata_dsapi package.

Make sure to validate the version of the package by looking at the API version deployed on your environment.

In this example, the version to use is 1.3.54 - use the following command if you want to only use the API

pip install wizata_dsapi==1.3.54

Or use the following command to install all data science package, which is recommended to register script and pipelines.

pip install "wizata_dsapi[all]==1.3.54"

Register and upgrade your scripts

It is recommended to register your scripts again all scripts used by your solution, you should also rename them or add a suffix to their name like : i.e. "my_script" becoming "my_script_3_12"

This is strongly recommanded as the platform stores only one version of the script and therefore if your solution is not packaged as a Pipeline Images it will stop functionning due to incompatiblity issue.

Please make sure you check the new versions of libraries you use (especially Pandas and Numpy), you can check the version locally after installing the package or directly on the runner management.

❗️

Important - the local environment is used to create the artifacts (dill) of your scripts and therefore the python version in which it will run must be the same as the local environment.

Create or update your pipeline

You can now update your pipelines with the new scripts or create a new one if you have solutions running you don't want to disturb.

Testing with an experiment

When executing an experiment with UI you can now select the environment on which to run the experiment - if not specified it will use a default version which depends on your platform.

In python, when using the run() or experiment() method your local version is sent to the platform as desired version.

But you can also set it manually if necessary:

        execution = wizata_dsapi.api().experiment(
            experiment="test_experiment",
            pipeline='centrifugal_pump_ad_training',
            version='3.12',
            twin="OG_PL1_PROC_PUMP1"
        )

Change the trigger

Once you tested your pipeline, you can now change the trigger (using API) or via the UI and set the desire python version the same.

Normally, now you all set and your solution is running on new python version.

Edge - create a new pipeline image

If your solution is running on the edge you can create a new pipeline image once all your script have been updated and change the trigger configuration.

The version of python used by your edge device is set globally to a fix version and aligned with default python version.