Runs a variety of precomputation steps for a model.

📘

Note

This method should be called after client.upload_model_package(). It is not necessary after calling client.register_model() as this step happens automatically when registering a model.

Input Parameter

Type

Default

Description

project_id

str

None

The unique identifier for the project.

model_id

str

None

A unique identifier for the model.

dataset_id

str

None

The unique identifier for the dataset.

overwrite_cache

Optional [bool]

True

If True, will overwrite existing cached information.

batch_size

Optional [int]

10

The batch size used for global PDP calculations.

calculate_predictions

Optional [bool]

True

If True, will precompute and store model predictions.

cache_global_impact_importance

Optional [bool]

True

If True, global feature impact and global feature importance will be precomputed and cached when the model is registered.

cache_global_pdps

Optional [bool]

True

If True, global partial dependence plots will be precomputed and cached when the model is registered.

cache_dataset

Optional [bool]

False

If True, histogram information for the baseline dataset will be precomputed and cached when the model is registered.

PROJECT_ID = 'example_project'
DATASET_ID = 'example_dataset'
MODEL_ID = 'example_model'

client.trigger_pre_computation(
    project_id=PROJECT_ID,
    dataset_id=DATASET_ID,
    model_id=MODEL_ID
)