Skip to content

Admin

Admin

Facilitate operations to perform administrative tasks on the Driverless AI server.

is_admin property

is_admin: bool

Returns whether the current user is an admin or not.

Returns:

  • bool

    True if the user is an admin, otherwise False.

list_current_users

list_current_users() -> list[str]

Lists users who are currently logged-in to the Driverless AI server.

Returns:

  • list[str]

    Usernames of the currently logged-in users.

Driverless AI version requirement

Requires Driverless AI server 1.10.5 or higher.

Beta API

A beta API that is subject to future changes.

list_datasets

list_datasets(username: str) -> list[DatasetProxy]

Lists datasets created by the specified user.

Parameters:

  • username (str) –

    Username of the user.

Returns:

Example: Delete all datasets created by a user
for d in client.admin.list_datasets("alice"):
    print(f"Deleting {d.name} ...")
    d.delete()
Beta API

A beta API that is subject to future changes.

list_experiments

list_experiments(username: str) -> list[ExperimentProxy]

Lists experiments created by the specified user.

Parameters:

  • username (str) –

    Username of the user.

Returns:

Example: Find running experiments of a user
running_experiments = [
    e for e in client.admin.list_experiments("alice") if e.is_running()
]
Beta API

A beta API that is subject to future changes.

list_interpretations

list_interpretations(
    username: str, start_index: int = 0, count: int = None
) -> list[InterpretationProxy]

Lists interpretations created by the specified user.

Parameters:

  • username (str) –

    Username of the user.

  • start_index (int, default: 0 ) –

    The index of the first interpretation to retrieve.

  • count (int, default: None ) –

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

Returns:

  • list[InterpretationProxy]

    Interpretations of the user.

Example: Find running interpretations of a user
running_interpretations = [
    i for i in client.admin.list_interpretations("alice") if i.is_running()
]
Driverless AI version requirement

Requires Driverless AI server 1.11.1 or higher.

Beta API

A beta API that is subject to future changes.

list_model_diagnostics

list_model_diagnostics(
    username: str, start_index: int = 0, count: int = None
) -> list[ModelDiagnosticProxy]

Lists model diagnostics created by the specified user.

Parameters:

  • username (str) –

    Username of the user.

  • start_index (int, default: 0 ) –

    The index of the first model diagnostic to retrieve.

  • count (int, default: None ) –

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

Returns:

  • list[ModelDiagnosticProxy]

    Model diagnostics of the user.

Example: Delete all model diagnostics created by a user
for m in client.admin.list_model_diagnostics("alice"):
    print(f"Deleting {m.name} ...")
    m.delete()
Driverless AI version requirement

Requires Driverless AI server 1.11.1 or higher.

Beta API

A beta API that is subject to future changes.

list_projects

list_projects(
    username: str, start_index: int = 0, count: int = None
) -> list[ProjectProxy]

Lists projects created by the specified user.

Parameters:

  • username (str) –

    Username of the user.

  • 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:

  • list[ProjectProxy]

    Projects of the user.

Example: Delete all projects created by a user
for p in client.admin.list_projects("alice"):
    print(f"Deleting {p.name} ...")
    p.delete()
Driverless AI version requirement

Requires Driverless AI server 1.11.1 or higher.

Beta API

A beta API that is subject to future changes.

list_running_tasks

list_running_tasks(user: str = None) -> list[RunningTask]

Lists the running tasks of the Driverless AI server.

Returns:

  • list[RunningTask]

    Running tasks of the Driverless AI server.

list_server_logs

list_server_logs() -> list[DAIServerLog]

Lists the server logs of the Driverless AI server.

Returns:

Driverless AI version requirement

Requires Driverless AI server 1.10.5 or higher.

list_users

list_users() -> list[str]

Lists users in the Driverless AI server.

Returns:

  • list[str]

    Usernames of the users.

list_visualizations

list_visualizations(
    username: str, start_index: int = 0, count: int = None
) -> list[VisualizationProxy]

Lists visualizations created by the specified user.

Parameters:

  • username (str) –

    Username of the user.

  • start_index (int, default: 0 ) –

    The index of the first visualization to retrieve.

  • count (int, default: None ) –

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

Returns:

  • list[VisualizationProxy]

    Visualizations of the user.

Example: Delete all visualizations created by a user
for v in client.admin.list_visualizations("alice"):
    print(f"Deleting {v.name} ...")
    v.delete()
