Server Objects

Server objects represent an entity that exists on the Driverless AI server.

Dataset

Dataset objects correspond to existing datasets on a Driverless AI server. Dataset objects are retrievable using the Client.

API Reference:

class Dataset

Interact with a dataset on the Driverless AI server.

Examples:

# Import the iris dataset
ds = dai.datasets.create(
        data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
        data_source='s3'
)

ds.columns
ds.data_source
ds.file_path
ds.file_size
ds.key
ds.name
ds.shape
column_summaries(columns: Optional[List[str]] = None) DatasetColumnSummaryCollection

Returns a collection of column summaries.

The collection can be indexed by number or column name:

  • dataset.column_summaries()[0]
  • dataset.column_summaries()[0:3]
  • dataset.column_summaries()['C1']

A column summary has the following attributes:

  • count: count of non-missing values
  • data_type: raw data type detected by Driverless AI when the data was imported
  • datetime_format: user defined datetime format to be used by Driverless AI (see dataset.set_datetime_format())
  • freq: count of most frequent value
  • logical_types: list of user defined data types to be used by Driverless AI (overrides data_type, also see dataset.set_logical_types())
  • max: maximum value for numeric data
  • mean: mean of values for numeric data
  • min: minimum value for numeric data
  • missing: count of missing values
  • name: column name
  • sd: standard deviation of values for numeric data
  • unique: count of unique values

Printing the collection or an individual summary displays a histogram along with summary information, like so:

--- C1 ---

 4.3|███████
    |█████████████████
    |██████████
    |████████████████████
    |████████████
    |███████████████████
    |█████████████
    |████
    |████
 7.9|████

Data Type: real
Logical Types: ['categorical', 'numerical']
Datetime Format:
Count: 150
Missing: 0
Mean: 5.84
SD: 0.828
Min: 4.3
Max: 7.9
Unique: 35
Freq: 10
Parameters:columns (Optional[List[str]]) – list of column names to include in the collection

Examples:

# Import the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

# print column summary for the first three columns
print(ds.column_summaries()[0:3])
Return type:DatasetColumnSummaryCollection
property columns: List[str]

List of column names.

Return type:List[str]
property creation_timestamp: float

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

Return type:float
property data_source: str

Original source of data.

Return type:str
delete() None

Delete dataset on Driverless AI server.

Examples:

# Import the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

ds.delete()
Return type:None
download(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Download dataset from Driverless AI server as a csv.

Parameters:
  • dst_dir (str) – directory where csv will be saved
  • dst_file (Optional[str]) – name of csv file (overrides default file name)
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing file
  • timeout (float) – connection timeout in seconds

Examples:

# Import the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

ds.download()
Return type:str
export(**kwargs: Any) str

Export dataset csv from the Driverless AI server. Returns a relative path for the exported csv.

Note

Export location is configured on the Driverless AI server.

Return type:str
property file_path: str

Path to dataset bin file on the server.

Return type:str
property file_size: int

Size in bytes of dataset bin file on the server.

Return type:int
get_used_in_experiments() Dict[str, List[Experiment]]
Returns the completed experiments where this dataset has been used
as the training, testing, or validation dataset.

Warning

Requires DriverlessAI server version 1.10.6 or higher.

Return type:Dict[str, List[Experiment]]
gui() Hyperlink

Get full URL for the Details page of a dataset on the Driverless AI server.

Return type:Hyperlink
head(num_rows: int = 5) Table

Return headers and first n rows of dataset in a Table.

Parameters:num_rows (int) – number of rows to show

Examples:

# Load in the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

# Print the headers and first 5 rows
print(ds.head(num_rows=5))
Return type:Table
property key: str

Universally unique identifier.

Return type:str
property log: driverlessai._datasets.DatasetLog

Log of this dataset.

Return type:DatasetLog
merge_by_rows(other_dataset: Dataset, new_dataset_name: str) Dataset

Merge the specified dataset into this dataset.

Args:
other_dataset: dataset that will be merged into this new_dataset_name: name of the resulting dataset

Warning

Requires DriverlessAI server version 1.10.6 or higher.

Return type:Dataset
modify_by_code(code: str, names: Optional[List[str]] = None) Dict[str, Dataset]

Create a dictionary of new datasets from original dataset modified by a Python code string, that is the body of a function where:

  • there is an input variable X that represents the original dataset in the form of a datatable frame (dt.Frame)
  • return type is one of dt.Frame, pd.DataFrame, np.ndarray or a list of those
Parameters:
  • code (str) – Python code that modifies X
  • names (Optional[List[str]]) – optional list of names for the new dataset(s)

Examples:

# Import the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

# Keep the first 4 columns
new_dataset = ds.modify_by_code(
    'return X[:, :4]', names=['new_dataset']
)

# Split on 4th column
new_datasets = ds.modify_by_code(
    'return [X[:, :4], X[:, 4:]]',
    names=['new_dataset_1', 'new_dataset_2']
)

The dictionary will map the dataset names to the returned element(s) from the Python code string.

Return type:Dict[str, Dataset]
modify_by_code_preview(code: str) Table

Get a preview of the dataset modified by a Python code string, where:

  • there exists a variable X that represents the original dataset in the form of a datatable frame (dt.Frame)
  • return type is one of dt.Frame, pd.DataFrame, np.ndarray or a list of those (only first element of the list is shown in preview)
Parameters:code (str) – Python code that modifies X

Examples:

# Import the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

# Keep first 4 columns
ds.modify_by_code_preview('return X[:, :4]')
Return type:Table
modify_by_recipe(recipe: Optional[Union[str, DataRecipe]] = None, names: Optional[List[str]] = None) Dict[str, Dataset]

Create a dictionary of new datasets from original dataset modified by a recipe.

The dictionary will map the dataset names to the returned element(s) from the recipe.

Parameters:
  • recipe (Union[str, DataRecipe, None]) – path to recipe or url for recipe or data recipe object
  • names (Optional[List[str]]) – optional list of names for the new dataset(s)

Examples:

# Import the airlines dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/airlines/allyears2k_headers.zip',
    data_source='s3'
)

# Modify original dataset with a recipe
new_ds = ds.modify_by_recipe(
    recipe='https://github.com/h2oai/driverlessai-recipes/blob/master/data/airlines_multiple.py',
    names=['new_airlines1', 'new_airlines2']
)
Return type:Dict[str, Dataset]
property name: str

Display name.

Return type:str
rename(name: str) Dataset

Change dataset display name.

Parameters:name (str) – new display name

Examples:

# Import the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)
ds.name

ds.rename(name='new-iris-name')
ds.name
Return type:Dataset
set_datetime_format(columns: Dict[str, str]) None

Set datetime format of columns.

Parameters:columns (Dict[str, str]) – dictionary where the key is the column name and the value is a valid datetime format

Examples:

# Import the Eurodate dataset
date = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/jira/v-11-eurodate.csv',
    data_source='s3'
)

# Set the date time format for column ‘ds5'
date.set_datetime_format({'ds5': '%d-%m-%y %H:%M'})
Return type:None
set_logical_types(columns: Dict[str, Union[str, List[str]]]) None

Designate columns to have the specified logical types. The logical type is mainly used to determine which transformers to try on the column’s data.

Possible logical types:

  • 'categorical'
  • 'date'
  • 'datetime'
  • 'id'
  • 'numerical'
  • 'text'
Parameters:columns (Dict[str, Union[str, List[str]]]) – dictionary where the key is the column name and the value is the logical type or a list of logical types for the column (to unset all logical types use a value of None)

Example:

# Import the prostate dataset
prostate = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/prostate/prostate.csv',
    data_source='s3'
)

# Set the logical types
prostate.set_logical_types(
    {'ID': 'id', 'AGE': ['categorical', 'numerical'], 'RACE': None}
)
Return type:None
property shape: Tuple[int, int]

Dimensions (rows, cols).

Return type:Tuple[int, int]
split_to_train_test(train_size: float = 0.5, train_name: Optional[str] = None, test_name: Optional[str] = None, target_column: Optional[str] = None, fold_column: Optional[str] = None, time_column: Optional[str] = None, seed: int = 1234) Dict[str, Dataset]

Split a dataset into train/test sets on the Driverless AI server and return a dictionary of Dataset objects with the keys 'train_dataset' and 'test_dataset'.

Parameters:
  • train_size (float) – proportion of dataset rows to put in the train split
  • train_name (Optional[str]) – name for the train dataset
  • test_name (Optional[str]) – name for the test dataset
  • target_column (Optional[str]) – use stratified sampling to create splits
  • fold_column (Optional[str]) – keep rows belonging to the same group together
  • time_column (Optional[str]) – split rows such that the splits are sequential with respect to time
  • seed (int) – random seed

Note

Only one of target_column, fold_column, or time_column can be passed at a time.

Examples:

# Import the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

# Split the iris dataset into train/test sets
ds_split = ds.split_to_train_test(train_size=0.7)
Return type:Dict[str, Dataset]
split_to_train_test_async(train_size: float = 0.5, train_name: Optional[str] = None, test_name: Optional[str] = None, target_column: Optional[str] = None, fold_column: Optional[str] = None, time_column: Optional[str] = None, seed: int = 1234) DatasetSplitJob

