Endpoint

Note

New in version 0.15.0.

class verta.endpoint._endpoint.Endpoint

Object representing an endpoint for deployment.

There should not be a need to instantiate this class directly; please use Client.get_or_create_endpoint().

Variables:
  • id (int) – ID of this Endpoint.
  • path (str) – Path of this Endpoint.
update(model_reference, strategy, wait=False, resources=None, autoscaling=None, env_vars=None)

Updates the Endpoint with a model logged in an Experiment Run or a Model Version.

Parameters:
  • model_reference (ExperimentRun or RegisteredModelVersion) – An Experiment Run or a Model Version with a model logged.
  • strategy (update strategy) – Strategy (direct or canary) for updating the Endpoint.
  • wait (bool, default False) – Whether to wait for the Endpoint to finish updating before returning.
  • resources (Resources, optional) – Resources allowed for the updated Endpoint.
  • autoscaling (Autoscaling, optional) – Autoscaling condition for the updated Endpoint.
  • env_vars (dict of str to str, optional) – Environment variables.
Returns:

status (dict of str to {None, bool, float, int, str, list, dict})

update_from_config(filepath, wait=False)

Updates the Endpoint via a YAML or JSON config file.

Parameters:
  • filepath (str) – Path to the YAML or JSON config file.
  • wait (bool, default False) – Whether to wait for the Endpoint to finish updating before returning.
Returns:

status (dict of str to {None, bool, float, int, str, list, dict})

Raises:

ValueError – If the file is not JSON or YAML.

get_status()

Gets status on the endpoint.

Returns:status (dict of str to {None, bool, float, int, str, list, dict})
get_access_token()

Gets the access token of the Endpoint.

Returns:str or None
create_access_token(token)

Creates an access token for the Endpoint.

Parameters:token (str) – Token to create.
get_deployed_model()

Returns an object for making predictions against the deployed model.

Returns:DeployedModel
Raises:RuntimeError – If the model is not currently deployed.
get_update_status()

Gets update status on the endpoint.

Returns:update_status (dict of str to {None, bool, float, int, str, list, dict})
delete()

Deletes this endpoint.