Skip to content

Integrate UbiOps and Weights and Biases

Download link for necessary files: wandb-tutorial.

In this example we will show you the following:

How to create a UbiOps deployment that always contains the latest model that was trained in a Weights and Biases environment.


The deployment is configured as follows:

Deployment configuration
Name wandb-model
Function predict hand written digits
Input field name: image, datatype: file
Output field name: prediction, datatype: integer
Version name v1
Language Python 3.10

How does it work?

Step 1: Login to your UbiOps account at and create an API token with project editor rights. To do so, click on Permissions in the navigation panel, and then click on API tokens. Click on [+]Add token to create a new token.

Creating an API token

Give your new token a name, save the token in a safe place and assign the following roles to the token: project editor. This role can be assigned on project level.

Step 2: Download the wandb-tutorial folder and open wandb_tutorial.ipynb. In the notebook you will find a space to enter your API token and the name of your project in UbiOps. Paste the saved API token in the notebook in the indicated spot and enter the name of the project in your UbiOps environment. This project name can be found in the top left of your screen in the WebApp. In the GIF above the project name is example.

Step 3: Run the Jupyter notebook wandb_tutorial file and the deployment will be automatically be deployed to your UbiOps environment! Afterwards you can explore the code in the notebook or explore the application in the WebApp.