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

[Cluster launcher] Add friendly warning for missing boto3 and googleapiclient imports #39942

Merged

Conversation

architkulkarni
Copy link
Contributor

@architkulkarni architkulkarni commented Sep 28, 2023

Why are these changes needed?

Adds a friendlier warning when required packages for the cluster launcher are missing. boto3 in the case of AWS, and googleapiclient for GCP

Related issue number

Closes #39941

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@architkulkarni
Copy link
Contributor Author

@krfricke

https://github.com/architkulkarni/ray/blob/1fd210222b79fca568bc341f1cd915f842f998ea/python/setup.py#L235-L237

# If you're adding dependencies for ray extras, please
# also update the matching section of requirements/requirements.txt
# in this directory

It seems the file structure has changed. I couldn't find the relevant requirements.txt file for ray[default], do you know where I should add it?

@architkulkarni
Copy link
Contributor Author

architkulkarni commented Sep 28, 2023

Oh looks like it's just python/requirements.txt not requirements/requirements.txt?

No, that one doesn't have ray[default] either

@architkulkarni
Copy link
Contributor Author

@krfricke

https://github.com/architkulkarni/ray/blob/1fd210222b79fca568bc341f1cd915f842f998ea/python/setup.py#L235-L237

# If you're adding dependencies for ray extras, please
# also update the matching section of requirements/requirements.txt
# in this directory

It seems the file structure has changed. I couldn't find the relevant requirements.txt file for ray[default], do you know where I should add it?

@can-anyscale do you happen to know where to add it?

@can-anyscale
Copy link
Collaborator

@architkulkarni it's that python/requirements.txt file; you can just add a new comment to create a session of [default] and add boto3 under it

you might need to update the python/requirements_compiled.txt (auto-generated code) as well (https://www.notion.so/anyscale-hq/OSS-Python-dependency-management-f32633b0018c423f927727807ea9da08)

@architkulkarni
Copy link
Contributor Author

@architkulkarni it's that python/requirements.txt file; you can just add a new comment to create a session of [default] and add boto3 under it

you might need to update the python/requirements_compiled.txt (auto-generated code) as well (https://www.notion.so/anyscale-hq/OSS-Python-dependency-management-f32633b0018c423f927727807ea9da08)

@can-anyscale I don't see the pip-compile dependencies job described in https://www.notion.so/anyscale-hq/OSS-Python-dependency-management-f32633b0018c423f927727807ea9da08. Does that mean I don't need to update python/requirements_compiled.txt?

@can-anyscale
Copy link
Collaborator

Hi, normally python/requirements.txt requires an update (documentation is wrong?), but boto3 is already in the compiled list so in this particular case you don't need to update.

@architkulkarni
Copy link
Contributor Author

Ahh makes sense, thanks!

@architkulkarni
Copy link
Contributor Author

@edoakes do you mind reviewing this PR as codeowner?

@edoakes
Copy link
Contributor

edoakes commented Nov 2, 2023

@architkulkarni not sure if this has previously been discussed but I'm not sure if we want to do this; this is essentially making the AWS cluster launcher a supported part of the default installation, and opting folks into requiring this dependency even if they're running on other platforms (or not using the cluster launcher). I believe the current "policy" is that the cluster launchers are community-maintained, optional extensions to Ray.

I think the better solution would be to have a separate install target for each cluster launcher variant, like ray["aws"], ray["gcp"], etc. (though didn't we have that at some point?).

Archit Kulkarni added 7 commits November 2, 2023 16:05
…d job"

This reverts commit f5941a1.

Signed-off-by: Archit Kulkarni <[email protected]>
This reverts commit 4e524a8.

Signed-off-by: Archit Kulkarni <[email protected]>
This reverts commit 1fd2102.

Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
@architkulkarni architkulkarni requested a review from a team as a code owner November 2, 2023 23:08
Archit Kulkarni added 2 commits November 2, 2023 16:08
Signed-off-by: Archit Kulkarni <[email protected]>
Archit Kulkarni added 3 commits November 2, 2023 16:50
Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
@architkulkarni architkulkarni changed the title [Cluster] Add botocore as Ray dependency [Cluster launcher] Add friendly warning for missing boto3 and googleapiclient imports Nov 2, 2023
@architkulkarni
Copy link
Contributor Author

Discussed offline, we'll just add a better import warning. @edoakes please take another look

Copy link
Member

@hongchaodeng hongchaodeng left a comment

Choose a reason for hiding this comment

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

Nice!
LGTM

@architkulkarni architkulkarni merged commit d7b0ac2 into ray-project:master Nov 27, 2023
15 of 17 checks passed
ujjawal-khare pushed a commit to ujjawal-khare-27/ray that referenced this pull request Nov 29, 2023
…piclient imports (ray-project#39942)

Adds a friendlier warning when required packages for the cluster launcher are missing. boto3 in the case of AWS, and googleapiclient for GCP

Related issue number
Closes ray-project#39941

---------

Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
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.

[Cluster launcher] botocore is a dependency that isn't automatically installed by Ray
6 participants