Endpoint environment variables

Through an endpoint update, you can assign values to environment variables that will be exposed to the deployment.

Using the client

Endpoint.update() provides a parameter for setting the endpoint's environment variables. It can be used alongside any update strategy.

from verta.endpoint.update import DirectUpdateStrategy

endpoint.update(
    model_version, DirectUpdateStrategy(),
    env_vars=env_vars,
)

env_vars takes a dictionary of string environment variable names to string values, and will be made available to the model when it is deployed.

env_vars = {'LOG_LEVEL': "debug"}

Environment variables that were captured via RegisteredModelVersion.log_environment() will also be provided to the deployed model.

model_ver.log_environment(
    Python(["tensorflow"], env_vars={"CUDA_VISIBLE_DEVICES": "0,1"}),
)

Last updated