mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00
Improvements to documentation and error messages. (#221)
This commit is contained in:
parent
b3b294e3ad
commit
9bb8162621
6 changed files with 20 additions and 13 deletions
|
@ -10,7 +10,6 @@ To install Ray, first install the following dependencies. We recommend using
|
|||
```
|
||||
brew update
|
||||
brew install cmake automake autoconf libtool boost wget
|
||||
sudo easy_install pip # If you're using Anaconda, then this is unnecessary.
|
||||
|
||||
pip install numpy cloudpickle funcsigs colorama psutil redis --ignore-installed six
|
||||
```
|
||||
|
@ -21,7 +20,7 @@ Ray can be built from the repository as follows.
|
|||
|
||||
```
|
||||
git clone https://github.com/ray-project/ray.git
|
||||
cd ray/lib/python
|
||||
cd ray/python
|
||||
python setup.py install --user
|
||||
```
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ To install Ray, first install the following dependencies. We recommend using
|
|||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y cmake build-essential autoconf curl libtool python-dev python-pip libboost-all-dev unzip # If you're using Anaconda, then python-dev and python-pip are unnecessary.
|
||||
sudo apt-get install -y cmake build-essential autoconf curl libtool libboost-all-dev unzip python-dev python-pip # If you're using Anaconda, then python-dev and python-pip are unnecessary.
|
||||
|
||||
pip install numpy cloudpickle funcsigs colorama psutil redis
|
||||
```
|
||||
|
@ -21,7 +21,7 @@ Ray can be built from the repository as follows.
|
|||
|
||||
```
|
||||
git clone https://github.com/ray-project/ray.git
|
||||
cd ray/lib/python
|
||||
cd ray/python
|
||||
python setup.py install --user
|
||||
```
|
||||
|
||||
|
|
|
@ -27,10 +27,14 @@ should look something like `123.45.67.89:12345`).
|
|||
```
|
||||
./ray/scripts/start_ray.sh --redis-address <redis-address>
|
||||
```
|
||||
To specify the number of processes to start, use the flag `--num-workers`, as follows:
|
||||
|
||||
To specify the number of processes to start, use the flag `--num-workers`, as
|
||||
follows:
|
||||
|
||||
```
|
||||
./ray/scripts/start_ray.sh --num-workers <int>
|
||||
```
|
||||
|
||||
Now we've started all of the Ray processes on each node Ray. This includes
|
||||
|
||||
- Some worker processes on each machine.
|
||||
|
@ -39,7 +43,8 @@ Now we've started all of the Ray processes on each node Ray. This includes
|
|||
- One Redis server (on the head node).
|
||||
- One global scheduler (on the head node).
|
||||
|
||||
To run some commands, start up Python on one of the nodes in the cluster, and do the following.
|
||||
To run some commands, start up Python on one of the nodes in the cluster, and do
|
||||
the following.
|
||||
|
||||
```python
|
||||
import ray
|
||||
|
@ -56,7 +61,7 @@ def f(x):
|
|||
ray.get([f.remote(f.remote(f.remote(0))) for _ in range(1000)])
|
||||
```
|
||||
|
||||
### Stopping Ray
|
||||
### Stopping Ray
|
||||
When you want to stop the Ray processes, run `./ray/scripts/stop_ray.sh`
|
||||
on each node.
|
||||
|
||||
|
|
|
@ -114,10 +114,7 @@ def cleanup():
|
|||
successfully_shut_down = successfully_shut_down and success
|
||||
# Reset the list of processes of this type.
|
||||
all_processes[process_type] = []
|
||||
if successfully_shut_down:
|
||||
if len(all_processes) > 0:
|
||||
print("Successfully shut down Ray.")
|
||||
else:
|
||||
if not successfully_shut_down:
|
||||
print("Ray did not shut down properly.")
|
||||
|
||||
def all_processes_alive(exclude=[]):
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
killall redis-server global_scheduler plasma_store plasma_manager photon_scheduler
|
||||
killall global_scheduler plasma_store plasma_manager photon_scheduler
|
||||
|
||||
# Find the PID of the Redis process and kill it.
|
||||
kill $(ps aux | grep redis-server | awk '{ print $2 }') 2> /dev/null
|
||||
|
||||
# Find the PIDs of the worker processes and kill them.
|
||||
kill $(ps aux | grep default_worker.py | awk '{ print $2 }') 2> /dev/null
|
||||
|
|
|
@ -123,7 +123,7 @@ try:
|
|||
import cloudpickle
|
||||
cloudpickle.dumps(Point)
|
||||
except AttributeError:
|
||||
cloudpickle_command = "pip install --upgrade git+git://github.com/cloudpipe/cloudpickle.git@0d225a4695f1f65ae1cbb2e0bbc145e10167cce4"
|
||||
cloudpickle_command = "pip install --upgrade cloudpickle"
|
||||
raise Exception("You have an older version of cloudpickle that is not able to serialize namedtuples. Try running \n\n{}\n\n".format(cloudpickle_command))
|
||||
|
||||
class SerializationTest(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Reference in a new issue