mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
[Projects] Unify hyphen vs underscore handling for arguments (#6208)
This commit is contained in:
parent
1f9ab74293
commit
a4437813eb
6 changed files with 5 additions and 86 deletions
|
@ -13,7 +13,7 @@ environment:
|
|||
|
||||
commands:
|
||||
- name: run-sync
|
||||
command: python sync_parameter_server.py --num-workers {{num_workers}}
|
||||
command: python sync_parameter_server.py --num-workers {{num-workers}}
|
||||
help: "Start the synchronous parameter server."
|
||||
params:
|
||||
- name: num-workers
|
||||
|
@ -24,7 +24,7 @@ commands:
|
|||
tmux: true
|
||||
|
||||
- name: run-async
|
||||
command: python async_parameter_server.py --num-workers {{num_workers}}
|
||||
command: python async_parameter_server.py --num-workers {{num-workers}}
|
||||
help: "Start the asynchronous parameter server."
|
||||
params:
|
||||
- name: num-workers
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# This file is generated by `ray project create`.
|
||||
|
||||
# A unique identifier for the head node and workers of this cluster.
|
||||
cluster_name: ray-example-resnet
|
||||
|
||||
# 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
|
||||
|
||||
head_node:
|
||||
InstanceType: m5.2xlarge
|
||||
ImageId: ami-0b294f219d14e6a82 # Deep Learning AMI (Ubuntu) Version 21.0
|
||||
|
||||
# How Ray will authenticate with newly launched nodes.
|
||||
auth:
|
||||
ssh_user: ubuntu
|
|
@ -1,58 +0,0 @@
|
|||
# This file is generated by `ray project create`.
|
||||
|
||||
name: ray-example-resnet
|
||||
|
||||
description: "Using ray to train resnet on multiple gpus"
|
||||
tags: ["ray-example", "machine-learning", "tensorflow", "resnet"]
|
||||
documentation: https://ray.readthedocs.io/en/latest/auto_examples/plot_resnet.html
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
|
||||
environment:
|
||||
requirements: .rayproject/requirements.txt
|
||||
|
||||
commands:
|
||||
- name: train
|
||||
command: |
|
||||
if [ "{{dataset}}" == "cifar10" ]; then
|
||||
# Get the CIFAR-10 dataset.
|
||||
curl -o cifar-10-binary.tar.gz https://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz;
|
||||
tar -xvf cifar-10-binary.tar.gz;
|
||||
else
|
||||
# Get the CIFAR-100 dataset.
|
||||
curl -o cifar-100-binary.tar.gz https://www.cs.toronto.edu/~kriz/cifar-100-binary.tar.gz;
|
||||
tar -xvf cifar-100-binary.tar.gz;
|
||||
fi
|
||||
python resnet_main.py --dataset {{dataset}} --train_data_path {{train_data_path}} --eval_data_path {{eval_data_path}} --eval_dir {{eval_data_path}} --eval_batch_count {{eval_batch_count}} --num_gpus {{num_gpus}}
|
||||
params:
|
||||
- name: dataset
|
||||
help: "The dataset to train on."
|
||||
default: "cifar10"
|
||||
choices: ["cifar10", "cifar100"]
|
||||
- name: train-data-path
|
||||
help: "Data path for the training data."
|
||||
default: "'cifar-10-batches-bin/data_batch*'"
|
||||
type: str
|
||||
- name: eval-data-path
|
||||
help: "Data path for the testing data."
|
||||
default: "cifar-10-batches-bin/test_batch.bin"
|
||||
type: str
|
||||
- name: eval-dir
|
||||
help: "Data path for the tensorboard logs."
|
||||
default: "/tmp/resnet-model/eval"
|
||||
type: str
|
||||
- name: eval-batch-count
|
||||
help: "Number of batches to evaluate over."
|
||||
default: 50
|
||||
type: int
|
||||
- name: num-gpus
|
||||
help: "Number of GPUs to use for training."
|
||||
default: 0
|
||||
type: int
|
||||
config:
|
||||
tmux: true
|
||||
|
||||
output_files: [
|
||||
# Save the logs from the latest run in snapshots.
|
||||
"/tmp/ray/session_latest/logs"
|
||||
]
|
|
@ -1 +0,0 @@
|
|||
ray[rllib,debug]
|
|
@ -12,7 +12,7 @@ environment:
|
|||
|
||||
commands:
|
||||
- name: run
|
||||
command: python streaming.py --num-mappers {{num_mappers}} --num-reducers {{num_reducers}}
|
||||
command: python streaming.py --num-mappers {{num-mappers}} --num-reducers {{num-reducers}}
|
||||
help: "Start the streaming example."
|
||||
params:
|
||||
- name: num-mappers
|
||||
|
|
|
@ -105,9 +105,9 @@ class ProjectDefinition:
|
|||
"Parameter {} has type {} which is not supported. "
|
||||
"Type must be one of {}".format(
|
||||
name, param["type"], list(types.keys())))
|
||||
parser.add_argument("--" + name, **param)
|
||||
parser.add_argument("--" + name, dest=name, **param)
|
||||
|
||||
parsed_args = parser.parse_args(list(args)).__dict__
|
||||
parsed_args = vars(parser.parse_args(list(args)))
|
||||
|
||||
if wildcards:
|
||||
for key, val in parsed_args.items():
|
||||
|
|
Loading…
Add table
Reference in a new issue