mirror of
https://github.com/wassname/ray.git
synced 2026-08-13 12:30:18 +08:00
[tune] API revamp fix (#10518)
This commit is contained in:
@@ -16,7 +16,7 @@ from ray.cluster_utils import Cluster
|
||||
class RayTrialExecutorTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.trial_executor = RayTrialExecutor(queue_trials=False)
|
||||
ray.init()
|
||||
ray.init(ignore_reinit_error=True)
|
||||
_register_all() # Needed for flaky tests
|
||||
|
||||
def tearDown(self):
|
||||
@@ -182,8 +182,6 @@ class RayTrialExecutorTest(unittest.TestCase):
|
||||
|
||||
class RayExecutorQueueTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.trial_executor = RayTrialExecutor(
|
||||
queue_trials=True, refresh_period=0)
|
||||
self.cluster = Cluster(
|
||||
initialize_head=True,
|
||||
connect=True,
|
||||
@@ -193,6 +191,8 @@ class RayExecutorQueueTest(unittest.TestCase):
|
||||
"num_heartbeats_timeout": 10
|
||||
}
|
||||
})
|
||||
self.trial_executor = RayTrialExecutor(
|
||||
queue_trials=True, refresh_period=0)
|
||||
# Pytest doesn't play nicely with imports
|
||||
_register_all()
|
||||
|
||||
@@ -247,8 +247,8 @@ class RayExecutorQueueTest(unittest.TestCase):
|
||||
|
||||
class LocalModeExecutorTest(RayTrialExecutorTest):
|
||||
def setUp(self):
|
||||
self.trial_executor = RayTrialExecutor(queue_trials=False)
|
||||
ray.init(local_mode=True)
|
||||
self.trial_executor = RayTrialExecutor(queue_trials=False)
|
||||
|
||||
def tearDown(self):
|
||||
ray.shutdown()
|
||||
|
||||
Reference in New Issue
Block a user