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

[client] Better version-compatibility validation #42356

Closed
richardliaw opened this issue Jan 12, 2024 · 2 comments · Fixed by #42760
Closed

[client] Better version-compatibility validation #42356

richardliaw opened this issue Jan 12, 2024 · 2 comments · Fixed by #42760
Assignees
Labels
core Issues that should be addressed in Ray Core core-client ray client related issues enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks

Comments

@richardliaw
Copy link
Contributor

What happened + What you expected to happen

Currently users can often run into issues where version-compatibility issues for Ray Client can cause weird behaviors and hard to debug. If we can surface this issue more quickly and clearly, this can help make the experience better

Versions / Dependencies

Linux

Reproduction script

import ray

local_version = ray.__version__

ray.init("ray://localhost:10001")

@ray.remote
def get_version():
    return ray.__version__

remote_version = ray.get(get_version.remote())

matches = local_version == remote_version
if not matches:
    raise Exception(f"Ray version mismatch! local version is {local_version}, remote version is {remote_version}")
else:
    print(f"welcome to Ray Client! version {local_version}")

Issue Severity

Medium: It is a significant difficulty but I can work around it.

@richardliaw richardliaw added enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks core-client ray client related issues core Issues that should be addressed in Ray Core labels Jan 12, 2024
@rynewang
Copy link
Contributor

I took a look to the code.

  • in a Ray worker it checks Python version and Ray version.
    • python/ray/_private/utils.py
    • check_version_info, called in connect()
  • in a Ray client, it checks Python version and CURRENT_PROTOCOL_VERSION, which is set to "2023-06-27" rn.
    • python/ray/util/client/init.py
    • _ClientContext._check_versions

I am not sure where this discrepancy comes from.

@rynewang
Copy link
Contributor

rynewang commented Jan 29, 2024

Based on the discussions, we would do this for Client:

  • error on 2 digit python mismatch
  • warning on 3 digit python mismatch
  • error on ray version mismatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core core-client ray client related issues enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants