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_interpretations ¶
list_interpretations(
username: str, start_index: int = 0, count: int = None
) -> list[InterpretationProxy]
Lists interpretations created by the specified user.
Parameters:
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:
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 ¶
Lists projects created by the specified user.
Parameters:
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 ¶
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:
-
list[DAIServerLog]
–Server logs of the Driverless AI server.
Driverless AI version requirement
Requires Driverless AI server 1.10.5 or higher.
list_users ¶
list_visualizations ¶
list_visualizations(
username: str, start_index: int = 0, count: int = None
) -> list[VisualizationProxy]
Lists visualizations created by the specified user.
Parameters:
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.
DAIServerLog ¶
A server log file in the Driverless AI server.
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.
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
–
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, DatasetProxy | None]
Datasets used for the experiment.
Returns:
-
dict[str, DatasetProxy | None]
–Dictionary of
train_dataset
,validation_dataset
, andtest_dataset
.
run_duration
property
¶
run_duration: float | None
Run duration of the experiment in seconds.
Returns:
-
float | None
–
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
.