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

[Bug] fix RayActorOptionSpec.items.spec.serveConfig.deployments.rayActorOptions.memory int32 data type #1220

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Jul 5, 2023

Why are these changes needed?

Based on actor.py, the unit of memory is specified as "byte". However, the data type of Memory in RayActorOptionSpec is specified as int32. The maximum value of int32 is 2^31 - 1. Therefore, if a user specifies a value larger than 2GB (2^31 bytes), it will result in an overflow. Hence, this PR updates the data type to uint64 instead.

  • proto/: I only updated serve.proto, and the other changes were generated by make generate.

  • CRD ray.io_rayservices.yaml: This is entirely maintained by the code generator. It's worth noting that YAML does not support unsigned integers [1], so in the CRD, the type is int64 instead of uint64.

    • [1] I cannot find the statement in the official YAML documentation, but there are multiple sources indicating that this is indeed true.

Related issue number

Closes #1212

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(
  • Gist: I set the value of rayActorOptions.memory for PearStand to 3 * 1024 * 1024 * 1024 (3GB).
Screen Shot 2023-07-05 at 1 24 18 PM

@kevin85421 kevin85421 changed the title WIP [Bug] fix RayActorOptionSpec.items.spec.serveConfig.deployments.rayActorOptions.memory int32 data type Jul 5, 2023
@kevin85421 kevin85421 marked this pull request as ready for review July 5, 2023 20:50
@kevin85421 kevin85421 requested review from gvspraveen and zcin July 5, 2023 20:58
@kevin85421 kevin85421 merged commit ddb5e52 into ray-project:master Jul 7, 2023
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
…torOptions.memory int32 data type (ray-project#1220)

fix RayActorOptionSpec.items.spec.serveConfig.deployments.rayActorOptions.memory int32 data type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] fix RayActorOptionSpec.items.spec.serveConfig.deployments.rayActorOptions.memory int32 data type
2 participants