Skip to content

Commit

Permalink
Skip modin example for py37 (#47)
Browse files Browse the repository at this point in the history
* Don't run example for py37 (which uses modin==0.12.1)

Signed-off-by: Justin Yu <[email protected]>

* Fix lint

Signed-off-by: Justin Yu <[email protected]>

---------

Signed-off-by: Justin Yu <[email protected]>
  • Loading branch information
justinvyu authored Jun 14, 2023
1 parent 394dc83 commit c7c894c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lightgbm_ray/examples/simple_modin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import pandas as pd
import ray
from packaging.version import Version
from sklearn.utils import shuffle
from xgboost_ray.data_sources.modin import MODIN_INSTALLED

Expand All @@ -17,6 +18,14 @@ def main(cpus_per_actor, num_actors):
)
return

import modin

if Version(modin.__version__) < Version("0.16.0") and Version(
ray.__version__
) >= Version("2.6.0"):
print("modin<=0.16.0 is not compatible with ray>=2.6.0.")
return

# Import modin after initializing Ray
from modin.distributed.dataframe.pandas import from_partitions

Expand Down

0 comments on commit c7c894c

Please sign in to comment.