Skip to main content
Vast.ai Documentation – Affordable GPU Cloud Marketplace home page
Search...
⌘K
Ask AI
Discord
Console
Console
Search...
Navigation
Server
Worker
Documentation
Examples
SDK
CLI
API
Get Started
Hello World
Authentication
Templates
VastAI Client
VastAI
Methods
Accounts
Billing
Instances
Network Volumes
Search
Serverless
Team
Templates
Volumes
Machines
Serverless
Client
Server
Worker (Server)
WorkerConfig
HandlerConfig
LogActionConfig
BenchmarkConfig
On this page
Import
Constructor
Methods
run_async
run
Server
Worker
Copy page
Copy page
This class provides a simple to use abstraction over the pyworker backend. All custom implementations of pyworker can be created by configuring a Worker object. The pyworker starts by calling Worker.run()
Import
Copy
Ask AI
from
vastai
import
Worker
Constructor
Copy
Ask AI
Worker(config: WorkerConfig)
config
WorkerConfig
required
config
Methods
run_async
Copy
Ask AI
async
run_async()
run
Copy
Ask AI
run()
Suggest edits
Raise issue
Worker (Client)
WorkerConfig
⌘I
Assistant
Responses are generated using AI and may contain mistakes.