chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:17:40 +08:00
commit f1825c8ceb
10096 changed files with 2364182 additions and 0 deletions
@@ -0,0 +1,36 @@
# flake8: noqa
import ray
# __deployment_start__
# File name: configure_serve.py
from ray import serve
@serve.deployment(
name="Translator",
num_replicas=2,
ray_actor_options={"num_cpus": 0.2, "num_gpus": 0},
max_ongoing_requests=100,
health_check_period_s=10,
health_check_timeout_s=30,
graceful_shutdown_timeout_s=20,
graceful_shutdown_wait_loop_s=2,
)
class Example:
...
example_app = Example.bind()
# __deployment_end__
example_app = Example.options(
ray_actor_options={"num_cpus": 0.2, "num_gpus": 0.0}
).bind()
# __options_end__
serve.run(example_app)
serve.shutdown()
ray.shutdown()