diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5b4a890..af08e41 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,7 +30,7 @@ jobs: test_linux_ray_master: runs-on: ubuntu-latest - timeout-minutes: 40 + timeout-minutes: 100 strategy: matrix: python-version: [3.6.9, 3.7, 3.8] @@ -60,15 +60,21 @@ jobs: run: | ./lightgbm_ray/tests/env_info.sh - name: Run tests - run: | - bash ./run_ci_tests.sh + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: bash ./run_ci_tests.sh - name: Run examples - run: | - bash ./run_ci_examples.sh + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: bash ./run_ci_examples.sh test_linux_ray_release: runs-on: ubuntu-latest - timeout-minutes: 40 + timeout-minutes: 100 strategy: matrix: python-version: [3.6.9, 3.7, 3.8] @@ -91,17 +97,23 @@ jobs: run: | ./lightgbm_ray/tests/env_info.sh - name: Run tests - run: | - bash ./run_ci_tests.sh + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: bash ./run_ci_tests.sh - name: Run examples - run: | - bash ./run_ci_examples.sh + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: bash ./run_ci_examples.sh test_linux_compat: # Test compatibility when some optional libraries are missing # Test runs on latest ray release runs-on: ubuntu-latest - timeout-minutes: 40 + timeout-minutes: 100 strategy: matrix: python-version: [3.6.9, 3.7, 3.8] @@ -129,16 +141,22 @@ jobs: run: | ./lightgbm_ray/tests/env_info.sh - name: Run tests - run: | - bash ./run_ci_tests.sh --no-tune + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: bash ./run_ci_tests.sh --no-tune - name: Run examples - run: | - bash ./run_ci_examples.sh --no-tune + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: bash ./run_ci_examples.sh --no-tune test_linux_cutting_edge: # Tests on cutting edge, i.e. latest Ray master, latest LightGBM master runs-on: ubuntu-latest - timeout-minutes: 40 + timeout-minutes: 100 strategy: matrix: python-version: [3.6.9, 3.7, 3.8] @@ -185,8 +203,14 @@ jobs: run: | ./lightgbm_ray/tests/env_info.sh - name: Run tests - run: | - bash ./run_ci_tests.sh + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: bash ./run_ci_tests.sh - name: Run examples - run: | - bash ./run_ci_examples.sh + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: bash ./run_ci_examples.sh diff --git a/lightgbm_ray/__init__.py b/lightgbm_ray/__init__.py index ed813e8..8d398e0 100644 --- a/lightgbm_ray/__init__.py +++ b/lightgbm_ray/__init__.py @@ -5,7 +5,7 @@ from lightgbm_ray.sklearn import RayLGBMClassifier, RayLGBMRegressor -__version__ = "0.1.0" +__version__ = "0.1.1" __all__ = [ "__version__", "RayParams", "RayDMatrix", "RayDeviceQuantileDMatrix", diff --git a/lightgbm_ray/sklearn.py b/lightgbm_ray/sklearn.py index c984a51..54965a9 100644 --- a/lightgbm_ray/sklearn.py +++ b/lightgbm_ray/sklearn.py @@ -139,7 +139,7 @@ def _ray_fit(self, eval_init_score) if train_dmatrix is None: - train_dmatrix, evals = _wrap_evaluation_matrices( + wrap_evaluation_matrices_kwargs = dict( missing=None, X=X, y=y, @@ -158,6 +158,16 @@ def _ray_fit(self, **kwargs, **ray_dmatrix_params })) + try: + train_dmatrix, evals = _wrap_evaluation_matrices( + **wrap_evaluation_matrices_kwargs) + except TypeError as e: + if "enable_categorical" in str(e): + train_dmatrix, evals = _wrap_evaluation_matrices( + **wrap_evaluation_matrices_kwargs, + enable_categorical=False) + else: + raise e eval_names = eval_names or [] diff --git a/setup.py b/setup.py index 4a744ad..f2d0c4b 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,10 @@ setup( name="lightgbm_ray", packages=find_packages(where=".", include="lightgbm_ray*"), - version="0.1.0", + version="0.1.1", author="Ray Team", description="A Ray backend for distributed LightGBM", long_description="A distributed backend for LightGBM built on top of " "distributed computing framework Ray.", url="https://github.com/ray-project/lightgbm_ray", - install_requires=["lightgbm>=3.2.1", "xgboost_ray>=0.1.3"]) + install_requires=["lightgbm>=3.2.1", "xgboost_ray>=0.1.4"])