mirror of
https://github.com/wassname/ray.git
synced 2026-08-04 13:14:14 +08:00
Remove (object) from class declarations. (#6658)
This commit is contained in:
committed by
Philipp Moritz
parent
f1b56fa5ee
commit
39a3459886
@@ -96,7 +96,7 @@ def test_actor_eviction(ray_start_object_store_memory):
|
||||
object_store_memory = ray_start_object_store_memory
|
||||
|
||||
@ray.remote
|
||||
class Actor(object):
|
||||
class Actor:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -134,7 +134,7 @@ def test_actor_reconstruction(ray_start_regular):
|
||||
"""Test actor reconstruction when actor process is killed."""
|
||||
|
||||
@ray.remote(max_reconstructions=1)
|
||||
class ReconstructableActor(object):
|
||||
class ReconstructableActor:
|
||||
"""An actor that will be reconstructed at most once."""
|
||||
|
||||
def __init__(self):
|
||||
@@ -183,7 +183,7 @@ def test_actor_reconstruction_without_task(ray_start_regular):
|
||||
"""Test a dead actor can be reconstructed without sending task to it."""
|
||||
|
||||
@ray.remote(max_reconstructions=1)
|
||||
class ReconstructableActor(object):
|
||||
class ReconstructableActor:
|
||||
def __init__(self, obj_ids):
|
||||
for obj_id in obj_ids:
|
||||
# Every time the actor gets constructed,
|
||||
@@ -231,7 +231,7 @@ def test_actor_reconstruction_on_node_failure(ray_start_cluster_head):
|
||||
cluster.remove_node(node_to_remove)
|
||||
|
||||
@ray.remote(max_reconstructions=max_reconstructions, resources={"a": 1})
|
||||
class MyActor(object):
|
||||
class MyActor:
|
||||
def __init__(self):
|
||||
self.value = 0
|
||||
|
||||
@@ -296,7 +296,7 @@ def test_multiple_actor_reconstruction(ray_start_cluster_head):
|
||||
]
|
||||
|
||||
@ray.remote(max_reconstructions=ray.ray_constants.INFINITE_RECONSTRUCTION)
|
||||
class SlowCounter(object):
|
||||
class SlowCounter:
|
||||
def __init__(self):
|
||||
self.x = 0
|
||||
|
||||
@@ -636,7 +636,7 @@ def test_decorated_method(ray_start_regular):
|
||||
return new_f_execution
|
||||
|
||||
@ray.remote
|
||||
class Actor(object):
|
||||
class Actor:
|
||||
@method_execution_decorator
|
||||
def decorated_method(self, x):
|
||||
return x + 1
|
||||
@@ -663,7 +663,7 @@ def test_ray_wait_dead_actor(ray_start_cluster):
|
||||
cluster = ray_start_cluster
|
||||
|
||||
@ray.remote(num_cpus=1)
|
||||
class Actor(object):
|
||||
class Actor:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -707,7 +707,7 @@ def test_ray_wait_dead_actor(ray_start_cluster):
|
||||
ray.experimental.set_resource(head_node_resource, 1)
|
||||
|
||||
@ray.remote(num_cpus=0, resources={head_node_resource: 1})
|
||||
class ParentActor(object):
|
||||
class ParentActor:
|
||||
def __init__(self, ping_ids):
|
||||
self.unready = ping_ids
|
||||
|
||||
|
||||
Reference in New Issue
Block a user