Skip to content

Commit

Permalink
add env var for modin
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Yu <[email protected]>
  • Loading branch information
justinvyu committed Feb 2, 2024
1 parent 44691a8 commit 78557ac
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lightgbm_ray/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ def start_client_server_5_cpus():
yield client


@pytest.fixture
def start_client_server_5_cpus_modin(monkeypatch):
monkeypatch.setenv("__MODIN_AUTOIMPORT_PANDAS__", "1")
ray.init(num_cpus=5, runtime_env={"env_vars": {"__MODIN_AUTOIMPORT_PANDAS__": "1"}})
with ray_start_client_server() as client:
yield client


def test_simple_train(start_client_server_4_cpus):
assert ray.util.client.ray.is_connected()
from lightgbm_ray.examples.simple import main
Expand All @@ -41,7 +49,7 @@ def test_simple_dask(start_client_server_5_cpus):
main(cpus_per_actor=2, num_actors=2)


def test_simple_modin(start_client_server_5_cpus):
def test_simple_modin(start_client_server_5_cpus_modin):
assert ray.util.client.ray.is_connected()
from lightgbm_ray.examples.simple_modin import main

Expand Down

0 comments on commit 78557ac

Please sign in to comment.