abacusai.refresh_policy — AbacusAI documentation

# `abacusai.refresh_policy`

## Module Contents

### Classes

`RefreshPolicy` | A Refresh Policy describes the frequency at which one or more datasets/models/deployments/batch_predictions can be updated.

class abacusai.refresh_policy.RefreshPolicy(client, refreshPolicyId=None, name=None, cron=None, nextRunTime=None, createdAt=None, refreshType=None, projectId=None, datasetIds=None, featureGroupId=None, modelIds=None, deploymentIds=None, predictionMetricIds=None, modelMonitorIds=None, notebookId=None, paused=None, featureGroupExportConfig={})

  Bases: `abacusai.return_class.AbstractApiClass`

  A Refresh Policy describes the frequency at which one or more datasets/models/deployments/batch_predictions can be updated.

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - refreshPolicyId (str) – The unique identifier for the refresh policy

    - name (str) – The user-friendly name for the refresh policy

    - cron (str) – A cron-style string that describes when this refresh policy is to be executed in UTC

    - nextRunTime (str) – The next UTC time that this refresh policy will be executed

    - createdAt (str) – The time when the refresh policy was created

    - refreshType (str) – The type of refresh policy to be run

    - projectId (str) – The unique identifier of a project that this refresh policy applies to

    - datasetIds (list[str]) – Comma-separated list of Dataset IDs that this refresh policy applies to

    - featureGroupId (str) – Feature Group ID that this refresh policy applies to

    - modelIds (list[str]) – Comma-separated list of Model IDs that this refresh policy applies to

    - deploymentIds (list[str]) – Comma-separated list of Deployment IDs that this refresh policy applies to

    - predictionMetricIds (list[str]) – Comma-separated list of Prediction Metric IDs that this refresh policy applies to

    - modelMonitorIds (list[str]) – Comma-separated list of Model Monitor IDs that this refresh policy applies to

    - notebookId (str) – Notebook ID that this refresh policy applies to

    - paused (bool) – True if the refresh policy is paused

    - featureGroupExportConfig (FeatureGroupRefreshExportConfig) – The export configuration for the feature group. Only applicable if refresh_type is FEATUREGROUP.

  __repr__()

    Return repr(self).

  to_dict()

    Get a dict representation of the parameters in this class

    Returns:

      The dict value representation of the class parameters

    Return type:

      dict

  delete()

    Delete a refresh policy.

    Parameters:

      refresh_policy_id (str) – Unique string identifier associated with the refresh policy to delete.

  refresh()

    Calls describe and refreshes the current object’s fields

    Returns:

      The current object

    Return type:

      RefreshPolicy

  describe()

    Retrieve a single refresh policy

    Parameters:

      refresh_policy_id (str) – The unique ID associated with this refresh policy.

    Returns:

      An object representing the refresh policy.

    Return type:

      RefreshPolicy

  list_refresh_pipeline_runs()

    List the the times that the refresh policy has been run

    Parameters:

      refresh_policy_id (str) – Unique identifier associated with the refresh policy.

    Returns:

      List of refresh pipeline runs for the given refresh policy ID.

    Return type:

      RefreshPipelineRun

  pause()

    Pauses a refresh policy

    Parameters:

      refresh_policy_id (str) – Unique identifier associated with the refresh policy to be paused.

  resume()

    Resumes a refresh policy

    Parameters:

      refresh_policy_id (str) – The unique ID associated with this refresh policy.

  run()

    Force a run of the refresh policy.

    Parameters:

      refresh_policy_id (str) – Unique string identifier associated with the refresh policy to be run.

  update(name=None, cron=None, feature_group_export_config=None)

    Update the name or cron string of a refresh policy

    Parameters:

      - name (str) – Name of the refresh policy to be updated.

      - cron (str) – Cron string describing the schedule from the refresh policy to be updated.

      - feature_group_export_config (FeatureGroupExportConfig) – Feature group export configuration to update a feature group refresh policy.

    Returns:

      Updated refresh policy.

    Return type:

      RefreshPolicy