mirror of
https://github.com/wassname/ray.git
synced 2026-08-06 13:31:10 +08:00
Remove (object) from class declarations. (#6658)
This commit is contained in:
committed by
Philipp Moritz
parent
f1b56fa5ee
commit
39a3459886
@@ -373,7 +373,7 @@ def test_multithreading(ray_start_2_cpus):
|
||||
"""Test using Ray api in multiple threads."""
|
||||
|
||||
@ray.remote
|
||||
class Echo(object):
|
||||
class Echo:
|
||||
def echo(self, value):
|
||||
return value
|
||||
|
||||
@@ -433,7 +433,7 @@ def test_multithreading(ray_start_2_cpus):
|
||||
|
||||
# Test actor that runs background threads.
|
||||
@ray.remote
|
||||
class MultithreadedActor(object):
|
||||
class MultithreadedActor:
|
||||
def __init__(self):
|
||||
self.lock = threading.Lock()
|
||||
self.thread_results = []
|
||||
@@ -504,7 +504,7 @@ def test_free_objects_multi_node(ray_start_cluster):
|
||||
_internal_config=config)
|
||||
ray.init(address=cluster.address)
|
||||
|
||||
class RawActor(object):
|
||||
class RawActor:
|
||||
def get(self):
|
||||
return ray.worker.global_worker.node.unique_id
|
||||
|
||||
@@ -633,7 +633,7 @@ def test_local_mode(shutdown_only):
|
||||
# Test actors in LOCAL_MODE.
|
||||
|
||||
@ray.remote
|
||||
class LocalModeTestClass(object):
|
||||
class LocalModeTestClass:
|
||||
def __init__(self, array):
|
||||
self.array = array
|
||||
|
||||
@@ -718,7 +718,7 @@ def test_local_mode(shutdown_only):
|
||||
# Check that Actors are not overwritten by remote calls from different
|
||||
# classes.
|
||||
@ray.remote
|
||||
class RemoteActor1(object):
|
||||
class RemoteActor1:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -726,7 +726,7 @@ def test_local_mode(shutdown_only):
|
||||
return 0
|
||||
|
||||
@ray.remote
|
||||
class RemoteActor2(object):
|
||||
class RemoteActor2:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -756,7 +756,7 @@ def test_wait_makes_object_local(ray_start_cluster):
|
||||
ray.init(address=cluster.address)
|
||||
|
||||
@ray.remote
|
||||
class Foo(object):
|
||||
class Foo:
|
||||
def method(self):
|
||||
return np.zeros(1024 * 1024)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user