Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] python-package "regular" CI jobs failing to install dependencies #6282

Closed
jameslamb opened this issue Jan 22, 2024 · 5 comments · Fixed by #6283
Closed

[ci] python-package "regular" CI jobs failing to install dependencies #6282

jameslamb opened this issue Jan 22, 2024 · 5 comments · Fixed by #6283

Comments

@jameslamb
Copy link
Collaborator

Description

The TASK=regular jobs in this project's CI run the Python package's unit tests and test a few other things:

  • the example notebookes in the examples/ directory
  • that lightgbm can be imported after all of its dependencies have been removed

Those jobs are currently failing across all operating systems, with an error like this:

[NbConvertApp] Converting notebook interactive_plot_example.ipynb to notebook
[IPKernelApp] ERROR | KeyboardInterrupt caught in kernel.
[NbConvertApp] Writing 178679 bytes to interactive_plot_example.ipynb

PackagesNotFoundError: The following packages are missing from the target environment:
  - dask

Error: Process completed with exit code 255.

Reproducible example

Logs from latest commit on master:

  • Azure DevOps Linux_latest regular (link)
  • Azure DevOps macOS regular (link)
  • GitHub Actions regular (macOS-latest, Python 3.9) (link)

Environment info

LightGBM version or commit hash: 255c93b

Additional Comments

I don't see any of the dependencies like dask, dask-core, etc. getting installed in the logs.

It seems that this might be silently failing:

LightGBM/.ci/test.sh

Lines 128 to 135 in 255c93b

CONSTRAINED_DEPENDENCIES="'dask-core>=2023.5.0' 'distributed>=2023.5.0' 'pandas>=2.0'"
if [[ $PYTHON_VERSION == "3.7" ]]; then
CONSTRAINED_DEPENDENCIES="'dask-core' 'distributed' 'pandas<2.0'"
fi
# including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy
mamba create -q -y -n $CONDA_ENV \
${CONSTRAINED_DEPENDENCIES} \

@jmoralez
Copy link
Collaborator

I believe the command that's failing is the uninstall, maybe it's due to a difference between installing with mamba and trying to uninstall with conda.

mamba install -q -y -n $CONDA_ENV \

conda uninstall --force --yes \

I can submit a PR with that change if you think that may be it.

@jameslamb
Copy link
Collaborator Author

ooooo interesting. Yeah I'd welcome that PR, thank you!

@jmoralez
Copy link
Collaborator

jmoralez commented Jan 22, 2024

Oh sorry I hadn't seen #6283, do you want me to create a new one or push to that branch?

@jameslamb
Copy link
Collaborator Author

whatever's easier for you! No preference.

@jameslamb
Copy link
Collaborator Author

If that doesn't work, could you test another idea I just had?

Maybe the problem is that the package we install is named dask-core

CONSTRAINED_DEPENDENCIES="'dask-core>=2023.5.0' 'distributed>=2023.5.0' 'pandas>=2.0'"

but then we're asking conda uninstall to remove a package called dask.

LightGBM/.ci/test.sh

Lines 322 to 325 in 255c93b

conda uninstall --force --yes \
cffi \
dask \
distributed \

Maybe something has changed recently in conda, mamba, or the dask-core metapackage that breaks that.

Either way, I think we should probably be adding dask-core to that conda uninstall call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants