-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE-47] support run on ray community version #89
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
import io.ray.api.ActorHandle; | ||
import io.ray.api.ObjectRef; | ||
import io.ray.api.Ray; | ||
import io.ray.api.options.ActorLifetime; | ||
import java.io.Serializable; | ||
import java.util.List; | ||
import org.slf4j.Logger; | ||
|
@@ -41,6 +42,7 @@ public static ActorHandle<RayMasterRunner> createMaster(ClusterConfig clusterCon | |
ActorHandle<RayMasterRunner> masterRayActor = Ray | ||
.actor(RayMasterRunner::new, clusterConfig.getConfig()) | ||
.setMaxRestarts(clusterConfig.getMaxRestarts()) | ||
.setLifetime(ActorLifetime.DETACHED) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "detached" actor will not be killed when the ray job is finished or failed. Does it make sense for your scenes? For more detail, you can read this doc https://docs.ray.io/en/latest/ray-core/actors/named-actors.html?highlight=detached#actor-lifetimes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it make sense for out scenes. we expected the actor run with long-running mode. |
||
.setJvmOptions(jvmOptions).remote(); | ||
LOGGER.info("master actor:{}, memoryMB:{}, jvmOptions:{}, isRestartAllFo:{}, foRestartTimes:{}", | ||
masterRayActor.getId().toString(), totalMemoryMb, jvmOptions, | ||
|
@@ -63,6 +65,7 @@ public static ActorHandle<RayDriverRunner> createDriver(ClusterConfig clusterCon | |
ActorHandle<RayDriverRunner> driverRayActor = Ray | ||
.actor(RayDriverRunner::new, context) | ||
.setMaxRestarts(clusterConfig.getMaxRestarts()) | ||
.setLifetime(ActorLifetime.DETACHED) | ||
.setJvmOptions(jvmOptions).remote(); | ||
LOGGER.info("driver actor:{}, memoryMB:{}, jvmOptions:{}, isRestartAllFo:{}, foRestartTimes:{}", | ||
driverRayActor.getId().toString(), totalMemoryMb, jvmOptions, | ||
|
@@ -75,6 +78,7 @@ public static ActorHandle<RayContainerRunner> createContainer(ClusterConfig clus | |
ActorHandle<RayContainerRunner> rayContainer = Ray | ||
.actor(RayContainerRunner::new, containerContext) | ||
.setMaxRestarts(clusterConfig.getMaxRestarts()) | ||
.setLifetime(ActorLifetime.DETACHED) | ||
.remote(); | ||
LOGGER.info("worker actor {} isDisableFo {}", rayContainer.getId().toString(), | ||
clusterConfig.isFoEnable()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerning about this. Why we rename ray to ray community? For the open source software, the meaning of "ray" is "open source ray" by default. I think we don't need to rename it because there is only one ray project in community currently. "RAY_COMMUNITY" is confusing for open source users.