-
Notifications
You must be signed in to change notification settings - Fork 349
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
add support for rayserve in apiserver #456
add support for rayserve in apiserver #456
Conversation
65d153d
to
cf76d08
Compare
cf76d08
to
c108120
Compare
For now, test on local environment has success and ready for review. |
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.
thanks. lgtm. Please make sure the tests pass and let @Jeffwan approve
proto/serve.proto
Outdated
double gpu = 3; | ||
int32 memory = 4; | ||
int32 object_store_memory = 5; | ||
string resource = 6; |
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.
what's the resource field for?
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.
this part here is aligned with the apis of services
kuberay/ray-operator/apis/ray/v1alpha1/rayservice_types.go
Lines 56 to 63 in fdee883
type RayActorOptionSpec struct { | |
RuntimeEnv string `json:"runtimeEnv,omitempty"` | |
NumCpus *float64 `json:"numCpus,omitempty"` | |
NumGpus *float64 `json:"numGpus,omitempty"` | |
Memory *int32 `json:"memory,omitempty"` | |
ObjectStoreMemory *int32 `json:"objectStoreMemory,omitempty"` | |
Resources string `json:"resources,omitempty"` | |
AcceleratorType string `json:"acceleratorType,omitempty"` |
the resource definition here is custom define resource in the ray serve schema
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.
Minor: This is actually the custom resource? I feel ray serve's definition is not that clear. As a user, I may be confused on cpu,memory,gpu and resources here. I can not figure out what to put. Do you have the same feeling? If we can use different name to clarify that, that would be great.
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.
yes, I've replace the name with cpu_per_actor
... and add more comments for this field.
|
yes, I will add it to the top of the conversation.
this part is not updated yet, I will update in the third commit.
here is one things I would like to discuss, should we use the raycluster's ingress or rayservice ingress here? kuberay/ray-operator/controllers/ray/rayservice_controller.go Lines 601 to 603 in fdee883
|
c108120
to
5053de6
Compare
The json body of the request would be like: {
"name": "chenyu-test",
"user": "chenyu.jiang",
"serveDeploymentGraphSpec": {
"importPath": "fruit.deployment_graph",
"runtimeEnv": "working_dir: \"https://github.com/ray-project/test_dag/archive/c620251044717ace0a4c19d766d43c5099af8a77.zip\"",
"serveConfigs": [{
"deploymentName": "MangoStand",
"replicas": 1,
"userConfig": "price: 3",
"actorOptions": {
"cpus": 0.1
}
},
{
"deploymentName": "OrangeStand",
"replicas": 1,
"userConfig": "price: 2",
"actorOptions": {
"cpus": 0.1
}
},
{
"deploymentName": "PearStand",
"replicas": 1,
"userConfig": "price: 1",
"actorOptions": {
"cpus": 0.1
}
},
{
"deploymentName": "FruitMarket",
"replicas": 1,
"actorOptions": {
"cpus": 0.1
}
},{
"deploymentName": "DAGDriver",
"replicas": 1,
"routePrefix": "/",
"actorOptions": {
"cpus": 0.1
}
}]
},
"clusterSpec": {
// ...
}
} which is compatible to the example of the yaml: kuberay/ray-operator/config/samples/ray_v1alpha1_rayservice.yaml Lines 11 to 43 in 40ea21c
|
e89323d
to
54d1d46
Compare
54d1d46
to
71a75f3
Compare
Do you think rayserve should leverage raycluster's ingress to accept external traffic? |
71a75f3
to
5ddf134
Compare
5ddf134
to
527dbdd
Compare
I see, here is an outdate comment, for now I've implement in the way to poulate response with active rayservice cluster's ingress and endpoints . |
* add support for rayserve in apiserver * add implementation for rayservice in apiserver * rename the actor config Co-authored-by: chenyu.jiang <chenyu.jiang@bytedance.com>
Why are these changes needed?
Same with ray job, we need to add support for CRUD of ray service in apiserver.
Related issue number
Checks