mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
Deprecate num_workers argument to ray.init and ray start. (#3114)
* Remove num_workers argument. * Fix * Fix
This commit is contained in:
committed by
Philipp Moritz
parent
9868af4c7c
commit
32f0d6b77e
+6
-15
@@ -718,7 +718,7 @@ def test_actor_load_balancing(shutdown_only):
|
||||
num_local_schedulers = 3
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_workers=0,
|
||||
num_cpus=1,
|
||||
num_local_schedulers=num_local_schedulers)
|
||||
|
||||
@ray.remote
|
||||
@@ -764,7 +764,6 @@ def test_actor_gpus(shutdown_only):
|
||||
num_gpus_per_scheduler = 4
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_workers=0,
|
||||
num_local_schedulers=num_local_schedulers,
|
||||
num_cpus=(num_local_schedulers * [10 * num_gpus_per_scheduler]),
|
||||
num_gpus=(num_local_schedulers * [num_gpus_per_scheduler]))
|
||||
@@ -807,7 +806,6 @@ def test_actor_multiple_gpus(shutdown_only):
|
||||
num_gpus_per_scheduler = 5
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_workers=0,
|
||||
num_local_schedulers=num_local_schedulers,
|
||||
num_cpus=(num_local_schedulers * [10 * num_gpus_per_scheduler]),
|
||||
num_gpus=(num_local_schedulers * [num_gpus_per_scheduler]))
|
||||
@@ -878,7 +876,6 @@ def test_actor_different_numbers_of_gpus(shutdown_only):
|
||||
# numbers of GPUs.
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_workers=0,
|
||||
num_local_schedulers=3,
|
||||
num_cpus=[10, 10, 10],
|
||||
num_gpus=[0, 5, 10])
|
||||
@@ -919,7 +916,6 @@ def test_actor_multiple_gpus_from_multiple_tasks(shutdown_only):
|
||||
num_gpus_per_scheduler = 10
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_workers=0,
|
||||
num_local_schedulers=num_local_schedulers,
|
||||
redirect_output=True,
|
||||
num_cpus=(num_local_schedulers * [10 * num_gpus_per_scheduler]),
|
||||
@@ -968,7 +964,6 @@ def test_actors_and_tasks_with_gpus(shutdown_only):
|
||||
num_gpus_per_scheduler = 6
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_workers=0,
|
||||
num_local_schedulers=num_local_schedulers,
|
||||
num_cpus=num_gpus_per_scheduler,
|
||||
num_gpus=(num_local_schedulers * [num_gpus_per_scheduler]))
|
||||
@@ -1283,7 +1278,7 @@ def test_local_scheduler_dying(shutdown_only):
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_local_schedulers=2,
|
||||
num_workers=0,
|
||||
num_cpus=1,
|
||||
redirect_output=True)
|
||||
|
||||
@ray.remote
|
||||
@@ -1399,7 +1394,7 @@ def setup_counter_actor(test_checkpoint=False,
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_local_schedulers=2,
|
||||
num_workers=0,
|
||||
num_cpus=1,
|
||||
redirect_output=True)
|
||||
|
||||
# Only set the checkpoint interval if we're testing with checkpointing.
|
||||
@@ -1733,7 +1728,7 @@ def _test_nondeterministic_reconstruction(num_forks, num_items_per_fork,
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_local_schedulers=2,
|
||||
num_workers=0,
|
||||
num_cpus=1,
|
||||
redirect_output=True)
|
||||
|
||||
# Make a shared queue.
|
||||
@@ -2033,7 +2028,7 @@ def test_custom_label_placement(shutdown_only):
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_local_schedulers=2,
|
||||
num_workers=0,
|
||||
num_cpus=2,
|
||||
resources=[{
|
||||
"CustomResource1": 2
|
||||
}, {
|
||||
@@ -2064,11 +2059,7 @@ def test_custom_label_placement(shutdown_only):
|
||||
|
||||
|
||||
def test_creating_more_actors_than_resources(shutdown_only):
|
||||
ray.init(
|
||||
num_workers=0,
|
||||
num_cpus=10,
|
||||
num_gpus=2,
|
||||
resources={"CustomResource1": 1})
|
||||
ray.init(num_cpus=10, num_gpus=2, resources={"CustomResource1": 1})
|
||||
|
||||
@ray.remote(num_gpus=1)
|
||||
class ResourceActor1(object):
|
||||
|
||||
Reference in New Issue
Block a user