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

Change resync_rh to None by default and match Ray version. #1020

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

rohinb2
Copy link
Contributor

@rohinb2 rohinb2 commented Jul 16, 2024

Logic is now as follows.

resync_rh is None by default. In this case or if resync_rh is just set to True:

  • If Runhouse is not installed on the remote cluster OR if Runhouse is installed editable locally
  • Then we first install the identical Ray version to local, then install either the local Runhouse or the matching version

If resync_rh is False, then we for sure do not sync Runhouse in any way.

Copy link
Contributor Author

rohinb2 commented Jul 16, 2024

@rohinb2 rohinb2 changed the title Change resync_rh to False by default. Change resync_rh to None by default. Jul 16, 2024
@rohinb2 rohinb2 force-pushed the 07-16-Change_resync_rh_to_False_by_default branch 2 times, most recently from d3c4c86 to 3ff0ef9 Compare July 16, 2024 21:06
@rohinb2 rohinb2 changed the title Change resync_rh to None by default. Change resync_rh to None by default and match Ray version. Jul 16, 2024
stream_logs=True,
)

if installed_editable_locally or resync_rh:
Copy link
Collaborator

Choose a reason for hiding this comment

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

if resync_rh is False, that means it's explicitly set and we shouldn't resync even if it is an editable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I won't even enter this function if resync_rh is False

Copy link
Collaborator

Choose a reason for hiding this comment

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

if installed_editable is True but resync_rh is False it'll still enter this right?

restart_ray: bool = True,
restart_proxy: bool = False,
logs_level: str = None,
):
"""Restart the RPC server.

Args:
resync_rh (bool): Whether to resync runhouse. (Default: ``True``)
resync_rh (bool): Whether to resync runhouse. Specifying False will not sync Runhouse under any circumstance. If it is None, then it will sync if Runhouse is not installed on the cluster or if locally it is installed as editable. (Default: ``None``)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we don't need to specify the behavior for False or True, should be pretty self explanatory.

Suggested change
resync_rh (bool): Whether to resync runhouse. Specifying False will not sync Runhouse under any circumstance. If it is None, then it will sync if Runhouse is not installed on the cluster or if locally it is installed as editable. (Default: ``None``)
resync_rh (bool): Whether to resync runhouse. By default, it will sync if Runhouse is not installed on the cluster or if locally it is installed as editable. (Default: ``None``)

Comment on lines 433 to 438
local_ray_version_call = subprocess.run(
["pip freeze | grep ray"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have an existing helper from the new package functionality to grab the local version for a package? Better not to have to handle edge cases here like editable / local installs.

@rohinb2 rohinb2 force-pushed the 07-16-Sync_runhouse_before_installing_default_env_ branch from dcec26c to 0531ebc Compare July 17, 2024 14:32
@rohinb2 rohinb2 force-pushed the 07-16-Change_resync_rh_to_False_by_default branch from 3ff0ef9 to 790f5bb Compare July 17, 2024 14:32
Copy link
Contributor Author

rohinb2 commented Jul 17, 2024

Merge activity

  • Jul 17, 11:02 AM EDT: @rohinb2 started a stack merge that includes this pull request via Graphite.
  • Jul 17, 11:07 AM EDT: Graphite rebased this pull request as part of a merge.
  • Jul 17, 11:08 AM EDT: @rohinb2 merged this pull request with Graphite.

@rohinb2 rohinb2 force-pushed the 07-16-Sync_runhouse_before_installing_default_env_ branch from 0531ebc to c75b4db Compare July 17, 2024 15:04
Base automatically changed from 07-16-Sync_runhouse_before_installing_default_env_ to main July 17, 2024 15:06
@rohinb2 rohinb2 force-pushed the 07-16-Change_resync_rh_to_False_by_default branch from 790f5bb to 3499ea8 Compare July 17, 2024 15:06
@rohinb2 rohinb2 merged commit 1489731 into main Jul 17, 2024
12 checks passed
@rohinb2 rohinb2 deleted the 07-16-Change_resync_rh_to_False_by_default branch July 17, 2024 15:08
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.

3 participants