[RLlib] Create ci/rllib_tests and organize a little (#11342)

This commit is contained in:
Sven Mika
2020-10-12 21:05:09 +02:00
committed by GitHub
parent c107eea551
commit 580820a530
14 changed files with 55 additions and 3 deletions
@@ -31,6 +31,7 @@ setup_commands:
- conda uninstall -y terminado
- source activate tensorflow_p36 && pip install -U ray-{{ray_version}}-cp36-cp36m-manylinux1_x86_64.whl
- source activate tensorflow_p36 && pip install ray[rllib] ray[debug]
- source activate tensorflow_p36 && pip install torch==1.6 torchvision
- source activate tensorflow_p36 && pip install boto3==1.4.8 cython==0.29.0
# Command to start ray on the head node. You don't need to change this.
@@ -42,7 +42,6 @@ commands:
- name: run-regression-tests
command: |
source activate tensorflow_p36 && pip install torch torchvision
source activate tensorflow_p36 && rllib train -f compact-regression-test.yaml
help: "Run rllib regression tests"
@@ -55,4 +54,4 @@ output_files: [
# For example, uncomment this to save the logs from the
# last ray job.
# "/tmp/ray/session_latest",
]
]
@@ -1,4 +1,3 @@
#!/usr/bin/env bash
source activate tensorflow_p36 && pip install torch==1.4 torchvision
source activate tensorflow_p36 && rllib train -f compact-regression-test.yaml
@@ -0,0 +1,42 @@
cluster_name: ray-rllib-regression-tests
min_workers: 0
max_workers: 0
# Cloud-provider specific configuration.
provider:
type: aws
region: us-west-2
availability_zone: us-west-2a
cache_stopped_nodes: False
# How Ray will authenticate with newly launched nodes.
auth:
ssh_user: ubuntu
head_node:
InstanceType: p2.xlarge # Cheaper 1GPU K80 instance
ImageId: ami-07728e9e2742b0662 # Deep Learning AMI (Ubuntu 16.04)
# Set primary volume to 25 GiB
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeSize: 100
# List of shell commands to run to set up nodes.
setup_commands:
- wget --quiet https://s3-us-west-2.amazonaws.com/ray-wheels/{{ray_branch}}/{{commit}}/ray-{{ray_version}}-cp36-cp36m-manylinux1_x86_64.whl
- conda uninstall -y terminado
- source activate tensorflow_p36 && pip install -U ray-{{ray_version}}-cp36-cp36m-manylinux1_x86_64.whl
# Command to start ray on the head node. You don't need to change this.
head_start_ray_commands:
- source activate tensorflow_p36 && ray stop
- ulimit -n 65536; source activate tensorflow_p36 && OMP_NUM_THREADS=1 ray start --head --redis-port=6379 --object-manager-port=8076 --autoscaling-config=~/ray_bootstrap_config.yaml
# Command to start ray on worker nodes. You don't need to change this.
worker_start_ray_commands:
- source activate tensorflow_p36 && ray stop
- ulimit -n 65536; source activate tensorflow_p36 && OMP_NUM_THREADS=1 ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076
@@ -0,0 +1,6 @@
ray[rllib]
ray[debug]
torch==1.6+cu101
torchvision==0.7.0+cu101
boto3==1.4.8
cython==0.29.0
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Run all test cases, but with a forced num_gpus=1.
# TODO: (sven) chose correct dir and run over all RLlib tests and example scripts!
source activate tensorflow_p36 && export RAY_FORCE_NUM_GPUS=1 && cd ~ && python -m pytest test_attention_net_learning.py