Skip to content
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

[RayService] Remove everything related to Ray Serve V1 API #1790

Merged
merged 2 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 35 additions & 40 deletions ray-operator/config/samples/ray-service.custom-serve-service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Make sure to increase resource requests and limits before using this example in production.
# For examples with more realistic resource configuration, see
# ray-cluster.complete.large.yaml and
# ray-cluster.autoscaler.large.yaml.
# This example shows how to configure a custom Kubernetes service for Ray Serve
# by specifying the `serveService` field in the RayService CRD.
apiVersion: ray.io/v1
kind: RayService
metadata:
Expand All @@ -20,38 +18,36 @@ spec:
- port: 12345
targetPort: 12345
name: custom-ray-serve-service-port
serveConfig:
importPath: fruit.deployment_graph
runtimeEnv: |
working_dir: "https://github.com/ray-project/test_dag/archive/41d09119cbdf8450599f993f51318e9e27c59098.zip"
deployments:
- name: MangoStand
numReplicas: 1
userConfig: |
price: 3
rayActorOptions:
numCpus: 0.1
- name: OrangeStand
numReplicas: 1
userConfig: |
price: 2
rayActorOptions:
numCpus: 0.1
- name: PearStand
numReplicas: 1
userConfig: |
price: 1
rayActorOptions:
numCpus: 0.1
- name: FruitMarket
numReplicas: 1
rayActorOptions:
numCpus: 0.1
- name: DAGDriver
numReplicas: 1
routePrefix: "/"
rayActorOptions:
numCpus: 0.1
serveConfigV2: |
applications:
- name: fruit_app
import_path: fruit.deployment_graph
route_prefix: /fruit
runtime_env:
working_dir: "https://github.com/ray-project/test_dag/archive/78b4a5da38796123d9f9ffff59bab2792a043e95.zip"
deployments:
- name: MangoStand
num_replicas: 1
user_config:
price: 3
ray_actor_options:
num_cpus: 0.1
- name: OrangeStand
num_replicas: 1
user_config:
price: 2
ray_actor_options:
num_cpus: 0.1
- name: PearStand
num_replicas: 1
user_config:
price: 1
ray_actor_options:
num_cpus: 0.1
- name: FruitMarket
num_replicas: 1
ray_actor_options:
num_cpus: 0.1
rayClusterConfig:
rayVersion: '2.9.0' # should match the Ray version in the image of the containers
######################headGroupSpecs#################################
Expand All @@ -60,9 +56,8 @@ spec:
# The `rayStartParams` are used to configure the `ray start` command.
# See https://github.com/ray-project/kuberay/blob/master/docs/guidance/rayStartParams.md for the default settings of `rayStartParams` in KubeRay.
# See https://docs.ray.io/en/latest/cluster/cli.html#ray-start for all available options in `rayStartParams`.
rayStartParams:
dashboard-host: '0.0.0.0'
#pod template
rayStartParams: {}
# Pod template
template:
spec:
containers:
Expand Down Expand Up @@ -95,7 +90,7 @@ spec:
# See https://github.com/ray-project/kuberay/blob/master/docs/guidance/rayStartParams.md for the default settings of `rayStartParams` in KubeRay.
# See https://docs.ray.io/en/latest/cluster/cli.html#ray-start for all available options in `rayStartParams`.
rayStartParams: {}
#pod template
# Pod template
template:
spec:
containers:
Expand Down
70 changes: 34 additions & 36 deletions ray-operator/config/samples/ray-service.different-port.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,46 @@ kind: RayService
metadata:
name: rayservice-sample
spec:
serveConfig:
importPath: fruit.deployment_graph
runtimeEnv: |
working_dir: "https://github.com/ray-project/test_dag/archive/41d09119cbdf8450599f993f51318e9e27c59098.zip"
deployments:
- name: MangoStand
numReplicas: 1
userConfig: |
price: 3
rayActorOptions:
numCpus: 0.1
- name: OrangeStand
numReplicas: 1
userConfig: |
price: 2
rayActorOptions:
numCpus: 0.1
- name: PearStand
numReplicas: 1
userConfig: |
price: 1
rayActorOptions:
numCpus: 0.1
- name: FruitMarket
numReplicas: 1
rayActorOptions:
numCpus: 0.1
- name: DAGDriver
numReplicas: 1
routePrefix: "/"
rayActorOptions:
numCpus: 0.1
port: 9000
serveConfigV2: |
applications:
- name: fruit_app
import_path: fruit.deployment_graph
route_prefix: /fruit
runtime_env:
working_dir: "https://github.com/ray-project/test_dag/archive/78b4a5da38796123d9f9ffff59bab2792a043e95.zip"
deployments:
- name: MangoStand
num_replicas: 1
user_config:
price: 3
ray_actor_options:
num_cpus: 0.1
- name: OrangeStand
num_replicas: 1
user_config:
price: 2
ray_actor_options:
num_cpus: 0.1
- name: PearStand
num_replicas: 1
user_config:
price: 1
ray_actor_options:
num_cpus: 0.1
- name: FruitMarket
num_replicas: 1
ray_actor_options:
num_cpus: 0.1
http_options:
port: 9000
rayClusterConfig:
rayVersion: '2.9.0' # should match the Ray version in the image of the containers
######################headGroupSpecs#################################
# Ray head pod template.
headGroupSpec:
# the following params are used to complete the ray start: ray start --head --block --redis-port=6379 ...
rayStartParams:
dashboard-host: '0.0.0.0'
#pod template
rayStartParams: {}
# Pod template
template:
spec:
containers:
Expand Down
1 change: 0 additions & 1 deletion ray-operator/config/samples/ray-service.text-ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ metadata:
name: rayservice-sample
spec:
# serveConfigV2 takes a yaml multi-line scalar, which should be a Ray Serve multi-application config. See https://docs.ray.io/en/latest/serve/multi-app.html.
# Only one of serveConfig and serveConfigV2 should be used.
serveConfigV2: |
applications:
- name: text_ml_app
Expand Down
1 change: 0 additions & 1 deletion ray-operator/config/samples/ray_v1alpha1_rayservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ metadata:
name: rayservice-sample
spec:
# serveConfigV2 takes a yaml multi-line scalar, which should be a Ray Serve multi-application config. See https://docs.ray.io/en/latest/serve/multi-app.html.
# Only one of serveConfig and serveConfigV2 should be used.
serveConfigV2: |
applications:
- name: fruit_app
Expand Down
36 changes: 0 additions & 36 deletions ray-operator/controllers/ray/utils/serve_api_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,39 +40,3 @@ type ServeDetails struct {
Applications map[string]ServeApplicationDetails `json:"applications"`
DeployMode string `json:"deploy_mode,omitempty"`
}

