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

[Post release v0.5.0] Remove block from rayStartParams for python client and KubeRay operator tests #1050

Closed

Conversation

Yicheng-Lu-llll
Copy link
Contributor

@Yicheng-Lu-llll Yicheng-Lu-llll commented Apr 25, 2023

Why are these changes needed?

From v0.5.0, we inject --block in the rayStartParams automatically in #932. We remove block from YAML files after release v0.5.0 to follow the compatibility philosophy (#940) of KubeRay.

This PR:

  • Removes the block from rayStartParams for Python client and KubeRay operator tests
  • Adds corresponding ci test.

Related issue number

Closes #971
#940

Checks

I have run all tests and sample files for python client.

# Under /home/ubuntu/kuberay/clients/python-client
pip3 install -e .
python3 -m unittest discover './python_client_test/'

for file in ./examples/*.py
do
    echo "Running $file"
    python3 "$file"
done

I have run KubeRay operator tests:

# under /home/ubuntu/kuberay/ray-operator
make test

@Yicheng-Lu-llll Yicheng-Lu-llll changed the title [Post release v0.5.0] Remove block from rayStartParams for python client [Post release v0.5.0] Remove block from rayStartParams for python client and KubeRay operator tests Apr 26, 2023
Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an unit test for --block option:

  • case 1: rayStartParams contains --block
  • case 2: rayStartParams does not contain --block.

@kevin85421
Copy link
Member

cc @jasoonn would you mind reviewing this PR? Thanks!

@jasoonn
Copy link
Contributor

jasoonn commented Apr 27, 2023

LGTM. Thanks for the contribution!

group_name="small-group",
ray_image="rayproject/ray:2.3.0",
ray_command=["/bin/bash", "-lc"],
init_image="busybox:1.28",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for highlighting this! Since init_image is now essentially unused in the Python client, I have also removed this argument for the Python client accordingly.

Signed-off-by: Yicheng-Lu-llll <luyc58576@gmail.com>
Signed-off-by: Yicheng-Lu-llll <luyc58576@gmail.com>
Signed-off-by: Yicheng-Lu-llll <luyc58576@gmail.com>
@@ -121,17 +120,14 @@ def build_worker(
group_name: str,
ray_image: str = "rayproject/ray:2.4.0",
ray_command: Any = ["/bin/bash", "-lc"],
init_image: str = "busybox:1.28",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasoonn @akanso is this a user-facing function? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It gives users the ability to customize their workers' configuration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build_worker() passes init_image as a parameter to call populate_worker_group() to generate worker group configuration. However, populate_worker_group() does not actually use that parameter. Hence, it makes sense to me to remove init_image here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If build_worker is a user-facing function, this change seems to break the backward compatibility. Is it OK?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not okay. I forgot to take backward compatibility into consideration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It breaks the backward compatibility but disruption is expected to be minimal.

init_image has a default value and in most cases, there is no strong need to modify it considering its meaning. Also for this reason, init_image does not appear in any Python client examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep init_image unchanged on this PR and make a separate PR to discuss this issue.

Signed-off-by: Yicheng-Lu-llll <luyc58576@gmail.com>
Signed-off-by: Yicheng-Lu-llll <luyc58576@gmail.com>
@kevin85421 kevin85421 self-assigned this May 8, 2023
Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @jasoonn we decide to keep init_image in the Python client module the same. Would you mind opening a PR to discuss whether we can break the backward compatibility? Thanks!

@kevin85421
Copy link
Member

This PR has already been merged (ba814ef), but I am not sure why this PR has not been closed. Close this PR manually.

@kevin85421 kevin85421 closed this May 8, 2023
Yicheng-Lu-llll added a commit to Yicheng-Lu-llll/kuberay that referenced this pull request May 8, 2023
…ent and KubeRay operator tests (ray-project#1050)

Remove block from rayStartParams for python client and KubeRay operator tests
@jasoonn
Copy link
Contributor

jasoonn commented May 9, 2023

LGTM. @jasoonn we decide to keep init_image in the Python client module the same. Would you mind opening a PR to discuss whether we can break the backward compatibility? Thanks!

No problem. I have opened the issue #1072.

lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
…ent and KubeRay operator tests (ray-project#1050)

Remove block from rayStartParams for python client and KubeRay operator tests
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.

[Feature] Remove block: true in configuration YAML files after release 0.5.0
3 participants