Skip to content

Projects

Projects

Interact with projects in the Driverless AI server.

create

create(
    name: str, description: Optional[str] = None, force: bool = False
) -> Project

Creates a project in the Driverless AI server.

Parameters:

  • name (str) –

    Display name for project.

  • description (Optional[str], default: None ) –

    Description of project.

  • force (bool, default: False ) –

    Whether to create the project even when a project already exists with the same name.

Returns:

get

get(key: str) -> Project

Retrieves a project in the Driverless AI server.

Parameters:

  • key (str) –

    The unique ID of the project.

Returns:

  • Project

    The project corresponding to the key.

get_by_name

get_by_name(name: str) -> Optional[Project]

Retrieves a project by its display name from the Driverless AI server.

Parameters:

  • name (str) –

    Name of the project.

Returns:

  • Optional[Project]

    The project with the specified name if it exists, otherwise None.

Beta API

A beta API that is subject to future changes.

gui

gui() -> Hyperlink

Returns the full URL to the Projects page in the Driverless AI server.

Returns:

  • Hyperlink

    The full URL to the Projects page.

list

list(start_index: int = 0, count: int = None) -> Sequence[Project]

Retrieves projects in the Driverless AI server.

Parameters:

  • start_index (int, default: 0 ) –

    The index of the first project to retrieve.

  • count (int, default: None ) –

    The maximum number of projects to retrieve. If None, retrieves all available projects.

Returns:

Project

A project in the Driverless AI server.

datasets property

datasets: Dict[str, Sequence[Dataset]]

Datasets linked to the project.

Returns:

description property

description: Optional[str]

Description of the project.

Returns:

experiments property

experiments: Sequence[Experiment]

Experiments linked to the project.

Returns:

key property

key: str

Universally unique key of the entity.

Returns:

name property

name: str

Name of the entity.

Returns:

sharings property

sharings: List[Dict[str, Optional[str]]]

Users with whom the projects have been shared with when the H2O Storage is connected.

Returns:

delete

delete(include_experiments: bool = False) -> None

Permanently deletes the project from the Driverless AI server.

Parameters:

  • include_experiments (bool, default: False ) –

    Unlink & delete experiments linked to the project.

get_experiment_tags

get_experiment_tags(experiment: Experiment) -> List[str]

Returns the tags set for an experiment linked to the project.

Parameters:

  • experiment (Experiment) –

    An experiment linked to the project.

Returns:

  • List[str]

    Tags of the experiment.

gui

gui() -> Hyperlink

Returns the full URL to the project details page in the Driverless AI server.

Returns:

  • Hyperlink

    URL to the project details page.

link_dataset(
    dataset: Dataset,
    dataset_type: str,
    link_associated_experiments: bool = False,
) -> Project

Links a dataset to the project.

Parameters:

  • dataset (Dataset) –

    The dataset to be linked.

  • dataset_type (str) –

    Type of the dataset. Possible values are train_dataset, validation_dataset, or test_dataset.

  • link_associated_experiments (bool, default: False ) –

    Also link experiments that used the dataset.

Returns:

link_experiment(experiment: Experiment) -> Project

Links an experiment to the project.

Parameters:

  • experiment (Experiment) –

    The experiment to link.

Returns:

redescribe

redescribe(description: str) -> Project

Changes the description of the project.

Parameters:

  • description (str) –

    New description.

Returns:

rename

rename(name: str) -> Project

Changes the display name of the project.

Parameters:

  • name (str) –

    New display name.

Returns:

share

share(username: str, role: str = 'Default') -> None

Shares the project with a user when H2O Storage is connected.

Parameters:

  • username (str) –

    Driverless AI username of user to share with.

  • role (str, default: 'Default' ) –

    Role for the user. Possible values are Default or Reader.

unlink_dataset(dataset: Dataset, dataset_type: str) -> Project

Unlinks a dataset from the project.

Parameters:

  • dataset (Dataset) –

    The dataset to be unlinked.

  • dataset_type (str) –

    Type of the dataset. Possible values are train_dataset, validation_dataset, or test_dataset.

Returns:

unlink_experiment(experiment: Experiment) -> Project

Unlinks an experiment from the project.

Parameters:

  • experiment (Experiment) –

    The experiment to be unlinked.

Returns:

unshare

unshare(username: str) -> None

Unshare the project when H2O Storage is connected.

Parameters:

  • username (str) –

    Driverless AI username of user to unshare with.

update_experiment_tags

update_experiment_tags(experiment: Experiment, tags: List[str]) -> None

Updates tags from an experiment linked to the project.

Parameters:

  • experiment (Experiment) –

    experiment: An experiment linked to the project.

  • tags (List[str]) –

    New tags.

Example

Create a project, link an experiment, and remove all existing tags.

project = client.projects.create(
    name="test project",
    description="project description",
)
project.link_experiment(experiment)
project.update_experiment_tags(experiment, [])