Ray¶
Ray is for sending Wove tasks into a Ray cluster without writing a separate backend-specific task wrapper. Wove wraps its worker entrypoint as a Ray remote function and submits the payload directly.
Use When¶
Your application already uses Ray for distributed Python execution.
Wove tasks should run on Ray workers rather than the submitting process.
The Ray workers can import Wove and your application code.
Execution Shape¶
Wove initializes Ray unless
init=False.Wove wraps
wove.integrations.worker.runwithray.remote(...).The remote function executes the payload.
The worker posts Wove completion events back to the callback URL.
Dependency¶
Install dispatch support and Ray in the submitting process and on Ray workers that execute Wove payloads.
pip install "wove[dispatch]" ray
Configure Wove¶
import wove
wove.config(
default_environment="ray",
environments={
"ray": {
"executor": "ray",
"executor_config": {
"address": "ray://ray-head:10001",
"remote_options": {"num_cpus": 1},
"callback_token": "shared-secret",
"callback_url": "https://wove-runner.internal/wove/events/shared-secret",
},
}
},
)
Worker Requirements¶
Ray workers must have Wove installed and must be able to import the application code used by the serialized task.
Options¶
Key |
Effect |
|---|---|
|
Ray cluster address passed to |
|
Set to |
|
Extra keyword arguments passed to |
|
Options passed to |
|
Passed to |