[DEV] VESSL Docs
  • Welcome to VESSL Docs!
  • GETTING STARTED
    • Overview
    • Quickstart
    • End-to-end Guides
      • CLI-driven Workflow
      • SDK-driven Workflow
  • USER GUIDE
    • Organization
      • Creating an Organization
      • Organization Settings
        • Add Members
        • Set Notifications
        • Configure Clusters
        • Add Integrations
        • Billing Information
    • Project
      • Creating a Project
      • Project Overview
      • Project Repository & Project Dataset
    • Clusters
      • Cluster Integrations
        • Fully Managed Cloud
        • Personal Laptops
        • On-premise Clusters
        • Private Cloud (AWS)
      • Cluster Monitoring
      • Cluster Administration
        • Resource Specs
        • Access Control
        • Quotas and Limits
        • Remove Cluster
    • Dataset
      • Adding New Datasets
      • Managing Datasets
      • Tips & Limitations
    • Experiment
      • Creating an Experiment
      • Managing Experiments
      • Experiment Results
      • Distributed Experiments
      • Local Experiments
    • Model Registry
      • Creating a Model
      • Managing Models
    • Sweep
      • Creating a Sweep
      • Sweep Results
    • Workspace
      • Creating a Workspace
      • Exploring Workspaces
      • SSH Connection
      • Downloading / Attaching Datasets
      • Running a Server Application
      • Tips & Limitations
      • Building Custom Images
    • Serve
      • Quickstart
      • Serve Web Workflow
        • Monitoring Dashboard
        • Service Logs
        • Service Revisions
        • Service Rollouts
      • Serve YAML Workflow
        • YAML Schema Reference
    • Commons
      • Running Spot Instances
      • Volume Mount
  • API REFERENCE
    • What is the VESSL CLI/SDK?
    • CLI
      • Getting Started
      • vessl run
      • vessl cluster
      • vessl dataset
      • vessl experiment
      • vessl image
      • vessl model
      • vessl organization
      • vessl project
      • vessl serve
      • vessl ssh-key
      • vessl sweep
      • vessl volume
      • vessl workspace
    • Python SDK
      • Integrations
        • Keras
        • TensorBoard
      • Utilities API
        • configure
        • vessl.init
        • vessl.log
          • vessl.Image
          • vessl.Audio
        • vessl.hp.update
        • vessl.progress
        • vessl.upload
        • vessl.finish
      • Dataset API
      • Experiment API
      • Cluster API
      • Image API
      • Model API
        • Model Serving API
      • Organization API
      • Project API
      • Serving API
      • SSH Key API
      • Sweep API
      • Volume API
      • Workspace API
    • Rate Limits
  • TROUBLESHOOTING
    • GitHub Issues
    • VESSL Flare
Powered by GitBook
On this page
  • list_servings
  • create_revision_from_yaml
  • read_revision
  • list_revisions
  • read_gateway
  • terminate_revision
  • update_revision_autoscaler_config
  • update_gateway
  • update_gateway_for_revision
  • update_gateway_from_yaml
  1. API REFERENCE
  2. Python SDK

Serving API

list_servings

vessl.list_servings(
   organization: str
)

Get a list of all servings in an organization

Args

  • organization (str) : The name of the organization.

Example

vessl.list_servings(organization="my-org")

create_revision_from_yaml

vessl.create_revision_from_yaml(
   organization: str, serving_name: str, yaml_body: str
)

Create a new revision of serving from a YAML file.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

  • yaml_body (str) : The YAML body of the serving. It is not deserialized YAML, but a whole yaml string.

Example

vessl.create_revision_from_yaml(
    organization="my-org",
    serving_name="my-serving",
    yaml_body=yaml_body)

read_revision

vessl.read_revision(
   organization: str, serving_name: str, revision_number: int
)

Get a serving revision from a serving name and revision number.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

  • revision_number (int) : The revision number of the serving.

Example

vessl.read_revision(
    organization="my-org",
    serving_name="my-serving",
    revision_number=1)

list_revisions

vessl.list_revisions(
   organization: str, serving_name: str
)

Get a list of all revisions of a serving.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

Examples

vessl.list_revisions(
    organization="my-org",
    serving_name="my-serving")

read_gateway

vessl.read_gateway(
   organization: str, serving_name: str
)

Get the gateway of a serving.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

Examples

vessl.read_gateway(
    organization="my-org",
    serving_name="my-serving")

terminate_revision

vessl.terminate_revision(
   organization: str, serving_name: str, revision_number: int
)

Terminate a serving revision from a serving name and revision number.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

  • revision_number (int) : The revision number of the serving.

Example

vessl.terminate_revision(
    organization="my-org",
    serving_name="my-serving",
    revision_number=1)

update_revision_autoscaler_config

vessl.update_revision_autoscaler_config(
   organization: str, serving_name: str, revision_number: int,
   auto_scaler_config: AutoScalerConfig
)

Update the autoscaler config of a serving revision from a serving name and revision number.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

  • revision_number (int) : The revision number of the serving.

  • auto_scaler_config (AutoScalerConfig) : The autoscaler config of the serving.

Example

vessl.update_revision_autoscaler_config(
    organization="my-org",
    serving_name="my-serving",
    revision_number=1,
    auto_scaler_config=AutoScalerConfig(
        min_replicas=1,
        max_replicas=2,
        target_cpu_utilization_percentage=80,
    ))

update_gateway

vessl.update_gateway(
   organization: str, serving_name: str,
   gateway: ModelServiceGatewayUpdateAPIInput
)

Update the gateway of a serving.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

  • gateway (ModelServiceGatewayUpdateAPIInput) : The gateway of the serving.

Examples

from openapi_client import ModelServiceGatewayUpdateAPIInput
from openapi_client import OrmModelServiceGatewayTrafficSplitEntry

gateway = ModelServiceGatewayUpdateAPIInput(
    enabled=True,
    ingress_host="my-endpoint",
    traffic_split=[
        OrmModelServiceGatewayTrafficSplitEntry(
            revision_number=1,
            port=2222,
            traffic_weight=100,
        )
    ],
)

vessl.update_gateway(
    organization="my-org",
    serving_name="my-serving",
    gateway=gateway)

update_gateway_for_revision

vessl.update_gateway_for_revision(
   organization: str, serving_name: str, revision_number: int, port: int,
   weight: int
)

Update the current gateway of a serving for a specific revision.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

  • revision_number (int) : The revision number of the serving.

  • port (int) : The port of the revision will use for gateway.

  • weight (int) : The weight of the traffic will be distributed to revision_number.

Examples

vessl.update_gateway_for_revision(
    organization="my-org",
    serving_name="my-serving",
    revision_number=1,
    port=2222,
    weight=100)

update_gateway_from_yaml

vessl.update_gateway_from_yaml(
   organization: str, serving_name: str, yaml_body: str
)

Update the gateway of a serving from a YAML file.

Args

  • organization (str) : The name of the organization.

  • serving_name (str) : The name of the serving.

  • yaml_body (str) : The YAML body of the serving. It is not deserialized YAML, but a whole yaml string

Examples

vessl.update_gateway_from_yaml(
    organization="my-org",
    serving_name="my-serving",
    yaml_body=yaml_body)
PreviousProject APINextSSH Key API

Last updated 1 year ago