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

FEAT-#7139: Use ray-core instead of ray-default #6955

Merged
merged 25 commits into from
May 2, 2024

Conversation

anmyachev
Copy link
Collaborator

@anmyachev anmyachev commented Feb 21, 2024

What do these changes do?

These changes are aimed at reducing the number of dependencies and thereby simplifying the installation of Modin with the Ray engine in the user environment. For example, we might not install dependencies for the Ray dashboard. To do this, we could use either package ray[client], but it appears only from version Ray>=2.6.0 (there is no desire to increase the minimally supported version of Ray so much for now), or switch to using the basic package itself (ray), but this will not work for fairly new versions of Ray, so how they don't include grpcio dependency.

As a transitional option, we can use the basic package with an explicit indication of grpcio package . This option will work, in this pull request, I tried it with different versions of Ray. However, there is a chance that grpcio package of some version will be installed, with which Ray has problems. Ray can explicitly exclude any versions in such cases (note: the exceptions are not made for the basic package, but for ray[client] package, so they cannot be reused on our side), but using the proposed approach, we most likely will not know about this until the problem arises for users.

If we decide to switch to such a transitional option, then I believe we should also consider switching to ray[client] package for Modin 1.0 release.

For example, dependencies for ray[default]==2.9.3:

        "default": [
            # If adding dependencies necessary to launch the dashboard api server,
            # please add it to dashboard/optional_deps.py as well.
            "aiohttp >= 3.7",
            "aiohttp_cors",
            "colorful",
            "py-spy >= 0.2.0",
            "requests",
            "gpustat >= 1.0.0",  # for windows
            "grpcio >= 1.32.0; python_version < '3.10'",  # noqa:E501
            "grpcio >= 1.42.0; python_version >= '3.10'",  # noqa:E501
            "opencensus",
            "pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3",
            "prometheus_client >= 0.7.1",
            "smart_open",
            "virtualenv >=20.0.24, !=20.21.1",  # For pip runtime env.
        ],
  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves Simplify Modin on Ray installation #7139
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

docs/requirements-doc.txt Outdated Show resolved Hide resolved
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
…try-another-ray-target

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev anmyachev changed the title TEST-#0000: try to use ray-core instead ray-default FEAT-#7139: use ray-core+grpcio instead of ray-default Apr 2, 2024
@anmyachev anmyachev marked this pull request as ready for review April 2, 2024 11:38
@rkooo567
Copy link
Collaborator

I think there's no package that only includes cluster launcher. ray[client] is not for the cluster launcher (it is for ray client mode https://docs.ray.io/en/master/cluster/running-applications/job-submission/ray-client.html, which is not recommended to use)

@anmyachev anmyachev marked this pull request as draft April 30, 2024 11:46
@anmyachev
Copy link
Collaborator Author

I think there's no package that only includes cluster launcher. ray[client] is not for the cluster launcher (it is for ray client mode https://docs.ray.io/en/master/cluster/running-applications/job-submission/ray-client.html, which is not recommended to use)

@rkooo567 thanks! Now it’s more clear how to deal with this.

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev anmyachev changed the base branch from master to main April 30, 2024 19:24
@anmyachev anmyachev dismissed YarShev’s stale review April 30, 2024 19:24

The base branch was changed.

This reverts commit a2c48c3.
@anmyachev
Copy link
Collaborator Author

It looks like we can safely remove ClientObjectRef from Modin sources. It was introduced in #2851. Ray fixed the problem a long time ago and defined the type like this: class ClientObjectRef(raylet.ObjectRef):

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev anmyachev changed the title FEAT-#7139: use ray-core+grpcio instead of ray-default FEAT-#7139: Use ray-core instead of ray-default May 1, 2024
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev anmyachev marked this pull request as ready for review May 1, 2024 12:06
README.md Outdated Show resolved Hide resolved
docs/getting_started/installation.rst Outdated Show resolved Hide resolved
Co-authored-by: Iaroslav Igoshev <Poolliver868@mail.ru>
README.md Outdated
@@ -76,6 +76,10 @@ Otherwise, installation of `modin[mpi]` may fail. Refer to
[Installing with pip](https://unidist.readthedocs.io/en/latest/installation.html#installing-with-pip)
section of the unidist documentation for more details about installation.

**Note:** Since Modin 0.30.0 we use a reduced set of Ray dependencies: `ray` instead of `ray[default]`.
This means that the dashboard and cluster launcher are no longer installed by default.
If you need those, consider installing `ray[default]` (through pip) along with `modin[ray]` or `ray-default` (through conda).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
If you need those, consider installing `ray[default]` (through pip) along with `modin[ray]` or `ray-default` (through conda).
If you need those, consider installing `ray[default]` (through pip) or `ray-default` (through conda) along with `modin[ray]`.

The first suggestion above.
The second is maybe we should also add this note to installation with conda below like.

**Note:** Since Modin 0.30.0 we use a reduced set of Ray dependencies: `ray-core` instead of `ray-default`.
This means that the dashboard and cluster launcher are no longer installed by default.
If you need those, consider installing `ray-default` along with `modin-ray`.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would go with the second one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
docs/getting_started/installation.rst Outdated Show resolved Hide resolved
docs/getting_started/installation.rst Outdated Show resolved Hide resolved
docs/getting_started/installation.rst Outdated Show resolved Hide resolved
docs/getting_started/installation.rst Outdated Show resolved Hide resolved
@YarShev YarShev merged commit 2afcfe0 into modin-project:main May 2, 2024
45 checks passed
@anmyachev anmyachev deleted the try-another-ray-target branch May 2, 2024 13:36
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.

Simplify Modin on Ray installation
3 participants