Skip to content

Commit

Permalink
Support running on Ray 2.4 (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
jovany-wang committed Jul 11, 2023
1 parent 8c40078 commit a0bba61
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/test_on_ray2.4.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: test on ray2.4.0

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
run-unit-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
container: docker.io/library/ubuntu:latest

steps:
- uses: actions/checkout@v2

- name: Install basic dependencies
run: |
apt-get update
apt-get install -yq wget gcc g++ python3.9 zlib1g-dev zip libuv1.dev
apt-get install -yq pip
- name: Install python dependencies
run: |
python3 -m pip install virtualenv
python3 -m virtualenv -p python3 py3
. py3/bin/activate
which python
pip install pytest torch cloudpickle cryptography
pip install "protobuf<4.0"
pip install ray==2.4.0
- name: Build and test
run: |
. py3/bin/activate
pip install -e . -v
sh test.sh
8 changes: 7 additions & 1 deletion fed/_private/compatible_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import fed._private.constants as fed_constants

import ray.experimental.internal_kv as ray_internal_kv
from ray._private.gcs_utils import GcsClient
from fed._private import constants


Expand Down Expand Up @@ -102,6 +101,13 @@ def __init__(self) -> None:
super().__init__()

def initialize(self):
try:
from ray._private.gcs_utils import GcsClient
except ImportError:
# The GcsClient was moved to `ray._raylet` module in `ray-2.5.0`.
assert _compare_version_strings(ray.__version__, "2.4.0")
from ray._raylet import GcsClient

gcs_client = GcsClient(
address=_get_gcs_address_from_ray_worker(),
nums_reconnect_retry=10)
Expand Down

0 comments on commit a0bba61

Please sign in to comment.