Skip to content

Commit caa6116

Browse files
TEST-#7419: Fix a few errors in CI (#7420)
- Use Miniforge3 instead of Mambaforge in conda-incubator/setup-miniconda action, per conda-incubator/setup-miniconda#383 - Skip test that tries to use Modin with unidist installed via APT. See #7421 for details. - Remove manual conda packaging caching, an optimization which was added to speed up CI but now causes an error complaining that `CONDA_PKGS_DIR` is empty. - Fix some mypy errors in modin/__init__.py
1 parent 1c4d173 commit caa6116

File tree

3 files changed

+17
-26
lines changed

3 files changed

+17
-26
lines changed

.github/actions/mamba-env/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
${{ runner.os }}-conda-${{ steps.get-week.outputs.thisweek }}-${{ hashFiles(inputs.environment-file) }}
3333
- uses: conda-incubator/setup-miniconda@v3
3434
with:
35-
miniforge-variant: Mambaforge
35+
miniforge-variant: Miniforge3
3636
miniforge-version: latest
3737
use-mamba: true
3838
activate-environment: ${{ inputs.activate-environment }}

.github/workflows/ci.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,15 @@ jobs:
115115
run: |
116116
MODIN_ENGINE=dask python -c "import modin.pandas as pd; print(pd.DataFrame([1,2,3]))"
117117
MODIN_ENGINE=ray python -c "import modin.pandas as pd; print(pd.DataFrame([1,2,3]))"
118-
- name: Ensure MPI engine start up
119-
# Install a working MPI implementation beforehand so mpi4py can link to it
120-
run: |
121-
sudo apt install libmpich-dev
122-
python -m pip install -e ".[mpi]"
123-
MODIN_ENGINE=unidist UNIDIST_BACKEND=mpi mpiexec -n 1 python -c "import modin.pandas as pd; print(pd.DataFrame([1,2,3]))"
124-
if: matrix.os == 'ubuntu'
118+
# - name: Ensure MPI engine start up
119+
# Install a working MPI implementation beforehand so mpi4py can link to it.
120+
# TODO(https://github.com/modin-project/modin/issues/7421): Find a
121+
# way to make MPI installed via APT work. Then uncomment this section.
122+
# run: |
123+
# sudo apt install libmpich-dev
124+
# python -m pip install -e ".[mpi]"
125+
# MODIN_ENGINE=unidist UNIDIST_BACKEND=mpi mpiexec -n 1 python -c "import modin.pandas as pd; print(pd.DataFrame([1,2,3]))"
126+
# if: matrix.os == 'ubuntu'
125127

126128
test-internals:
127129
needs: [lint-flake8, python-filter]
@@ -174,6 +176,10 @@ jobs:
174176
run: |
175177
# TODO(https://github.com/modin-project/modin/issues/5194): Uncap xgboost
176178
# when we use collective instead of rabit.
179+
# Per the thread https://github.com/conda-forge/miniforge/issues/513,
180+
# remove unused conda packages and caches to avoid `Found incorrect
181+
# download: joblib` error from mamba.
182+
mamba clean --all
177183
mamba install "xgboost>=1.7.1,<2.0.0" scikit-learn -c conda-forge
178184
python -m pytest modin/tests/experimental/xgboost/test_default.py --execution=${{ matrix.execution }}
179185
- run: python -m pytest -n 2 modin/tests/core/storage_formats/base/test_internals.py --execution=${{ matrix.execution }}
@@ -202,7 +208,7 @@ jobs:
202208
with:
203209
auto-activate-base: true
204210
activate-environment: ""
205-
miniforge-variant: Mambaforge
211+
miniforge-variant: Miniforge3
206212
miniforge-version: latest
207213
use-mamba: true
208214
- name: Running benchmarks
@@ -493,11 +499,6 @@ jobs:
493499
- name: Stop local ray cluster
494500
run: ray stop
495501
if: matrix.os == 'windows' && matrix.engine == 'ray'
496-
- name: Rename the dirs with conda packages so it won't be deleted, it's too slow on Windows.
497-
run: |
498-
mkdir -p "${CONDA_PKGS_DIR}_do_not_cache" && \
499-
find "${CONDA_PKGS_DIR}" -mindepth 1 -maxdepth 1 -type d -exec mv {} "${CONDA_PKGS_DIR}_do_not_cache" \;
500-
if: matrix.os == 'windows'
501502

502503
test-sanity:
503504
needs: [lint-flake8, execution-filter, python-filter]
@@ -625,11 +626,6 @@ jobs:
625626
- name: Stop local ray cluster
626627
run: ray stop
627628
if: matrix.os == 'windows' && matrix.execution.name == 'ray'
628-
- name: Rename the dirs with conda packages so it won't be deleted, it's too slow on Windows.
629-
run: |
630-
mkdir -p "${CONDA_PKGS_DIR}_do_not_cache" && \
631-
find "${CONDA_PKGS_DIR}" -mindepth 1 -maxdepth 1 -type d -exec mv {} "${CONDA_PKGS_DIR}_do_not_cache" \;
632-
if: matrix.os == 'windows'
633629
- uses: ./.github/actions/upload-coverage
634630

635631
test-experimental:

modin/__init__.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# governing permissions and limitations under the License.
1313

1414
import warnings
15-
from typing import TYPE_CHECKING, Any, Optional, Tuple, Type, Union
16-
17-
if TYPE_CHECKING:
18-
from .config import Engine, StorageFormat
15+
from typing import Any, Optional, Tuple, Type, Union
1916

2017
from . import _version
2118

@@ -37,9 +34,7 @@ def custom_formatwarning(
3734
warnings.filterwarnings("ignore", message="Large object of size")
3835

3936

40-
def set_execution(
41-
engine: Any = None, storage_format: Any = None
42-
) -> Tuple["Engine", "StorageFormat"]:
37+
def set_execution(engine: Any = None, storage_format: Any = None) -> Tuple[Any, Any]:
4338
"""
4439
Method to set the _pair_ of execution engine and storage format format simultaneously.
4540
This is needed because there might be cases where switching one by one would be

0 commit comments

Comments
 (0)