// ServingClusterDeployments defines the request sent to the dashboard api server.
// See https://docs.ray.io/en/master/_modules/ray/serve/schema.html#ServeApplicationSchema for more details.
type ServingClusterDeployments struct {
ImportPath string `json:"import_path"`
RuntimeEnv map[string]interface{} `json:"runtime_env,omitempty"`
Deployments []ServeConfigSpec `json:"deployments,omitempty"`
Port int `json:"port,omitempty"`
}

// ServeConfigSpec defines the (single-application) desired state of RayService, used by Ray Dashboard.
// Serve schema details: https://docs.ray.io/en/latest/serve/api/doc/ray.serve.schema.ServeApplicationSchema.html
type ServeConfigSpec struct {
Name string `json:"name"`
NumReplicas *int32 `json:"num_replicas,omitempty"`
RoutePrefix string `json:"route_prefix,omitempty"`
MaxConcurrentQueries *int32 `json:"max_concurrent_queries,omitempty"`
UserConfig map[string]interface{} `json:"user_config,omitempty"`
AutoscalingConfig map[string]interface{} `json:"autoscaling_config,omitempty"`
GracefulShutdownWaitLoopS *int32 `json:"graceful_shutdown_wait_loop_s,omitempty"`
GracefulShutdownTimeoutS *int32 `json:"graceful_shutdown_timeout_s,omitempty"`
HealthCheckPeriodS *int32 `json:"health_check_period_s,omitempty"`
HealthCheckTimeoutS *int32 `json:"health_check_timeout_s,omitempty"`
RayActorOptions RayActorOptionSpec `json:"ray_actor_options,omitempty"`
}

// RayActorOptionSpec defines the desired state of RayActor, used by Ray Dashboard.
type RayActorOptionSpec struct {
RuntimeEnv map[string]interface{} `json:"runtime_env,omitempty"`
NumCpus *float64 `json:"num_cpus,omitempty"`
NumGpus *float64 `json:"num_gpus,omitempty"`
Memory *uint64 `json:"memory,omitempty"`
ObjectStoreMemory *uint64 `json:"object_store_memory,omitempty"`
Resources map[string]interface{} `json:"resources,omitempty"`
AcceleratorType string `json:"accelerator_type,omitempty"`
}
88 changes: 0 additions & 88 deletions tests/config/ray-service.yaml.template

This file was deleted.

Loading