mirror of
https://github.com/wassname/ray.git
synced 2026-08-06 13:31:10 +08:00
Make it possible to run ray examples as projects (#5816)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# This file is generated by `ray project create`.
|
||||
|
||||
# A unique identifier for the head node and workers of this cluster.
|
||||
cluster_name: ray-example-parameter-server
|
||||
|
||||
# The maximum number of workers nodes to launch in addition to the head
|
||||
# node. This takes precedence over min_workers. min_workers defaults to 0.
|
||||
max_workers: 1
|
||||
|
||||
# Cloud-provider specific configuration.
|
||||
provider:
|
||||
type: aws
|
||||
region: us-west-2
|
||||
availability_zone: us-west-2a
|
||||
|
||||
# How Ray will authenticate with newly launched nodes.
|
||||
auth:
|
||||
ssh_user: ubuntu
|
||||
@@ -0,0 +1,40 @@
|
||||
# This file is generated by `ray project create`.
|
||||
|
||||
name: ray-example-parameter-server
|
||||
|
||||
description: "A simple parameter server example implemented with ray actors"
|
||||
tags: ["ray-example", "parameter-server", "machine-learning"]
|
||||
documentation: https://ray.readthedocs.io/en/latest/auto_examples/plot_parameter_server.html
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
|
||||
environment:
|
||||
requirements: .rayproject/requirements.txt
|
||||
|
||||
commands:
|
||||
- name: run-sync
|
||||
command: python sync_parameter_server.py --num-workers {{num_workers}}
|
||||
help: "Start the synchronous parameter server."
|
||||
params:
|
||||
- name: num-workers
|
||||
help: "Number of workers"
|
||||
default: 4
|
||||
type: int
|
||||
config:
|
||||
tmux: true
|
||||
|
||||
- name: run-async
|
||||
command: python async_parameter_server.py --num-workers {{num_workers}}
|
||||
help: "Start the asynchronous parameter server."
|
||||
params:
|
||||
- name: num-workers
|
||||
help: "Number of workers"
|
||||
default: 4
|
||||
type: int
|
||||
config:
|
||||
tmux: true
|
||||
|
||||
output_files: [
|
||||
# Save the logs from the latest run in snapshots.
|
||||
"/tmp/ray/session_latest/logs"
|
||||
]
|
||||
@@ -0,0 +1,4 @@
|
||||
ray[debug,rllib]
|
||||
torch
|
||||
torchvision
|
||||
filelock
|
||||
Reference in New Issue
Block a user