Launch creation of a dataset train/test split on the Driverless AI server and return a DatasetSplitJob object to track the status.

Parameters:
  • train_size (float) – proportion of dataset rows to put in the train split
  • train_name (Optional[str]) – name for the train dataset
  • test_name (Optional[str]) – name for the test dataset
  • target_column (Optional[str]) – use stratified sampling to create splits
  • fold_column (Optional[str]) – keep rows belonging to the same group together
  • time_column (Optional[str]) – split rows such that the splits are sequential with respect to time
  • seed (int) – random seed

Note

Only one of target_column, fold_column, or time_column can be passed at a time.

Examples:

# Import the iris dataset
ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

# Launch the creation of a dataset train/test split on the DAI server
ds_split = ds.split_to_train_test_async(train_size=0.7)
Return type:DatasetSplitJob
summarize() DatasetSummary

Summarize this dataset using OpenAI GPT.

Warning

Requires DriverlessAI server version 1.10.6 or higher.

Warning

A beta API that is subject to future changes.

Return type:DatasetSummary
summarize_async() DatasetSummarizeJob

Summarize this dataset using OpenAI GPT.

Args:
openai_api_secret_key: OpenAI API secret key for connecting with OpenAI

Warning

Requires DriverlessAI server version 1.10.6 or higher.

Warning

A beta API that is subject to future changes.

Return type:DatasetSummarizeJob
tail(num_rows: int = 5) Table

Return headers and last n rows of dataset in a Table.

Parameters:num_rows (int) – number of rows to show

Examples:

ds = dai.datasets.create(
    data='s3://h2o-public-test-data/smalldata/iris/iris.csv',
    data_source='s3'
)

# Print the headers and last 5 rows
print(ds.tail(num_rows=5))
Return type:Table
class DatasetJob

Monitor creation of a dataset on the Driverless AI server.

is_complete() bool

Return True if job completed successfully.

Return type:bool
is_running() bool

Return True if job is scheduled, running, or finishing.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str
result(silent: bool = False) Dataset

Wait for job to complete, then return a Dataset object.

Parameters:silent (bool) – if True, don’t display status updates
Return type:Dataset
status(verbose: int = 0) str

Return job status string.

Parameters:verbose (int) –
  • 0: short description
  • 1: short description with progress percentage
  • 2: detailed description with progress percentage
Return type:str

Experiment

Experiment objects correspond to existing experiments on a Driverless AI server. Experiment objects are retrievable using the Client.

API Reference:

class Experiment

Interact with an experiment on the Driverless AI server.

abort() None

Terminate experiment immediately and only generate logs.

Return type:None
property artifacts: driverlessai._experiments.ExperimentArtifacts

Interact with artifacts that are created when the experiment completes.

Return type:ExperimentArtifacts
autodoc() AutoDoc

Returns the autodoc generated for this experiment. If it has not generated, creates a new autodoc and returns.

Return type:AutoDoc
property creation_timestamp: float

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

Return type:float
property datasets: Dict[str, Optional[driverlessai._datasets.Dataset]]

Dictionary of train_dataset, validation_dataset, and test_dataset used for the experiment.

Return type:Dict[str, Optional[Dataset]]
delete() None

Permanently delete experiment from the Driverless AI server.

