Properties
name
Name of this Project
Methods
list_experiments
list_experiments(
limit: Optional[int] = None, offset: Optional[int] = None,
order_by: Optional[List[str]] = None
)
Description
List all project's experiments
Examples
experiments = my_project.list_experiments()
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(
name="new_experiment",
source=base_model,
)
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")
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.
Examples
my_experiment = my_project.get_experiment("test_experiment")
Arguments
- name (str, optional) : Experiment's name. Defaults to None.
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.
Examples
my_experiment = my_project.get_experiment("test_experiment")
Arguments
- id : Experiment's id. Defaults to None.
Raises
- Exception : Experiment not found
Returns
An Experiment object that you can manipulate
get_scan
get_scan(
name: str
)
Description
Retrieve an existing scan.
Examples
my_scan = my_project.get_scan("test_scan")
Arguments
- name (str, optional) : Scan's name. Defaults to None.
Returns
A Scan 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 = client.get_dataset("foo").get_version("first")
my_project.attach_dataset(foo_dataset)
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 = client.get_dataset("foo").get_version("first")
my_project.attach_dataset(foo_dataset)
my_project.detach_dataset(foo_dataset)
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
create_scan
create_scan(
name: str, metric_name: str, metric_goal: str, strategy: str, execution_type: str,
execution_max_worker: int = 1, max_run: int = 1, requirements: Union[List[dict],
str, None] = None, parameters: Optional[dict] = None,
early_stopping: Optional[dict] = None, image: Optional[str] = None,
path_script_file: Optional[str] = None, files: Optional[List[str]] = None,
base_model: Optional[ModelVersion] = None,
base_dataset: Optional[DatasetVersion] = None
)
Description
Initialize a new scan.
See full documentation https://docs.picsellia.com/experiments/hyperparameter-tuning/config
Returns
A Scan object that you can manipulate
create_scan_from_config
create_scan_from_config(
name: str, config: dict, image: Optional[str] = None,
path_script_file: Optional[str] = None, files: Optional[List[str]] = None,
base_model: Optional[ModelVersion] = None,
base_dataset: Optional[DatasetVersion] = None
)
Description
Create scan from a config dictionary.
Arguments
-
name (str) : Name of the scan
-
config (dict) : Config dictionary
-
image (str, optional) : Docker image name. Defaults to None.
-
path_script_file (str, optional) : Path of script file. Default will use default picsellia image.
-
files (List[str], optional) : Some path files to add to scan. Defaults to [].
-
base_model (ModelVersion, optional) : Base model version of this scan. Defaults to None.
-
base_dataset (DatasetVersion, optional) : Base dataset version of this scan. Defaults to None.
Returns
A Scan object
list_scans
list_scans()
Description
Retrieve all scans of this project
Examples
scans = my_project.list_scans()
Returns
A list of Scan object attached to this project