mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 03:04:28 +08:00
[Java] Refine python function (#8943)
This commit is contained in:
+2
-2
@@ -52,8 +52,8 @@ public class WorkerLifecycleController {
|
||||
.setMaxRestarts(-1)
|
||||
.remote();
|
||||
} else {
|
||||
actor = Ray.actor(new PyActorClass(
|
||||
"ray.streaming.runtime.worker", "JobWorker"))
|
||||
actor = Ray.actor(
|
||||
PyActorClass.of("ray.streaming.runtime.worker", "JobWorker"))
|
||||
.setResources(executionVertex.getResource())
|
||||
.setMaxRestarts(-1)
|
||||
.remote();
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ public class RemoteCallWorker {
|
||||
|
||||
// python
|
||||
if (actor instanceof PyActorHandle) {
|
||||
result = ((PyActorHandle) actor).task(new PyActorMethod("init", Object.class),
|
||||
result = ((PyActorHandle) actor).task(PyActorMethod.of("init", Boolean.class),
|
||||
context.getPythonWorkerContextBytes()).remote();
|
||||
} else {
|
||||
// java
|
||||
@@ -56,7 +56,7 @@ public class RemoteCallWorker {
|
||||
// python
|
||||
if (actor instanceof PyActorHandle) {
|
||||
result = ((PyActorHandle) actor)
|
||||
.task(new PyActorMethod("start", Object.class)).remote();
|
||||
.task(PyActorMethod.of("start", Boolean.class)).remote();
|
||||
} else {
|
||||
// java
|
||||
result = ((ActorHandle<JobWorker>) actor).task(JobWorker::start).remote();
|
||||
|
||||
Reference in New Issue
Block a user