Driverless AI version requirement

Requires Driverless AI server 1.11.1 or higher.

Beta API

A beta API that is subject to future changes.

transfer_data

transfer_data(from_user: str, to_user: str) -> None

Transfers all data belonging to one user to another user.

Parameters:

  • from_user (str) –

    Username of the user that data will be transferred from.

  • to_user (str) –

    Username of the user that data will be transferred to.

DAIServerLog

A server log file in the Driverless AI server.

created property

created: str

Time of creation.

Returns:

file_name property

file_name: str

Filename of the log file.

Returns:

last_modified property

last_modified: str

Time of last modification.

Returns:

size property

size: int

Size of the log file in bytes.

Returns:

download

download(
    dst_dir: str = ".",
    dst_file: str | None = None,
    file_system: AbstractFileSystem | None = None,
    overwrite: bool = False,
    timeout: float = 30,
) -> str

Downloads the log file.

Parameters:

  • dst_dir (str, default: '.' ) –

    The path where the log file will be saved.

  • dst_file (str | None, default: None ) –

    The name of the log file (overrides the default file name).

  • file_system (AbstractFileSystem | None, default: None ) –

    FSSPEC-based file system to download to instead of the local file system.

  • overwrite (bool, default: False ) –

    Whether to overwrite or not if a file already exists.

  • timeout (float, default: 30 ) –

    Connection timeout in seconds.

Returns:

  • str

    Path to the downloaded log file.

head

head(num_lines: int = 50) -> str

Returns the first n lines of the log file.

Parameters:

  • num_lines (int, default: 50 ) –

    Number of lines to retrieve.

tail

tail(num_lines: int = 50) -> str

Returns the last n lines of the log file.

Parameters:

  • num_lines (int, default: 50 ) –

    Number of lines to retrieve.

DatasetProxy

A Proxy for admin access for a dataset in the Driverless AI server.

columns property

columns: list[str]

Column names of the dataset.

Returns:

creation_timestamp property

creation_timestamp: float

Creation timestamp of the dataset in seconds since the epoch (POSIX timestamp).

Returns:

data_source property

data_source: str

Original data source of the dataset.

Returns:

description property

description: str | None

Description of the dataset.

Returns:

  • str | None

     

file_path property

file_path: str

Path to the dataset bin file in the Driverless AI server.

Returns:

file_size property

file_size: int

Size in bytes of the dataset bin file in the Driverless AI server.

Returns:

key property

key: str

Universally unique identifier of the entity.

Returns:

name property

name: str

Name of the entity.

Returns:

owner property

owner: str

Owner of the entity.

Returns:

shape property

shape: tuple[int, int]

Dimensions of the dataset in (rows, cols) format.

Returns:

delete

delete() -> None

Permanently deletes the entity from the Driverless AI server.

ExperimentProxy

A Proxy for admin access for an experiment in the Driverless AI server.

creation_timestamp property

creation_timestamp: float

Creation timestamp of the experiment in seconds since the epoch (POSIX timestamp).

Returns:

datasets property

datasets: dict[str, DatasetProxy | None]

Datasets used for the experiment.

Returns:

  • dict[str, DatasetProxy | None]

    Dictionary of train_dataset,validation_dataset, and test_dataset.

key property

key: str

Universally unique identifier of the entity.

Returns:

name property

name: str

Name of the entity.

Returns:

owner property

owner: str

Owner of the entity.

Returns:

run_duration property

run_duration: float | None

Run duration of the experiment in seconds.

Returns:

settings property

settings: dict[str, Any]

Experiment settings.

Returns:

size property

size: int

Size in bytes of all the experiment files on the Driverless AI server.

Returns:

delete

delete() -> None

Permanently deletes the entity from the Driverless AI server.

is_complete

is_complete() -> bool

Returns whether the job has been completed successfully or not.

Returns:

  • bool

    True if the job finished successfully, otherwise False.

is_running

is_running() -> bool

Returns whether the job is currently running or not.

Returns:

  • bool

    True if the job has been scheduled or is running, finishing, or syncing. Otherwise, False.

status

status(verbose: int = 0) -> str

Returns the status of the job.

Parameters:

  • verbose (int, default: 0 ) –
    • 0: A short description.
    • 1: A short description with a progress percentage.
    • 2: A detailed description with a progress percentage.

Returns:

  • str

    Current status of the job.