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_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.

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: Optional[str] = None,
    file_system: Optional[AbstractFileSystem] = None,
    overwrite: bool = False,
) -> str

Downloads the log file.

Parameters:

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

    The path where the log file will be saved.

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

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

  • file_system (Optional[AbstractFileSystem], 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.

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.

Returns:

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.

Returns:

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: Optional[str]

Description of the dataset.

Returns:

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 used for the experiment.

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:

run_duration property

run_duration: Optional[float]

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.