0.8.5 Release change. (#8358)

This commit is contained in:
SangBin Cho
2020-05-28 09:37:19 -07:00
committed by GitHub
parent 08fee00bc8
commit 448011f822
18 changed files with 371 additions and 1 deletions
+60
View File
@@ -0,0 +1,60 @@
# This script automatically download ray and run the sanity check (sanity_check.py)
# in various Python version. This script requires conda command to exist.
if [[ -z "$RAY_HASH" ]]; then
echo "RAY_HASH env var should be provided"
exit 1
fi
if [[ -z "$RAY_VERSION" ]]; then
echo "RAY_VERSION env var should be provided"
exit 1
fi
if ! [ -x "$(command -v conda)" ]; then
echo "conda doesn't exist. Please download conda for this machine"
exit 1
else
echo "conda exists"
fi
echo "Start downloading Ray version ${RAY_VERSION} of commit ${RAY_HASH}"
pip install --upgrade pip
# This is required to use conda activate
source "$(conda info --base)/etc/profile.d/conda.sh"
for PYTHON_VERSION in "3.5" "3.6" "3.7" "3.8"
do
env_name="${RAY_VERSION}-${PYTHON_VERSION}-env"
conda create -y -n "${env_name}" python=${PYTHON_VERSION}
conda activate "${env_name}"
echo "\n\n\n========================================================="
echo "Python version."
python --version
echo "This should be equal to ${PYTHON_VERSION}"
echo "=========================================================\n\n\n"
pip install redis==3.3.2
pip install msgpack==0.6.2
pip install ray
pip uninstall -y ray
pip install --index-url https://test.pypi.org/simple/ ray
failed=false
echo "\n\n\n========================================================="
if python sanity_check.py; then
echo "PYTHON ${PYTHON_VERSION} succeed sanity check."
else
failed=true
fi
echo "=========================================================\n\n\n"
conda deactivate
conda remove -y --name ${env_name} --all
if [ "$failed" = true ]; then
echo "PYTHON ${PYTHON_VERSION} failed sanity check."
exit 1
fi
done
+35
View File
@@ -0,0 +1,35 @@
# This file is generated by `ray project create`.
# A unique identifier for the head node and workers of this cluster.
cluster_name: sanity-check
# 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
# Custom commands that will be run on the head node after common setup.
head_setup_commands:
# Install Anaconda.
- wget --quiet https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh || true
- bash Anaconda3-5.0.1-Linux-x86_64.sh -b -p $HOME/anaconda3 || true
- echo 'export PATH="$HOME/anaconda3/bin:$PATH"' >> ~/.bashrc
- pip install -U pip
# Custom commands that will be run on worker nodes after common setup.
worker_setup_commands: []
# Command to start ray on the head node. You don't need to change this.
head_start_ray_commands: []
# Command to start ray on worker nodes. You don't need to change this.
worker_start_ray_commands: []
+36
View File
@@ -0,0 +1,36 @@
# This file is generated by `ray project create`.
name: sanity-check
# description: A short description of the project.
# The URL of the repo this project is part of.
# repo: ...
cluster:
config: ray-project/cluster.yaml
commands:
- name: sanity-check
help: "Do release sanity check with pip"
command: |
export RAY_VERSION={{ray_version}}
export RAY_HASH={{commit}}
chmod +x ./pip_download_test.sh
./pip_download_test.sh
params:
- name: ray_version # Ray version string.
default: "0.9.0.dev0"
- name: commit # Ray commit SHA string.
default: "FILL ME IN"
# Pathnames for files and directories that should be saved
# in a snapshot but that should not be synced with a# session. Pathnames can be relative to the project
# directory or absolute. Generally, this should be files
# that were created by an active session, such as
# application checkpoints and logs.
output_files: [
# For example, uncomment this to save the logs from the
# last ray job.
# "/tmp/ray/session_latest",
]
+31
View File
@@ -0,0 +1,31 @@
import os
import ray
import sys
RAY_VERSION = "RAY_VERSION"
RAY_COMMIT = "RAY_HASH"
ray_version = os.getenv(RAY_VERSION)
ray_commit = os.getenv(RAY_COMMIT)
if __name__ == "__main__":
print("Sanity check python version: {}".format(sys.version))
assert ray_version == ray.__version__, (
"Given Ray version {} is not matching with downloaded "
"version {}".format(ray_version, ray.__version__))
assert ray_commit == ray.__commit__, (
"Given Ray commit {} is not matching with downloaded "
"version {}".format(ray_commit, ray.__commit__))
assert ray.__file__ is not None
ray.init()
assert ray.is_initialized()
@ray.remote
def return_arg(arg):
return arg
val = 3
print("Running basic sanity check.")
assert ray.get(return_arg.remote(val)) == val
ray.shutdown()