Skip to content
GitHub
View on GitHub

ModelDeployment

A deployed model endpoint.

from modal_training_gym.common.deployment import ModelDeployment

A deployed model endpoint.

ModelDeployment(**data)
ParameterTypeDefaultDescription
AttributeTypeDefaultDescription
deployment_idstr
deployment_configDeploymentConfig
modal_app_idstr
modal_app_urlstr
urlstr
statusstr

generate(self, prompt: 'str', ensure_ready: 'bool' = True, **kwargs) -> 'str'

Section titled “generate(self, prompt: 'str', ensure_ready: 'bool' = True, **kwargs) -> 'str'”

list_deployments() -> "dict[str, 'ModelDeployment']"

Section titled “list_deployments() -> "dict[str, 'ModelDeployment']"”

wait_until_ready(self, timeout: 'int' = 600) -> 'None'

Section titled “wait_until_ready(self, timeout: 'int' = 600) -> 'None'”

Source: modal_training_gym/common/deployment.py