mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Remove deprecated f._submit API (#12268)
This commit is contained in:
parent
822d8eb535
commit
4e43650851
3 changed files with 5 additions and 22 deletions
|
@ -80,7 +80,7 @@ interest are the ones with non-zero execution times:
|
|||
...
|
||||
1 0.000 0.000 2.509 2.509 your_script_here.py:31(ex1)
|
||||
5 0.000 0.000 0.001 0.000 remote_function.py:103(remote)
|
||||
5 0.000 0.000 0.001 0.000 remote_function.py:107(_submit)
|
||||
5 0.000 0.000 0.001 0.000 remote_function.py:107(_remote)
|
||||
...
|
||||
10 0.000 0.000 0.000 0.000 worker.py:2459(__init__)
|
||||
5 0.000 0.000 2.508 0.502 worker.py:2535(get)
|
||||
|
@ -160,7 +160,7 @@ Running our new Actor example, cProfile's abbreviated output is as follows:
|
|||
ncalls tottime percall cumtime percall filename:lineno(function)
|
||||
...
|
||||
1 0.000 0.000 0.015 0.015 actor.py:546(remote)
|
||||
1 0.000 0.000 0.015 0.015 actor.py:560(_submit)
|
||||
1 0.000 0.000 0.015 0.015 actor.py:560(_remote)
|
||||
1 0.000 0.000 0.000 0.000 actor.py:697(__init__)
|
||||
...
|
||||
1 0.000 0.000 2.525 2.525 your_script_here.py:63(ex4)
|
||||
|
@ -213,7 +213,7 @@ Our example in total now takes only 1.5 seconds to run:
|
|||
ncalls tottime percall cumtime percall filename:lineno(function)
|
||||
...
|
||||
5 0.000 0.000 0.002 0.000 actor.py:546(remote)
|
||||
5 0.000 0.000 0.002 0.000 actor.py:560(_submit)
|
||||
5 0.000 0.000 0.002 0.000 actor.py:560(_remote)
|
||||
5 0.000 0.000 0.000 0.000 actor.py:697(__init__)
|
||||
...
|
||||
1 0.000 0.000 1.566 1.566 your_script_here.py:71(ex4)
|
||||
|
|
|
@ -107,23 +107,6 @@ class RemoteFunction:
|
|||
f"of running '{self._function_name}()', "
|
||||
f"try '{self._function_name}.remote()'.")
|
||||
|
||||
def _submit(self,
|
||||
args=None,
|
||||
kwargs=None,
|
||||
num_returns=None,
|
||||
num_cpus=None,
|
||||
num_gpus=None,
|
||||
resources=None):
|
||||
logger.warning(
|
||||
"WARNING: _submit() is being deprecated. Please use _remote().")
|
||||
return self._remote(
|
||||
args=args,
|
||||
kwargs=kwargs,
|
||||
num_returns=num_returns,
|
||||
num_cpus=num_cpus,
|
||||
num_gpus=num_gpus,
|
||||
resources=resources)
|
||||
|
||||
def options(self,
|
||||
args=None,
|
||||
kwargs=None,
|
||||
|
|
|
@ -15,7 +15,7 @@ def test_infeasible_tasks(ray_start_cluster):
|
|||
ray.init(address=cluster.address)
|
||||
|
||||
# Submit an infeasible task.
|
||||
x_id = f._submit(args=[], kwargs={}, resources={str(1): 1})
|
||||
x_id = f._remote(args=[], kwargs={}, resources={str(1): 1})
|
||||
|
||||
# Add a node that makes the task feasible and make sure we can get the
|
||||
# result.
|
||||
|
@ -42,7 +42,7 @@ f.remote()
|
|||
|
||||
# Make sure we can still run tasks on all nodes.
|
||||
ray.get([
|
||||
f._submit(args=[], kwargs={}, resources={str(i): 1}) for i in range(3)
|
||||
f._remote(args=[], kwargs={}, resources={str(i): 1}) for i in range(3)
|
||||
])
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue