Project

Properties


Methods

list_experiments

list_experiments(
   limit: Optional[int] = None, offset: Optional[int] = None,
   order_by: Optional[List[str]] = None
)

Description

Retrieve all experiments of this project

Examples

experiments = my_project.list_experiments()

Arguments

  • limit (int, optional) : Limit of experiments to retrieve. Defaults to None.

  • offset (int, optional) : Offset to start retrieving experiments. Defaults to None.

  • order_by (List[str], optional) : Order by fields. Defaults to None.

Returns

A list of Experiment objects, that you can manipulate


delete_all_experiments

delete_all_experiments()

Description

Delete all experiments of this project

⚠️ DANGER ZONE: Be very careful here!

Examples

my_project.delete_all_experiments()

create_experiment

create_experiment(
   name: str, description: Optional[str] = None,
   base_experiment: Optional[Experiment] = None,
   base_model_version: Optional[ModelVersion] = None
)

Description

Create an experiment in this project.

You have the same options as when creating experiments from the UI.

  • You can attach a dataset
  • You can fork a Model (it will automatically attach its files and parameters
    to the experiment)
  • You can start from a previous experiment (it will automatically attach its files and parameters
    to the new experiment)

Examples

base_model_version = client.get_model("picsellia/yolov5")
my_experiment = my_project.create_experiment(
    "test_experiment",
    description="This is a cool experiment",
    base_model_version=base_model_version,
)

Arguments

  • name (str, optional) : Name of experiment. Defaults to None.

  • description (str, optional) : Description of experiment. Defaults to ''.

  • base_experiment (Experiment, optional) : Previous experiment, if you want to base the new one on it.
    Defaults to None.

  • base_model_version (ModelVersion, optional) : Model to use as source. Defaults to None.

Returns

A new Experiment of this project


update

update(
   name: Optional[str] = None, description: Optional[str] = None,
   private: Optional[bool] = None
)

Description

Update a project with a new name, description or privacy

Examples

my_project.update(description="This is a cool project")

Arguments

  • name (str, optional) : New name of project. Defaults to None.

  • description (str, optional) : New description of project. Defaults to None.

  • private (bool, optional) : New privacy of project. Defaults to None.


delete

delete()

Description

Delete a project.

⚠️ DANGER ZONE: Be very careful here!

It will delete the project and all experiments linked.

Examples

my_project.delete()

get_experiment

get_experiment(
   name: str
)

Description

Retrieve an existing experiment by name.

Examples

my_experiment = my_project.get_experiment("test_experiment")

Arguments

  • name (str, optional) : Experiment's name.

Raises

  • Exception : Experiment not found

Returns

An Experiment object that you can manipulate


get_experiment_by_id

get_experiment_by_id(
   id: Union[UUID, str]
)

Description

Retrieve an existing experiment by id.

Examples

my_experiment = my_project.get_experiment_by_id("62cffb84-b92c-450c-bc37-8c4dd4d0f590")

Arguments

  • id : Experiment's id.

Raises

  • Exception : Experiment not found

Returns

An Experiment object that you can manipulate


attach_dataset

attach_dataset(
   dataset_version: DatasetVersion
)

Description

Attach a dataset version to this project.

Retrieve or create a dataset version and attach it to this project.

Examples

foo_dataset_version = client.get_dataset("foo").get_version("first")
my_project.attach_dataset(foo_dataset_version)

Arguments

  • dataset_version DatasetVersion : A dataset version to attach to the project.

detach_dataset

detach_dataset(
   dataset_version: DatasetVersion
)

Description

Detach a dataset version from this project.

Examples

foo_dataset_version = client.get_dataset("foo").get_version("first")
my_project.attach_dataset(foo_dataset_version)
my_project.detach_dataset(foo_dataset_version)

Arguments

  • dataset_version DatasetVersion : A dataset version to attach to the project.

list_dataset_versions

list_dataset_versions()

Description

Retrieve all dataset versions attached to this project

Examples

datasets = my_project.list_dataset_versions()

Returns

A list of DatasetVersion object attached to this project