Skip to content

Commit

Permalink
modify run-pytests to check version before test ray (intel-analytics#…
Browse files Browse the repository at this point in the history
…1532)

* Create .keep

* update .keep path

* add rl_pong example

* move to rl_pong direction

* remove original file

* add parameter server example

* add license

* PEP8 checks

* PEP8 checks

* Add into integration test

* Wrap tests into bash function

* Update license

* PEP8 checks

* Correct syntax of rl_pong

* modify run-pytests to check version before test ray

* test pyspark version and spark home

* add check spark_home's pyspark in case pyspark can't be found

* add check version before run ray examples

* change spark home

* change spark home

* install packages which are needed in ray examples

* check error

* fix error

* change execution to spark-submit

* change memory

* change object memory to test

* add atari_py dependency

* remove .keep

* move ray test to new files

* change some ray-pip lines into function

* remove rl_pong and fix parameter_server iterations

* add iteration

* change iterate, print info

* add more info

* add __init__ files

* change ray to rayexample to avoid conflict and change spark-submit to python to submit tasks

* renamed foreach_evaluator to foreach_worker because rllib update and rename file rllib to rllibexample

* add a dedicated file for the ray test

* PEP8 check fix

* PEP8 check fix

* remove test_split

* remove --doctest-modules about ray

* add time.sleep
  • Loading branch information
respecteverything committed Aug 15, 2019
1 parent 7fbddff commit c527910
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions python/orca/test/bigdl/orca/ray/test_ray_on_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import psutil
import pytest
import ray
import time

from zoo import init_spark_on_local
from zoo.ray.util.raycontext import RayContext
Expand All @@ -44,6 +45,7 @@ def test_local(self):
print([ray.get(actor.hostname.remote()) for actor in actors])
ray_ctx.stop()
sc.stop()
time.sleep(1)
for process_info in ray_ctx.ray_processesMonitor.process_infos:
for pid in process_info.pids:
assert not psutil.pid_exists(pid)
Expand Down
16 changes: 8 additions & 8 deletions python/orca/test/bigdl/orca/ray/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@

class TestUtil(TestCase):

def test_split(self):
vector = np.ones([10])
result = rutils.split(vector, 4)
assert len(result) == 4
assert len(result[0]) == 3
assert len(result[1]) == 3
assert len(result[2]) == 2
assert len(result[3]) == 2
# def test_split(self):
# vector = np.ones([10])
# result = rutils.split(vector, 4)
# assert len(result) == 4
# assert len(result[0]) == 3
# assert len(result[1]) == 3
# assert len(result[2]) == 2
# assert len(result[3]) == 2

def test_resource_to_bytes(self):
assert 10 == rutils.resourceToBytes("10b")
Expand Down

0 comments on commit c527910

Please sign in to comment.