Create Experiments#
This how-to explains how to build Experiments in Dioptra.
Prerequisites#
Prepare Your Deployment - A deployment of Dioptra is required.
Set Up Dioptra in the GUI - Access Dioptra services in the GUI, create a user, and login.
Create Entrypoints - Entrypoints are needed to attach to the Experiment
Prepare Your Deployment - A deployment of Dioptra is required.
Set Up the Python Client - Connect to the Python Client in a Jupyter Notebook.
Create Entrypoints - Entrypoints are needed to attach to the Experiment
Experiment Creation Workflow#
Follow these steps to create an Experiment. You can perform these actions via the Graphical User Interface (GUI) or programmatically using the Python Client.
Step 1: Locate Entrypoints to attach to the Experiment#
Ensure you have created at least one entrypoint.
You will be able to automatically select these resources in the GUI using dropdown menus in the following steps.
Retrieve IDs for the following resources:
Groups
Entrypoints
Groups:
- GroupsCollectionClient.get(index: int = 0, page_length: int = 10, search: str | None = None) dioptra.client.groups.T[source]#
Get a list of groups.
- Parameters
index – The paging index. Optional, defaults to 0.
page_length – The maximum number of groups to return in the paged response. Optional, defaults to 10.
search – Search for groups using the Dioptra API’s query language. Optional, defaults to None.
- Returns
The response from the Dioptra API.
Queues:
- EntrypointsCollectionClient.get(group_id: int | None = None, index: int = 0, page_length: int = 10, sort_by: str | None = None, descending: bool | None = None, search: str | None = None) dioptra.client.entrypoints.T[source]#
Get a list of entrypoints.
- Parameters
group_id – The group id the entrypoints belong to. If None, return entrypoints from all groups that the user has access to. Optional, defaults to None.
index – The paging index. Optional, defaults to 0.
page_length – The maximum number of entrypoints to return in the paged response. Optional, defaults to 10.
sort_by – The field to use to sort the returned list. Optional, defaults to None.
descending – Sort the returned list in descending order. Optional, defaults to None.
search – Search for entrypoints using the Dioptra API’s query language. Optional, defaults to None.
- Returns
The response from the Dioptra API.
Step 2: Locate Entrypoints to attach to the Experiment#
In the Dioptra GUI, navigate to the Experiments tab. Click Create. Enter metadata, including:
name
group
entrypoints
description (optional)
Click Submit Experiment when finished.
Create the Experiment using the Client. Use the Group ID, and Entrypoint IDs from step 1. Also pass in the following as parameters:
Name
Description (Optional)
Experiment client CREATE method:
- ExperimentsCollectionClient.create(group_id: int, name: str, description: str | None = None, entrypoints: list[int] | None = None) dioptra.client.experiments.T[source]#
Creates an experiment.
- Parameters
group_id – The id of the group that will own the experiment.
name – The name of the new experiment.
description – The description of the new experiment. Optional, defaults to None.
entrypoints – A list of entrypoint ids to associate with the new experiment. Optional, defaults to None.
- Returns
The response from the Dioptra API.
See Also#
Experiments Explanation - Understand what experiments are conceptually.
Experiments Reference - Reference page for experiments.