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, otherwiseFalse
.
list_current_users ¶
list_datasets ¶
list_datasets(username: str) -> List[DatasetProxy]
Lists datasets created by the specified user.
Parameters:
-
username
(str
) –Username of the user.
Returns:
-
List[DatasetProxy]
–Datasets of the user.
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:
-
List[ExperimentProxy]
–Experiments of the user.
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:
-
List[DAIServerLog]
–Server logs of the Driverless AI server.
Driverless AI version requirement
Requires Driverless AI server 1.10.5 or higher.
list_users ¶
DAIServerLog ¶
A server log file in the Driverless AI server.
download ¶
download(
dst_dir: str = ".",
dst_file: Optional[str] = None,
file_system: Optional[AbstractFileSystem] = 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
(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.
-
timeout
(float
, default:30
) –Connection timeout in seconds.
Returns: Path to the downloaded log file.
Returns:
-
str
–
head ¶
DatasetProxy ¶
A Proxy for admin access for a dataset in the Driverless AI server.
creation_timestamp
property
¶
creation_timestamp: float
Creation timestamp of the dataset in seconds since the epoch (POSIX timestamp).
Returns:
-
float
–
description
property
¶
file_path
property
¶
file_path: str
Path to the dataset bin file in the Driverless AI server.
Returns:
-
str
–
file_size
property
¶
file_size: int
Size in bytes of the dataset bin file in the Driverless AI server.
Returns:
-
int
–
shape
property
¶
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:
-
float
–
datasets
property
¶
datasets: Dict[str, Optional[DatasetProxy]]
Datasets used for the experiment.
Returns:
-
Dict[str, Optional[DatasetProxy]]
–Dictionary of
train_dataset
,validation_dataset
, andtest_dataset
.
run_duration
property
¶
size
property
¶
size: int
Size in bytes of all the experiment files on the Driverless AI server.
Returns:
-
int
–
is_complete ¶
is_complete() -> bool
Returns whether the job has been completed successfully or not.
Returns:
-
bool
–True
if the job finished successfully, otherwiseFalse
.