mirror of
https://github.com/wassname/ray.git
synced 2026-08-10 12:30:14 +08:00
Move global state API out of global_state object. (#4857)
This commit is contained in:
committed by
Philipp Moritz
parent
ea8d7b4dc0
commit
6703519144
@@ -1532,7 +1532,7 @@ class TrialRunnerTest(unittest.TestCase):
|
||||
runner.add_trial(Trial("__fake", **kwargs))
|
||||
trials = runner.get_trials()
|
||||
|
||||
with patch("ray.global_state.cluster_resources") as resource_mock:
|
||||
with patch("ray.cluster_resources") as resource_mock:
|
||||
resource_mock.return_value = {"CPU": 1, "GPU": 1}
|
||||
runner.step()
|
||||
self.assertEqual(trials[0].status, Trial.RUNNING)
|
||||
|
||||
Reference in New Issue
Block a user