Return type:None
export_dai_file(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Export experiment from Driverless AI server in dai format.

Args:

dst_dir: directory where dai file will be saved dst_file: name of dai file (overrides default file name) file_system: FSSPEC based file system to download to,

instead of local file system

overwrite: overwrite existing file timeout: connection timeout in seconds

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:str
export_triton_model(deploy_predictions: bool = True, deploy_shapley: bool = False, deploy_original_shapley: bool = False, enable_high_concurrency: bool = False) TritonModelArtifact

Exports the model of this experiment as a Triton model.

Args:
deploy_predictions: whether to deploy model predictions deploy_shapley: whether to deploy model Shapley deploy_original_shapley: whether to deploy model original Shapley enable_high_concurrency: whether to enable handling multiple requests at once

Returns: a triton model

Warning

A beta API that is subject to future changes.

Return type:TritonModelArtifact
finish() None

Finish experiment by jumping to final pipeline training and generating experiment artifacts.

Return type:None
fit_and_transform(training_dataset: Dataset, validation_split_fraction: float = 0, seed: int = 1234, fold_column: str = None, test_dataset: Dataset = None, validation_dataset: Dataset = None) FitAndTransformation

Transform a dataset, then return a FitAndTransformation object.

Parameters:
  • training_dataset (Dataset) – dataset to be used for refitting the data transformation pipeline,
  • validation_split_fraction (float) – fraction of data used for validation,
  • seed (int) – random seed to use to start a random generator,
  • fold_column (Optional[str]) – column to create a stratified validation split,
  • test_dataset (Optional[Dataset]) – dataset to be used for final testing,
  • validation_dataset (Optional[Dataset]) – dataset to be used for tune parameters of models
Return type:

FitAndTransformation

fit_and_transform_async(training_dataset: Dataset, validation_split_fraction: float = 0, seed: int = 1234, fold_column: str = None, test_dataset: Dataset = None, validation_dataset: Dataset = None) FitAndTransformationJob

Launch transform job on a dataset and return a FitAndTransformationJob object to track the status.

Parameters:
  • training_dataset (Dataset) – dataset to be used for refitting the data transformation pipeline,
  • validation_split_fraction (float) – fraction of data used for validation,
  • seed (int) – random seed to use to start a random generator,
  • fold_column (Optional[str]) – column to create a stratified validation split,
  • test_dataset (Optional[Dataset]) – dataset to be used for final testing,
  • validation_dataset (Optional[Dataset]) – dataset to be used for tune parameters of models
Return type:

FitAndTransformationJob

gui() Hyperlink

Get full URL for the experiment’s page on the Driverless AI server.

Return type:Hyperlink
is_complete() bool

Return True if job completed successfully.

Return type:bool
property is_deprecated: bool

True if experiment was created by an old version of Driverless AI and is no longer fully compatible with the current server version.

Return type:bool
is_running() bool

Return True if job is scheduled, running, or finishing.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property log: driverlessai._experiments.ExperimentLog

Interact with experiment logs.

Return type:ExperimentLog
property metric_plots: Optional[driverlessai._experiments.ExperimentMetricPlots]

Metric plots of this model diagnostic.

Warning

Requires DriverlessAI server version 1.9.0 or higher.

Warning

A beta API that is subject to future changes.

Return type:Optional[ExperimentMetricPlots]
metrics() Dict[str, Union[str, float]]

Return dictionary of experiment scorer metrics and AUC metrics, if available.

Return type:Dict[str, Union[str, float]]
property name: str

Display name.

Return type:str
notifications() List[Dict[str, str]]

Return list of experiment notification dictionaries.

Return type:List[Dict[str, str]]
predict(dataset: Union[_datasets.Dataset, pandas.DataFrame], enable_mojo: bool = True, include_columns: Optional[List[str]] = None, include_labels: Optional[bool] = None, include_raw_outputs: Optional[bool] = None, include_shap_values_for_original_features: Optional[bool] = None, include_shap_values_for_transformed_features: Optional[bool] = None, use_fast_approx_for_shap_values: Optional[bool] = None) Prediction

Predict on a dataset, then return a Prediction object.

Parameters:
  • dataset (Union[ForwardRef, ForwardRef]) – a Dataset object corresponding to a dataset on the Driverless AI server or a Pandas DataFrame
  • enable_mojo (bool) – use MOJO (if available) to make predictions (server versions >= 1.9.1)
  • include_columns (Optional[List[str]]) – list of columns from the dataset to append to the prediction csv
  • include_labels (Optional[bool]) – append labels in addition to probabilities for classification, ignored for regression (server versions >= 1.10)
  • include_raw_outputs (Optional[bool]) – append predictions as margins (in link space) to the prediction csv
  • include_shap_values_for_original_features (Optional[bool]) – append original feature contributions to the prediction csv (server versions >= 1.9.1)
  • include_shap_values_for_transformed_features (Optional[bool]) – append transformed feature contributions to the prediction csv
  • use_fast_approx_for_shap_values (Optional[bool]) – speed up prediction contributions with approximation (server versions >= 1.9.1)
Return type:

Prediction

predict_async(dataset: Union[_datasets.Dataset, pandas.DataFrame], enable_mojo: bool = True, include_columns: Optional[List[str]] = None, include_labels: Optional[bool] = None, include_raw_outputs: Optional[bool] = None, include_shap_values_for_original_features: Optional[bool] = None, include_shap_values_for_transformed_features: Optional[bool] = None, use_fast_approx_for_shap_values: Optional[bool] = None) PredictionJobs

Launch prediction job on a dataset and return a PredictionJobs object to track the status.

Parameters:
  • dataset (Union[ForwardRef, ForwardRef]) – a Dataset object corresponding to a dataset on the Driverless AI server or a Pandas DataFrame
  • enable_mojo (bool) – use MOJO (if available) to make predictions (server versions >= 1.9.1)
  • include_columns (Optional[List[str]]) – list of columns from the dataset to append to the prediction csv
  • include_labels (Optional[bool]) – append labels in addition to probabilities for classification, ignored for regression (server versions >= 1.10)
  • include_raw_outputs (Optional[bool]) – append predictions as margins (in link space) to the prediction csv
  • include_shap_values_for_original_features (Optional[bool]) – append original feature contributions to the prediction csv (server versions >= 1.9.1)
  • include_shap_values_for_transformed_features (Optional[bool]) – append transformed feature contributions to the prediction csv
  • use_fast_approx_for_shap_values (Optional[bool]) – speed up prediction contributions with approximation (server versions >= 1.9.1)
Return type:

PredictionJobs

rename(name: str) Experiment

Change experiment display name.

Parameters:name (str) – new display name
Return type:Experiment
result(silent: bool = False) Experiment

Wait for training to complete, then return self.

Parameters:silent (bool) – if True, don’t display status updates
Return type:Experiment
retrain(use_smart_checkpoint: bool = False, final_pipeline_only: bool = False, final_models_only: bool = False, **kwargs: Any) Experiment

Create a new experiment using the same datasets and settings. Through kwargs it’s possible to pass new datasets or overwrite settings.

Parameters:
  • use_smart_checkpoint (bool) – start experiment from last smart checkpoint
  • final_pipeline_only (bool) – trains final pipeline using smart checkpoint if available, otherwise uses default hyperparameters
  • final_models_only (bool) – trains final pipeline models (but not transformers) using smart checkpoint if available, otherwise uses default hyperparameters and transformers (overrides final_pipeline_only)
  • kwargs (Any) – datasets and experiment settings as defined in experiments.create()
Return type:

Experiment

retrain_async(use_smart_checkpoint: bool = False, final_pipeline_only: bool = False, final_models_only: bool = False, **kwargs: Any) Experiment

Launch creation of a new experiment using the same datasets and settings. Through kwargs it’s possible to pass new datasets or overwrite settings.

Parameters:
  • use_smart_checkpoint (bool) – start experiment from last smart checkpoint
  • final_pipeline_only (bool) – trains final pipeline using smart checkpoint if available, otherwise uses default hyperparameters
  • final_models_only (bool) – trains final pipeline models (but not transformers) using smart checkpoint if available, otherwise uses default hyperparameters and transformers (overrides final_pipeline_only)
  • kwargs (Any) – datasets and experiment settings as defined in experiments.create()
Return type:

Experiment

property run_duration: Optional[float]

Run duration in seconds.

Return type:Optional[float]
property settings: Dict[str, Any]

Experiment settings.

Return type:Dict[str, Any]
property size: int

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

Return type:int
status(verbose: int = 0) str

Return job status string.

Parameters:verbose (int) –
  • 0: short description
  • 1: short description with progress percentage
  • 2: detailed description with progress percentage
Return type:str
summary() None

Print experiment summary.

Warning

A deprecated API that will be removed from v1.10.6.2 onwards.

Return type:None
to_dict() Union[Dict, object]

Dump experiment meta data to a python dictionary

Warning

A beta API that is subject to future changes.

Return type:Union[Dict, object]
transform(dataset: Dataset, enable_mojo: bool = True, include_columns: Optional[List[str]] = None, include_labels: Optional[bool] = True) Transformation

Transform a dataset, then return a Transformation object.

Parameters:
  • dataset (Dataset) – a Dataset object corresponding to a dataset on the Driverless AI server
  • enable_mojo (bool) – use MOJO (if available) to make transformation (server versions >= 1.9.1)
  • include_columns (Optional[List[str]]) – list of columns from the dataset to append to the prediction csv
  • include_labels (Optional[bool]) – append labels in addition to probabilities for classification, ignored for regression (server versions >= 1.10)
Return type:

Transformation

transform_async(dataset: Dataset, enable_mojo: bool = True, include_columns: Optional[List[str]] = None, include_labels: Optional[bool] = None) TransformationJob
Launch transform job on a dataset and return a TransformationJob object

to track the status.

Args:
dataset: a Dataset object corresponding to a dataset on the
Driverless AI server
enable_mojo: use MOJO (if available) to make transformations
(server versions >= 1.9.1)
include_columns: list of columns from the dataset to append to the
prediction csv
include_labels: append labels in addition to probabilities for
classification, ignored for regression (server versions >= 1.10)

Warning

Requires DriverlessAI server version 1.10.4.1 or higher.

Return type:TransformationJob
variable_importance(iteration: Optional[int] = None, model_index: Optional[int] = None) Optional[Table]

Get variable importance of an iteration in a Table.

Parameters:
  • iteration (Optional[int]) – which iteration of the experiment
  • model_index (Optional[int]) – the zero-based index of model that was generated in a particular iteration
Return type:

Optional[Table]

class ExperimentMetricPlots

Interacts with metric plots of an experiment on the Driverless AI server.

property actual_vs_predicted_chart: Optional[Dict[str, Any]]

Actual vs predicted Chart of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:an actual vs predicted chart in Vega Lite (v3) format
confusion_matrix(threshold: Optional[float] = None) Optional[List[List[Any]]]

Confusion Matrix of this model diagnostic.

Parameters:threshold (Optional[float]) – a threshold value
Return type:Optional[List[List[Any]]]
Returns:the confusion matrix as a 2D list
property gains_chart: Optional[Dict[str, Any]]

Cumulative Gain Chart of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a gains chart in Vega Lite (v3) format
property ks_chart: Optional[Dict[str, Any]]

Kolmogorov-Smirnov Chart of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a Kolmogorov-Smirnov chart in Vega Lite (v3) format
property lift_chart: Optional[Dict[str, Any]]

Lift Chart of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a lift chart in Vega Lite (v3) format
property prec_recall_curve: Optional[Dict[str, Any]]

Precision-Recall Curve of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a precision-recall chart in Vega Lite (v3) format
property residual_plot: Optional[Dict[str, Any]]

Residual Plot with LOESS Curve of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a residual plot in Vega Lite (v3) format
property roc_curve: Optional[Dict[str, Any]]

ROC Curve of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a ROC curve in Vega Lite (v3) format

Experiment Artifacts

Experiment artifacts include anything outputted after a successfully completed experiment. These artificats include the autoreport, scoring pipelines, prediction csvs, experiment summary, and logs.

API Reference:

class ExperimentArtifacts

Interact with files created by an experiment on the Driverless AI server.

create(artifact: str) None

(Re)build certain artifacts, if possible.

(re)buildable artifacts:

  • 'autodoc'
  • 'mojo_pipeline'
  • 'python_pipeline'
Parameters:artifact (str) – name of artifact to (re)build
Return type:None
download(only: Union[str, List[str]] = None, dst_dir: str = '.', file_system: Optional[fsspec.spec.AbstractFileSystem] = None, include_columns: Optional[List[str]] = None, overwrite: bool = False, timeout: float = 30) Dict[str, str]

Download experiment artifacts from the Driverless AI server. Returns a dictionary of relative paths for the downloaded artifacts.

Parameters:
  • only (Union[str, List[str]]) – specify specific artifacts to download, use experiment.artifacts.list() to see the available artifacts on the Driverless AI server
  • dst_dir (str) – directory where experiment artifacts will be saved
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • include_columns (Optional[List[str]]) – list of dataset columns to append to prediction csvs
  • overwrite (bool) – overwrite existing files
  • timeout (float) – connection timeout in seconds
Return type:

Dict[str, str]

export(only: Optional[Union[str, List[str]]] = None, include_columns: Optional[List[str]] = None, **kwargs: Any) Dict[str, str]

Export experiment artifacts from the Driverless AI server. Returns a dictionary of relative paths for the exported artifacts.

Parameters:
  • only (Union[str, List[str], None]) – specify specific artifacts to export, use ex.artifacts.list() to see the available artifacts on the Driverless AI server
  • include_columns (Optional[List[str]]) – list of dataset columns to append to prediction csvs

Note

Export location is configured on the Driverless AI server.

Return type:Dict[str, str]
property file_paths: Dict[str, str]

Paths to artifact files on the server.

Return type:Dict[str, str]
list() List[str]

List of experiment artifacts that exist on the Driverless AI server.

Return type:List[str]

Experiment Logs

Experiment logs list the events recorded during an experiment.

API Reference:

class ExperimentLog

Interact with experiment logs.

download(archive: bool = True, dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Download experiment logs from the Driverless AI server.

Parameters:
  • archive (bool) – if available, prefer downloading an archive that contains multiple log files and stack traces if any were created
  • dst_dir (str) – directory where logs will be saved
  • dst_file (Optional[str]) – name of log file (overrides default file name)
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing file
  • timeout (float) – connection timeout in seconds
Return type:

str

property file_name: str

Filename of the log file.

Return type:str
head(num_lines: int = 50) str

Print first n lines of log.

Parameters:num_lines (int) – number of lines to print
Return type:str
tail(num_lines: int = 50) str

Print last n lines of log.

Parameters:num_lines (int) – number of lines to print
Return type:str

Predictions

Prediction objects are created when predicting on a new dataset.

API Reference:

class Prediction

Interact with predictions from the Driverless AI server.

download(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Download csv of predictions.

Parameters:
  • dst_dir (str) – directory where csv will be saved
  • dst_file (Optional[str]) – name of csv file (overrides default file name)
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing file
  • timeout (float) – connection timeout in seconds
Return type:

str

property file_paths: List[str]

Paths to prediction csv files on the server.

Return type:List[str]
property included_dataset_columns: List[str]

Columns from dataset that are appended to predictions.

Return type:List[str]
property includes_labels: bool

Whether classification labels are appended to predictions.

Return type:bool
property includes_raw_outputs: bool

Whether predictions as margins (in link space) were appended to predictions.

Return type:bool
property includes_shap_values_for_original_features: bool

Whether original feature contributions are appended to predictions (server versions >= 1.9.1).

Return type:bool
property includes_shap_values_for_transformed_features: bool

Whether transformed feature contributions are appended to predictions.

Return type:bool
property keys: Dict[str, str]

Dictionary of unique IDs for entities related to the prediction: dataset: unique ID of dataset used to make predictions experiment: unique ID of experiment used to make predictions prediction: unique ID of predictions

Return type:Dict[str, str]
to_pandas() pandas.DataFrame

Transfer predictions to a local Pandas DataFrame.

Return type:pandas.DataFrame
property used_fast_approx_for_shap_values: Optional[bool]

Whether approximation was used to calculate prediction contributions (server versions >= 1.9.1).

Return type:Optional[bool]
class PredictionJobs

Monitor creation of predictions on the Driverless AI server.

property included_dataset_columns: List[str]

Columns from dataset that are appended to predictions.

Return type:List[str]
property includes_labels: bool

Whether classification labels are appended to predictions.

Return type:bool
property includes_raw_outputs: bool

Whether predictions as margins (in link space) are appended to predictions.

Return type:bool
property includes_shap_values_for_original_features: bool

Whether original feature contributions are appended to predictions (server versions >= 1.9.1).

Return type:bool
property includes_shap_values_for_transformed_features: bool

Whether transformed feature contributions are appended to predictions.

Return type:bool
is_complete() bool

Return True if all jobs completed successfully.

Return type:bool
is_running() bool

Return True if one or more jobs is running or finishing.

Return type:bool
property jobs: Sequence[driverlessai._commons.ServerJob]

List of ServerJob objects.

Return type:Sequence[ServerJob]
property keys: Dict[str, str]

Dictionary of entity unique IDs: dataset: unique ID of dataset used to make predictions experiment: unique ID of experiment used to make predictions prediction: unique ID of predictions

Return type:Dict[str, str]
result(silent: bool = False) Prediction

Wait for all jobs to complete.

Parameters:silent (bool) – if True, don’t display status updates
Return type:Prediction
status(verbose: int = 0) List[str]

Returns list of job status strings.

Parameters:verbose (int) –
  • 0: short description
  • 1: short description with progress percentage
  • 2: detailed description with progress percentage
Return type:List[str]
property used_fast_approx_for_shap_values: Optional[bool]

Whether approximation was used to calculate prediction contributions (server versions >= 1.9.1).

Return type:Optional[bool]

Transformations

Transformation objects are created when transforming a new dataset using a trained model.

API Reference:

class Transformation

Interact with transformed data from the Driverless AI server.

download(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Download csv of transformed data.

Parameters:
  • dst_dir (str) – directory where csv will be saved
  • dst_file (Optional[str]) – name of csv file (overrides default file name)
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing file
  • timeout (float) – connection timeout in seconds
Return type:

str

property file_path: str

Paths to transformed csv files on the server.

Return type:str
property included_dataset_columns: List[str]

Columns from dataset that are appended to transformed data.

Return type:List[str]
property includes_labels: bool

Whether classification labels are appended to transformed data.

Return type:bool
property keys: Dict[str, str]

Dictionary of unique IDs for entities related to the transformed data: dataset: unique ID of dataset used to make transformed data experiment: unique ID of experiment used to make transformed data transformed_data: unique ID of transformed data

Return type:Dict[str, str]
to_pandas() pandas.DataFrame

Transfer transformed data to a local Pandas DataFrame.

Return type:pandas.DataFrame
class TransformationJob

Monitor creation of data transformation on the Driverless AI server.

property included_dataset_columns: List[str]

Columns from dataset that are appended to transformed data.

Return type:List[str]
property includes_labels: bool

Whether classification labels are appended to transformed data.

Return type:bool
is_complete() bool

Return True if job completed successfully.

Return type:bool
is_running() bool

Return True if job is scheduled, running, or finishing.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property keys: Dict[str, str]

Dictionary of entity unique IDs: dataset: unique ID of dataset used to make transformed data experiment: unique ID of experiment used to make transformed data transformed_data: unique ID of transformed_data

Return type:Dict[str, str]
property name: str

Display name.

Return type:str
result(silent: bool = False) Transformation

Wait for job to complete, then return self.

Parameters:silent (bool) – if True, don’t display status updates
Return type:Transformation
status(verbose: Optional[int] = None) str

Return short job status description string.

Return type:str
class FitAndTransformation

Interact with fit and transformed data from the Driverless AI server.

download_transformed_test_dataset(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Download fit and transformed test dataset in CSV format.

Parameters:
  • dst_dir (str) – directory where csv will be saved
  • dst_file (Optional[str]) – name of csv file (overrides default file name)
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing file
  • timeout (float) – connection timeout in seconds
Return type:

str

download_transformed_training_dataset(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Download fit and transformed training dataset in CSV format.

Parameters:
  • dst_dir (str) – directory where csv will be saved
  • dst_file (Optional[str]) – name of csv file (overrides default file name)
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing file
  • timeout (float) – connection timeout in seconds
Return type:

str

download_transformed_validation_dataset(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Download fit and transformed validation dataset in CSV format.

Parameters:
  • dst_dir (str) – directory where csv will be saved
  • dst_file (Optional[str]) – name of csv file (overrides default file name)
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing file
  • timeout (float) – connection timeout in seconds
Return type:

str

property fold_column: str

Column that creates the stratified validation split.

Return type:str
property seed: int

Random seed that used to start a random generator.

Return type:int
property test_dataset: Optional[driverlessai._datasets.Dataset]

Test dataset used for this transformation.

Return type:Optional[Dataset]
property training_dataset: driverlessai._datasets.Dataset

Training dataset used for this transformation.

Return type:Dataset
property validation_dataset: Optional[driverlessai._datasets.Dataset]

Validation dataset used for this transformation.

Return type:Optional[Dataset]
property validation_split_fraction: float

Fraction of data used for validation.

Return type:float
class FitAndTransformationJob
is_complete() bool

Return True if job completed successfully.

Return type:bool
is_running() bool

Return True if job is scheduled, running, or finishing.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str
result(silent: bool = False) FitAndTransformation

Wait for job to complete, then return self.

Args: silent: if True, don’t display status updates

Return type:FitAndTransformation
status(verbose: int = 0) str

Return job status string.

Parameters:verbose (int) –
  • 0: short description
  • 1: short description with progress percentage
  • 2: detailed description with progress percentage
Return type:str

Interpretation

Interpretation objects correspond to existing interpretations on a Driverless AI server. Interpretation objects are retrievable using the Client.

API Reference:

class Interpretation

Interact with an MLI interpretation on the Driverless AI server.

property artifacts: driverlessai._mli.InterpretationArtifacts

Interact with artifacts that are created when the interpretation completes.

Return type:InterpretationArtifacts
property creation_timestamp: float

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

Return type:float
property dataset: Optional[driverlessai._datasets.Dataset]

Dataset for the interpretation.

Return type:Optional[Dataset]
delete() None

Delete MLI interpretation on Driverless AI server.

Return type:None
property experiment: Optional[driverlessai._experiments.Experiment]

Experiment for the interpretation.

Return type:Optional[Experiment]
property explainers: Sequence[driverlessai._mli.Explainer]

Explainers that were ran as an ExplainerList object.

Warning

Requires DriverlessAI server version 1.10.5 or higher.

Warning

A beta API that is subject to future changes.

Return type:Sequence[Explainer]
property explanation_plots: driverlessai._mli.ExplanationPlots

Explanations that were created for the interpretation.

Warning

Requires DriverlessAI server version 1.10.5 or higher.

Warning

A beta API that is subject to future changes.

Return type:ExplanationPlots
gui() Hyperlink

Get full URL for the interpretation’s page on the Driverless AI server.

Return type:Hyperlink
is_complete() bool

Return True if job completed successfully.

Return type:bool
is_running() bool

Return True if job is scheduled, running, or finishing.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str
rename(name: str) Interpretation

Change interpretation display name.

Parameters:name (str) – new display name
Return type:Interpretation
result(silent: bool = False) Interpretation

Wait for job to complete, then return an Interpretation object.

Return type:Interpretation
property run_duration: Optional[float]

Run duration in seconds.

Return type:Optional[float]
property settings: Dict[str, Any]

Interpretation settings.

Return type:Dict[str, Any]
status(verbose: int = 0) str

Return job status string.

Parameters:verbose (int) –
  • 0: short description
  • 1: short description with progress percentage
  • 2: detailed description with progress percentage
Return type:str

Interpretation Artifacts

Interpretation artifacts include anything available for download after a successfully completed interpretation.

API Reference:

class InterpretationArtifacts

Interact with files created by an MLI interpretation on the Driverless AI server.

download(only: Union[str, List[str]] = None, dst_dir: str = '.', file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) Dict[str, str]

Download interpretation artifacts from the Driverless AI server. Returns a dictionary of relative paths for the downloaded artifacts.

Parameters:
  • only (Union[str, List[str]]) – specify specific artifacts to download, use interpretation.artifacts.list() to see the available artifacts on the Driverless AI server
  • dst_dir (str) – directory where interpretation artifacts will be saved
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing files
  • timeout (float) – connection timeout in seconds
Return type:

Dict[str, str]

property file_paths: Dict[str, str]

Paths to interpretation artifact files on the server.

Return type:Dict[str, str]
list() List[str]

List of interpretation artifacts that exist on the Driverless AI server.

Return type:List[str]

Explainer

Explainer objects correspond to explainers that were run as part an interpretation on a Driverless AI server.

API Reference:

class Explainer

Interact with an MLI explainers on the Driverless AI server.

property artifacts: driverlessai._mli.ExplainerArtifacts

Artifacts of this explainer.

Return type:ExplainerArtifacts
property frames: Optional[driverlessai._mli.ExplainerFrames]

An ExplainerFrames object that contains the paths to the explainer frames retrieved from Driverless AI Server. If the explainer frame is not available, the value of this propertiy is None.

Return type:Optional[ExplainerFrames]
get_data(**kwargs: Any) ExplainerData

Retrieve the ExplainerData from the Driverless AI server. Raises a RuntimeError exception if the explainer has not been completed successfully.

Use help(explainer.get_data) to view help on available keyword arguments.

Return type:ExplainerData
property id: str

This explainer’s Id.

Return type:str
is_complete() bool

Return True if job completed successfully.

Return type:bool
is_running() bool

Return True if job is scheduled, running, or finishing.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str
result(silent: bool = False) Explainer

Wait for the explainer to complete, then return self.

Parameters:silent (bool) – if True, don’t display status updates
Return type:Explainer
status(verbose: int = 0) str

Return job status string.

Parameters:verbose (int) –
  • 0: short description
  • 1: short description with progress percentage
  • 2: detailed description with progress percentage
Return type:str
class ExplainerArtifacts

Interact with artifacts created by an explainer during interpretation on the Driverless AI server.

download(only: Union[str, List[str]] = None, dst_dir: str = '.', file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) Dict[str, str]

Download explainer artifacts from the Driverless AI server. Returns a dictionary of relative paths for the downloaded artifacts.

Parameters:
  • only (Union[str, List[str]]) – specify specific artifacts to download, use explainer.artifacts.list() to see the available artifacts on the Driverless AI server
  • dst_dir (str) – directory where interpretation artifacts will be saved
  • file_system (Optional[ForwardRef]) – FSSPEC based file system to download to, instead of local file system
  • overwrite (bool) – overwrite existing files
  • timeout (float) – connection timeout in seconds
Return type:

Dict[str, str]

property file_paths: Dict[str, str]

Paths to explainer artifact files on the server.

Return type:Dict[str, str]
list() List[str]

List of explainer artifacts that exist on the Driverless AI server.

Return type:List[str]
class ExplainerData

Interact with the result data of an explainer on the Driverless AI server.

property data: str

The explainer result data as string.

Return type:str
data_as_dict() Optional[Union[List, Dict]]

Return the explainer result data as a dictionary.

Return type:Union[List, Dict, None]
data_as_pandas() Optional[pandas.DataFrame]

Return the explainer result data as a pandas frame.

Warning

A beta API that is subject to future changes.

Return type:Optional[ForwardRef]
property data_format: str

The explainer data format.

Return type:str
property data_type: str

The explainer data type.

Return type:str
class ExplainerFrames

Interact with explanation frames created by an explainer during interpretation on the Driverless AI server.

download(frame_name: Union[str, List[str]] = None, dst_dir: str = '.', file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) Dict[str, str]

Download explainer frames from the Driverless AI server. Returns a dictionary of relative paths for the downloaded artifacts.

Parameters:
  • frame_name (Union[str, List[str]]) – specify specific frame to download, use explainer.frames.list() to see the available artifacts on the Driverless AI server
  • dst_dir (str) – directory where interpretation artifacts will be saved
  • file_system (Optional[ForwardRef]) – Optional[“fsspec.spec.AbstractFileSystem”] = None,
  • overwrite (bool) – overwrite existing files
  • timeout (float) – connection timeout in seconds
Return type:

Dict[str, str]

frame_as_pandas(frame_name: str, custom_tmp_dir: Optional[str] = None, keep_downloaded: bool = False) pandas.DataFrame
Download a frame with the given frame name to a temporary directory and

return it as a pandas.DataFrame.

Args:

frame_name: The name of the frame to open. custom_tmp_dir: If specified, use this directory as the temporary

directory instead of the default.
keep_downloaded: If True, do not delete the downloaded frame. Otherwise,
the downloaded frame is deleted before returning from this method.

Warning

A beta API that is subject to future changes.

Return type:pandas.DataFrame
frame_names() List[str]

List of explainer frames that exist on the Driverless AI server.

Return type:List[str]
property frame_paths: Dict[str, str]

Frame names and paths to artifact files on the server.

Return type:Dict[str, str]
class ExplainerList

List that lazy loads Explainer objects.

count(value) integer return number of occurrences of value
get_by_key(key: str) Explainer
Finds the explainer object that corresponds to the given key, and

initializes it if it is not already initialized.

Args:
key: The job key of the desired explainer

Warning

A beta API that is subject to future changes.

Return type:Explainer
get_by_name(name: str) Explainer
Finds the explainer object that corresponds to the given explainer name, and

initializes it if it is not already initialized.

Args:
key: The name of the desired explainer

Warning

A beta API that is subject to future changes.

Return type:Explainer
index(value[, start[, stop]]) integer return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

Explanation Plots

API Reference:

class ExplanationPlots

Interact with an MLI explanation plots on the DriverlessAI server.

DT_ID = 'h2oaicore.mli.byor.recipes.surrogates.dt_surrogate_explainer.DecisionTreeSurrogateExplainer'
ORIG_SHAP_ID = 'h2oaicore.mli.byor.recipes.original_contrib_explainer.NaiveShapleyExplainer'
PD_ID = 'h2oaicore.mli.byor.recipes.dai_pd_ice_explainer.DaiPdIceExplainer'
SHAP_SUM_ID = 'h2oaicore.mli.byor.recipes.shapley_summary_explainer.ShapleySummaryOrigFeatExplainer'
TRANS_SHAP_ID = 'h2oaicore.mli.byor.recipes.transformed_shapley_explainer.TransformedShapleyExplainer'
partial_dependence_plot(partial_dependence_type: Optional[str] = None, feature_name: Optional[str] = None, class_name: Optional[str] = None, row_number: Optional[int] = None) Dict[str, Any]

Partial dependence plot of this interpretation.

Parameters:
  • partial_dependence_type (Optional[str]) – type of the partial dependence (either categorical or numeric)
  • feature_name (Optional[str]) – feature name
  • class_name (Optional[str]) – name of the class
  • row_number (Optional[int]) – row number
Return type:

Dict[str, Any]

Returns:

a partial dependence plot

in Vega Lite (v3) format

shapley_summary_plot_for_original_features(class_name: Optional[str] = None) Dict[str, Any]

Shapley summary plot for original features of this interpretation

Parameters:class_name (Optional[str]) – class name
Return type:Dict[str, Any]
Returns:
a shapley summary plot for original features
in Vega Lite (v3) format
shapley_values_for_original_features(row_number: Optional[int] = None, class_name: Optional[str] = None) Dict[str, Any]

shapley values for transformed features plot of this interpretation.

Parameters:
  • row_number (Optional[int]) – row number
  • class_name (Optional[str]) – class name
Return type:

Dict[str, Any]

Returns:

a shapley values for original features plot

in Vega Lite (v3) format

shapley_values_for_transformed_features(class_name: Optional[str] = None, row_number: Optional[int] = None) Dict[str, Any]

shapley values for transformed features plot of this interpretation.

Parameters:
  • class_name (Optional[str]) – class name
  • row_number (Optional[int]) – row number of data
Return type:

Dict[str, Any]

Returns:

a shapley values for transformed features plot

in Vega Lite (v3) format

surrogate_decision_tree(row_number: Optional[int] = None, class_name: Optional[str] = None) Dict[str, Any]

Surrogate decision tree of this interpretation.

Parameters:
  • row_number (Optional[int]) – row number
  • class_name (Optional[str]) – class name
Return type:

Dict[str, Any]

Returns:

a surrogate decision tree in Vega (v3) format

Project

Project objects correspond to existing projects on a Driverless AI server. Project objects are retrievable using the Client.

API Reference:

class Project

Interact with a project on the Driverless AI server.

property datasets: Dict[str, Sequence[driverlessai._datasets.Dataset]]

Datasets linked to the project.

Return type:Dict[str, Sequence[Dataset]]
delete(include_experiments: bool = False) None

Permanently delete project from the Driverless AI server.

Parameters:include_experiments (bool) – unlink & delete experiments linked to this project.
Return type:None
property description: Optional[str]

Project description.

Return type:Optional[str]
property experiments: Sequence[driverlessai._experiments.Experiment]

Experiments linked to the project.

Return type:Sequence[Experiment]
gui() Hyperlink

Get full URL for the project’s page on the Driverless AI server.

Return type:Hyperlink
property key: str

Universally unique identifier.

Return type:str

Link a dataset to the project.

Parameters:
  • dataset (Dataset) – a Dataset object corresponding to a dataset on the Driverless AI server
  • dataset_type (str) – can be one of: 'train_dataset(s)', 'validation_dataset(s)', or 'test_dataset(s)'
  • link_associated_experiments (bool) – also link experiments that used the dataset (server versions >= 1.9.1)
Return type:

Project

Link an experiment to the project.

Parameters:experiment (Experiment) – an Experiment object corresponding to an experiment on the Driverless AI server
Return type:Project
property name: str

Display name.

Return type:str
redescribe(description: str) Project

Change project description.

Args:
description: new description

Warning

Requires DriverlessAI server version 1.9.1 or higher.

Return type:Project
rename(name: str) Project

Change project display name.

Parameters:name (str) – new display name
Return type:Project
share(username: str, role: str = 'Default') None
Share a project.

Storage connected.

Args:
username: Driverless AI username of user to share with role: one of “Default” or “Reader”

Warning

Requires DriverlessAI server version 1.9.3 or higher.

Return type:None
property sharings: List[Dict[str, Optional[str]]]
Users the project is shared with.
with H2O.ai Storage connected.

Warning

Requires DriverlessAI server version 1.9.3 or higher.

Return type:List[Dict[str, Optional[str]]]

Unlink a dataset from the project.

Parameters:
  • dataset (Dataset) – a Dataset object corresponding to a dataset on the Driverless AI server
  • dataset_type (str) – can be one of: 'train_dataset(s)', 'validation_dataset(s)', or 'test_dataset(s)'
Return type:

Project

Unlink an experiment from the project.

Parameters:experiment (Experiment) – an Experiment object corresponding to an experiment on the Driverless AI server
Return type:Project
unshare(username: str) None

Unshare a project Storage connected.

Args:
username: Driverless AI username of user to unshare with

Warning

Requires DriverlessAI server version 1.9.3 or higher.

Return type:None

Recipe

Recipe objects correspond to existing recipes on a Driverless AI server. Recipe objects are retrievable using the Client.

API Reference:

class ExplainerRecipe

Interact with an explainer recipe on the Driverless AI server.

activate() Recipe
Activate this custom recipe if it is inactive, and returns the newly activated custom recipe.

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:Recipe
property code: str

Code for this custom recipe.

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:str
deactivate() None

Deactivate this custom recipe if it is active.

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:None
property for_binomial: bool

True if explainer works for binomial models.

Return type:bool
property for_iid: bool

True if explainer works for I.I.D. models.

Return type:bool
property for_multiclass: bool

True if explainer works for multiclass models.

Return type:bool
property for_regression: bool

True if explainer works for regression models.

Return type:bool
property for_timeseries: bool

True if explainer works for time series models.

Return type:bool
property id: str

Identifier.

Return type:str
property is_active: bool

Whether this recipe is active or not.

Return type:bool
property is_custom: bool

Whether this recipe is a custom recipe or not.

Return type:bool
property key: str

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:str
property name: str

Display name.

Return type:str
search_settings(search_term: str = '', show_description: bool = False, show_dai_name: bool = False, show_valid_values: bool = False) Table

Search explainer settings and print results. Useful when looking for explainer kwargs (see explainer.with_settings()) to use when creating interpretations.

Parameters:
  • search_term (str) – term to search for (case-insensitive)
  • show_description (bool) – include description in results
  • show_dai_name (bool) – include settings name used by Driverless in the results
  • show_valid_values (bool) – include valid values that can be set for each setting in the results
Return type:

Table

property settings: Dict[str, Any]

Explainer settings set by user.

Return type:Dict[str, Any]
show_settings(show_dai_name: bool = False) Table

Display the modified settings and their corresponding values.

Parameters:show_dai_name (bool) – include settings name used by Driverless in the results
Return type:Table
update_code(code: str) Recipe
Update the code of this custom recipe and returns the newly created recipe with the updated code.

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:Recipe
with_settings(validate_value: bool = True, **kwargs: Any) ExplainerRecipe

Changes the explainer settings from defaults. Settings reset to defaults everytime this is called.

Parameters:validate_value (bool) – Enable value validation. Default is True.

Note

To search possible explainer settings for your server version, use explainer.search_settings(search_term).

Return type:ExplainerRecipe
class ModelRecipe

Interact with a model recipe on the Driverless AI server.

activate() Recipe
Activate this custom recipe if it is inactive, and returns the newly activated custom recipe.

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:Recipe
property code: str

Code for this custom recipe.

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:str
deactivate() None

Deactivate this custom recipe if it is active.

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:None
property is_active: bool

Whether this recipe is active or not.

Return type:bool
property is_custom: bool

Whether this recipe is a custom recipe or not.

Return type:bool
property is_unsupervised: bool

True if recipe doesn’t require a target column.

Return type:bool
property key: str

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:str
property name: str

Display name.

Return type:str
update_code(code: str) Recipe
Update the code of this custom recipe and returns the newly created recipe with the updated code.

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:Recipe
class ScorerRecipe

Interact with a scorer recipe on the Driverless AI server.

activate() Recipe
Activate this custom recipe if it is inactive, and returns the newly activated custom recipe.

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:Recipe
property code: str

Code for this custom recipe.

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:str
deactivate() None

Deactivate this custom recipe if it is active.

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:None
property description: str

Recipe description.

Return type:str
property for_binomial: bool

True if scorer works for binomial models.

Return type:bool
property for_multiclass: bool

True if scorer works for multiclass models.

Return type:bool
property for_regression: bool

True if scorer works for regression models.

Return type:bool
property is_active: bool

Whether this recipe is active or not.

Return type:bool
property is_custom: bool

Whether this recipe is a custom recipe or not.

Return type:bool
property key: str

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:str
property name: str

Display name.

Return type:str
update_code(code: str) Recipe
Update the code of this custom recipe and returns the newly created recipe with the updated code.

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:Recipe
class TransformerRecipe

Interact with a transformer recipe on the Driverless AI server.

activate() Recipe
Activate this custom recipe if it is inactive, and returns the newly activated custom recipe.

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:Recipe
property code: str

Code for this custom recipe.

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:str
deactivate() None

Deactivate this custom recipe if it is active.

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:None
property is_active: bool

Whether this recipe is active or not.

Return type:bool
property is_custom: bool

Whether this recipe is a custom recipe or not.

Return type:bool
property key: str

Warning

Requires DriverlessAI server version 1.10.3 or higher.

Return type:str
property name: str

Display name.

Return type:str
update_code(code: str) Recipe
Update the code of this custom recipe and returns the newly created recipe with the updated code.

Warning

Requires DriverlessAI server version 1.10.0 or higher.

Return type:Recipe

Utility

API Reference:

Renders clickable link in notebooks but otherwise behaves the same as str.

class Table

Table that pretty prints.

Parameters:
  • data (List[List[Any]]) – two-dimensional list
  • headers (List[str]) – column labels
property data: List[List[Any]]

Table data.

Return type:List[List[Any]]
property headers: List[str]

Table headers.

Return type:List[str]

Visualization

Visualization objects correspond to existing dataset visualizations on a Driverless AI server. Visualization objects are retrievable using the Client.

API Reference:

class Visualization

Interact with a dataset visualization on the Driverless AI server.

add_bar_chart(x_variable_name: str, y_variable_name: str = '', transpose: bool = False, mark: str = 'bar') CustomPlot

Adds a custom bar chart to this visualization and returns it.

Parameters:
  • x_variable_name (str) – column for the X axis
  • y_variable_name (str) – column for the Y axis, if omitted then number of occurrences is considered
  • transpose (bool) – set to True to flip axes
  • mark (str) – mark type used for the chart, use "point" to get a Cleveland dot plot
Return type:

CustomPlot

Returns:

a bar chart in Vega Lite (v3) format

add_box_plot(variable_name: str, transpose: bool = False) CustomPlot

Adds a custom box plot to this visualization and returns it.

Args:
variable_name: column for the plot transpose: set to True to flip axes
Returns:
a box plot in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_dot_plot(variable_name: str, mark: str = 'point') CustomPlot

Adds a custom dot plot to this visualization and returns it.

Args:

variable_name: column for the plot mark: mark type used for the plot,

possible values are "point", "square" or "bar"
Returns:
a dot plot in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_grouped_box_plot(variable_name: str, group_variable_name: str, transpose: bool = False) CustomPlot

Adds a custom grouped box plot to this visualization and returns it.

Args:
variable_name: column for the plot group_variable_name: grouping column transpose: set to True to flip axes
Returns:
a grouped box plot in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_heatmap(variable_names: Optional[List[str]] = None, permute: bool = False, transpose: bool = False, matrix_type: str = 'rectangular') CustomPlot

Adds a custom heatmap to this visualization and returns it.

Args:
variable_names: columns for the Heatmap,
if omitted then all columns are used
permute: set to True to permute rows and columns
using singular value decomposition (SVD)

transpose: set to True to flip axes matrix_type: matrix type,

possible values are "rectangular" or "symmetric"
Returns:
a heatmap in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_histogram(variable_name: str, number_of_bars: int = 0, transformation: str = 'none', mark: str = 'bar') CustomPlot

Adds a custom histogram to this visualization and returns it.

Args:

variable_name: column for the histogram number_of_bars: number of bars in the histogram transformation: a transformation applied to the column,

possible values are "none", "log" or "square_root"
mark: mark type used for the histogram, possible values are
"bar" or "area". Use "area" to get a density polygon.
Return:
a histogram in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_linear_regression(x_variable_name: str, y_variable_name: str, mark: str = 'point') CustomPlot

Adds a custom linear regression to this visualization and returns it.

Args:

x_variable_name: column for the X axis y_variable_name: column for the Y axis mark: mark type used for the plot,

possible values are "point" or "square"
Return:
a linear regression in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_loess_regression(x_variable_name: str, y_variable_name: str, mark: str = 'point', bandwidth: float = 0.5) CustomPlot

Adds a custom loess regression to this visualization and returns it.

Args:

x_variable_name: column for the X axis y_variable_name: column for the Y axis,

if omitted then number of occurrences is considered
mark: mark type used for the plot,
possible values are "point" or "square"

bandwidth: interval denoting proportion of cases in smoothing window

Return:
a loess regression in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_parallel_coordinates_plot(variable_names: List[str] = None, permute: bool = False, transpose: bool = False, cluster: bool = False) CustomPlot

Adds a custom parallel coordinates plot to this visualization and returns it.

Args:
variable_names: columns for the plot,
if omitted then all columns will be used
permute: set to True to permute rows and columns
using singular value decomposition (SVD)

transpose: set to True to flip axes cluster: set to True to k-means cluster variables and

color plot by cluster IDs
Return:
a parallel coordinates plot in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_probability_plot(x_variable_name: str, distribution: str = 'normal', mark: str = 'point', transpose: bool = False) CustomPlot

Adds a custom probability plot to this visualization and returns it.

Args:

x_variable_name: column for the X axis distribution: type of distribution,

possible values are "normal" or "uniform"
mark: mark type used for the plot,
possible values are "point" or "square"

transpose: set to True to flip axes

Return:
a probability plot in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_quantile_plot(x_variable_name: str, y_variable_name: str, distribution: str = 'normal', mark: str = 'point', transpose: bool = False) CustomPlot

Adds a custom quantile plot to this visualization and returns it.

Args:

x_variable_name: column for the X axis y_variable_name: column for the Y axis distribution: type of distribution,

possible values are "normal" or "uniform"
mark: mark type used for the plot,
possible values are "point" or "square"

transpose: set to True to flip axes

Return:
a quantile plot in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
add_scatter_plot(x_variable_name: str, y_variable_name: str, mark: str = 'point') CustomPlot

Adds a custom scatter plot to this visualization and returns it.

Args:

x_variable_name: column for the X axis y_variable_name: column for the Y axis,

if omitted then number of occurrences is considered
mark: mark type used for the plot,
possible values are "point" or "square"
Return:
a scatter plot in Vega Lite (v3) format

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:CustomPlot
property box_plots: Dict[str, List[Dict[str, Any]]]

Disparate box plots and heteroscedastic box plots of this visualization.

Return type:Dict[str, List[Dict[str, Any]]]
property custom_plots: List[driverlessai._autoviz.CustomPlot]

Custom plots added to this visualization.

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:List[CustomPlot]
property dataset: driverlessai._datasets.Dataset

Dataset that was visualized.

Return type:Dataset
delete() None

Permanently delete visualization from the Driverless AI server.

Return type:None
gui() Hyperlink

Get full URL for the visualization’s page on the Driverless AI server.

Return type:Hyperlink
property heatmaps: Dict[str, Dict[str, Any]]

Data heatmap and Missing values heatmap of this visualization.

Return type:Dict[str, Dict[str, Any]]
property histograms: Dict[str, List[Dict[str, Any]]]

Spikes, skewed, and gaps histograms of this visualization.

Return type:Dict[str, List[Dict[str, Any]]]
property is_deprecated: bool

True if visualization was created by an old version of Driverless AI and is no longer fully compatible with the current server version.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property log: driverlessai._autoviz.VisualizationLog

Log of this visualization.

Return type:VisualizationLog
property name: str

Display name.

Return type:str
property outliers: List[Dict[str, Any]]

Outlier plots of this visualization.

Return type:List[Dict[str, Any]]
property parallel_coordinates_plot: Dict[str, Any]

Parallel coordinates plot of this visualization.

Return type:Dict[str, Any]
property recommendations: Optional[Dict[str, Dict[str, str]]]

Recommended feature transformations and deletions by this visualization.

Return type:Optional[Dict[str, Dict[str, str]]]
remove_custom_plot(custom_plot: CustomPlot) None

Removes a previously added custom plot from this visualization.

Args:
custom_plot: custom plot to be removed & deleted

Warning

Requires DriverlessAI server version 1.9.0.6 or higher.

Return type:None
property scatter_plot: Optional[Dict[str, Any]]

Scatter plot of this visualization.

Return type:Optional[Dict[str, Any]]
class VisualizationJob

Monitor creation of a visualization on the Driverless AI server.

is_complete() bool

Return True if job completed successfully.

Return type:bool
is_running() bool

Return True if job is scheduled, running, or finishing.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str
result(silent: bool = False) Visualization

Wait for job to complete, then return a Visualization object.

Parameters:silent (bool) – if True, don’t display status updates
Return type:Visualization
status(verbose: int = 0) str

Return job status string.

Parameters:verbose (int) –
  • 0: short description
  • 1: short description with progress percentage
  • 2: detailed description with progress percentage
Return type:str
class CustomPlot

Interact with a custom plot added into a visualization on the Driverless AI server.

property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str
property plot_data: Dict[str, Any]

Plot in Vega Lite (v3) format.

Return type:Dict[str, Any]

Admin API

The Admin API performs administrative tasks on the Driverless AI server. The Admin API is accessible using the Client.

API Reference:

class Admin
property is_admin: Optional[bool]

Returns True if the user is an admin.

Return type:Optional[bool]
list_current_users() List[str]
Returns a list of users who are currently
logged-in to the Driverless AI server.

Warning

Requires DriverlessAI server version 1.10.5 or higher.

Warning

A beta API that is subject to future changes.

Return type:List[str]
list_datasets(username: str) List[DatasetProxy]

List datasets of the specified user.

Warning

A beta API that is subject to future changes.

Return type:List[DatasetProxy]
list_experiments(username: str) List[ExperimentProxy]

List experiments of the specified user.

Warning

A beta API that is subject to future changes.

Return type:List[ExperimentProxy]
list_server_logs() List[DAIServerLog]

Lists the server logs of Driverless AI server.

Warning

Requires DriverlessAI server version 1.10.5 or higher.

Return type:List[DAIServerLog]
list_users() List[str]

Returns a list of users in the Driverless AI server.

Return type:List[str]
transfer_data(from_user: str, to_user: str) None

Transfer all data of from_user to to_user.

Return type:None
class DatasetProxy

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

delete() None

Delete this entity.

Return type:None
property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str
property owner: str

Owner of the object.

Return type:str
class ExperimentProxy

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

property creation_timestamp: float

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

Return type:float
property datasets: Dict[str, Optional[driverlessai._admin.DatasetProxy]]

Dictionary of train_dataset,``validation_dataset``, and test_dataset used for this experiment.

Return type:Dict[str, Optional[DatasetProxy]]
delete() None

Delete this entity.

Return type:None
is_complete() bool

Returns True if this job completed successfully.

Return type:bool
is_running() bool

Returns True if this job is scheduled, running, or finishing.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str
property owner: str

Owner of the object.

Return type:str
property run_duration: Optional[float]

Run duration in seconds.

Return type:Optional[float]
property settings: Dict[str, Any]

Experiment settings.

Return type:Dict[str, Any]
property size: int

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

Return type:int
status(verbose: int = 0) str

Returns the status of this job.

Parameters:verbose (int) –
  • 0: short description
  • 1: short description with progress percentage
  • 2: detailed description with progress percentage
Return type:str
class DAIServerLog

An entity to represent a log file in the server.

property created: str

Time of created.

Return type:str
download(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str
Return type:str
property file_name: str

Filename of the log file.

Return type:str
head(num_lines: int = 50) str

Print first n lines of log.

Parameters:num_lines (int) – number of lines to print
Return type:str
property last_modified: str

Time of last modification

Return type:str
property size: int

Size of the file in bytes.

Return type:int
tail(num_lines: int = 50) str

Print last n lines of log.

Parameters:num_lines (int) – number of lines to print
Return type:str

Model Diagnostics

Model Diagnostic objects correspond to existing model diagnostics on a Driverless AI server. Model Diagnostic objects are retrievable using the Client.

API Reference:

class ModelDiagnostics

Interact with model diagnostics on the Driverless AI server.

create(diagnose_experiment: Experiment, test_dataset: Dataset) ModelDiagnostic

Create a new model diagnostic.

Parameters:
  • diagnose_experiment (Experiment) – experiment that created the diagnosing model
  • test_dataset (Dataset) – test dataset for the diagnosis
Return type:

ModelDiagnostic

create_async(diagnose_experiment: Experiment, test_dataset: Dataset) ModelDiagnosticJob

Launch creation of a new model diagnostic.

Parameters:
  • diagnose_experiment (Experiment) – experiment that created the diagnosing model
  • test_dataset (Dataset) – test dataset for the diagnosis
Return type:

ModelDiagnosticJob

get(key: str) ModelDiagnostic

Get a ModelDiagnostic object corresponding to a model diagnostic on the Driverless AI server.

Parameters:key (str) – Driverless AI server’s unique ID for the model diagnostic
Return type:ModelDiagnostic
gui() Hyperlink

Get full URL for the Model Diagnostics page on the Driverless AI server.

Return type:Hyperlink
list(start_index: int = 0, count: Optional[int] = None) Sequence[ModelDiagnostic]

Return list of ModelDiagnostic objects on the Driverless AI server.

Parameters:
  • start_index (int) – index on Driverless AI server of first model diagnostic in list
  • count (Optional[int]) – number of model diagnostics to request from the Driverless AI server
Return type:

Sequence[ModelDiagnostic]

class ModelDiagnostic

Interact with a model diagnostic on the Driverless AI server.

delete() None

Delete this model diagnostic on Driverless AI server.

Return type:None
download_predictions(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Downloads the predictions into a csv file.

Return type:str
property experiment: driverlessai._experiments.Experiment

Diagnosed experiment by this model diagnostic.

Return type:Experiment
gui() Hyperlink

Get full URL for this model diagnostic’s page on the Driverless AI server.

Return type:Hyperlink
property key: str

Universally unique identifier.

Return type:str
property metric_plots: driverlessai._model_diagnostics.ModelDiagnosticMetricPlots

Metric plots of this model diagnostic.

Warning

Requires DriverlessAI server version 1.9.0 or higher.

Warning

A beta API that is subject to future changes.

Return type:ModelDiagnosticMetricPlots
property name: str

Display name.

Return type:str
property scores: Dict[str, Dict[str, float]]

Scores of this model diagnostic.

Return type:Dict[str, Dict[str, float]]
property test_dataset: driverlessai._datasets.Dataset

Test dataset that was used for this model diagnostic.

Return type:Dataset
class ModelDiagnosticMetricPlots

Interacts with metric plots of a model diagnostic on the Driverless AI server.

property actual_vs_predicted_chart: Optional[Dict[str, Any]]

Actual vs predicted Chart of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:an actual vs predicted chart in Vega Lite (v3) format
confusion_matrix(threshold: Optional[float] = None) Optional[List[List[Any]]]

Confusion Matrix of this model diagnostic.

Parameters:threshold (Optional[float]) – a threshold value
Return type:Optional[List[List[Any]]]
Returns:the confusion matrix as a 2D list
property gains_chart: Optional[Dict[str, Any]]

Cumulative Gain Chart of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a gains chart in Vega Lite (v3) format
property ks_chart: Optional[Dict[str, Any]]

Kolmogorov-Smirnov Chart of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a Kolmogorov-Smirnov chart in Vega Lite (v3) format
property lift_chart: Optional[Dict[str, Any]]

Lift Chart of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a lift chart in Vega Lite (v3) format
property prec_recall_curve: Optional[Dict[str, Any]]

Precision-Recall Curve of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a precision-recall chart in Vega Lite (v3) format
property residual_histogram: Optional[Dict[str, Any]]

Residual Histogram of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a residual histogram in Vega Lite (v3) format
property residual_plot: Optional[Dict[str, Any]]

Residual Plot with LOESS Curve of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a residual plot in Vega Lite (v3) format
property roc_curve: Optional[Dict[str, Any]]

ROC Curve of this model diagnostic.

Return type:Optional[Dict[str, Any]]
Returns:a ROC curve in Vega Lite (v3) format

AutoDoc

AutoDoc objects correspond to existing experiments on a Driverless AI server. AutoDoc objects are retrievable using the Client.

API Reference:

class AutoDocs

Interact with AutoDocs on the Driverless AI server.

create(experiment: Experiment, **config_overrides: Any) AutoDoc

Create a new AutoDoc.

Parameters:
Return type:

AutoDoc

create_async(experiment: Experiment, **config_overrides: Any) AutoDocJob

Launch creation of a new AutoDoc.

Parameters:
Return type:

AutoDocJob

class AutoDoc

Interact with a AutoDoc on the Driverless AI server.

property creation_time: float

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

Return type:float
download(dst_dir: str = '.', dst_file: Optional[str] = None, file_system: Optional[fsspec.spec.AbstractFileSystem] = None, overwrite: bool = False, timeout: float = 30) str

Downloads the AutoDoc.

Return type:str
property experiment: driverlessai._experiments.Experiment

Experiment associated with this AutoDoc.

Return type:Experiment
property key: str

Universally unique identifier.

Return type:str
property name: str

Display name.

Return type:str

Deployment

TritonDeployment objects correspond to existing deployments in a Triton inference server on a Driverless AI server. TritonDeployment objects are retrievable using the Client.

API Reference:

class Deployments

Interact with deployments on the Driverless AI server.

deploy_to_triton_in_local(experiment: Experiment, deploy_predictions: bool = True, deploy_shapley: bool = False, deploy_original_shapley: bool = False, enable_high_concurrency: bool = False) TritonDeployment

Deploys the model created by the specified experiment in the local Triton server on the Driverless AI server.

Args:
experiment: experiment model deploy_predictions: whether to deploy model predictions deploy_shapley: whether to deploy model Shapley deploy_original_shapley: whether to deploy model original Shapley enable_high_concurrency: whether to enable handling several requests at once

Warning

A beta API that is subject to future changes.

Return type:TritonDeployment
deploy_to_triton_in_remote(experiment: Experiment, deploy_predictions: bool = True, deploy_shapley: bool = False, deploy_original_shapley: bool = False, enable_high_concurrency: bool = False) TritonDeployment

Deploys the model created by the specified experiment in a remote Triton server configured on the Driverless AI server.

Args:
experiment: experiment model deploy_predictions: whether to deploy model predictions deploy_shapley: whether to deploy model Shapley deploy_original_shapley: whether to deploy model original Shapley enable_high_concurrency: whether to enable handling several requests at once

Warning

A beta API that is subject to future changes.

Return type:TritonDeployment
get_from_triton_in_local(key: str) TritonDeployment

Get the Triton deployment specified by the key, deployed in the local Triton server on the Driverless AI server.

Parameters:key (str) – Driverless AI server’s unique ID for the Triton deployment
Return type:TritonDeployment
get_from_triton_in_remote(key: str) TritonDeployment

Get the Triton deployment specified by the key, deployed in a remote Triton server configured on the Driverless AI server.

Parameters:key (str) – Driverless AI server’s unique ID for the Triton deployment
Return type:TritonDeployment
gui() Hyperlink

Get full URL for the deployments page on Driverless AI server.

Return type:Hyperlink
list_triton_deployments(start_index: int = 0, count: int = None) Sequence[TritonDeployment]

Returns a list of Triton deployments on the Driverless AI server.

Args:
start_index: index on Driverless AI server of first deployment in list count: number of deployment to request from the Driverless AI server

Warning

A beta API that is subject to future changes.

Return type:Sequence[TritonDeployment]
class TritonDeployment

Interact with a deployment in a Triton inference server on the Driverless AI server.

delete() None

Delete this local Triton deployment.

Warning

A beta API that is subject to future changes.

Return type:None
property is_local_deployment: bool

Whether this Triton deployment is deployed in the embedded (local) Triton server in the Driverless AI server or in a remote Triton server.

Return type:bool
property key: str

Universally unique identifier.

Return type:str
load() None

Load this Triton deployment.

Warning

A beta API that is subject to future changes.

Return type:None
property name: str

Display name.

Return type:str
property state: str

Current state of this Triton deployment.

Return type:str
property triton_model: driverlessai._deployments.TritonModel

Triton model created by this Triton deployment.

Warning

A beta API that is subject to future changes.

Return type:TritonModel
property triton_server_hostname: str

Hostname of the Triton server that this Triton deployment occurred.

Return type:str
unload() None

Unload this Triton deployment.

Warning

A beta API that is subject to future changes.

Return type:None
class TritonModel

A Triton model created by a Triton deployment.

inputs: List[str]

Inputs of this Triton model.

name: str

Name of this Triton model.

outputs: List[str]

Outputs of this Triton model.

platform: str

Supported platform of this Triton model.

versions: List[str]

Versions of this Triton model.