-
Notifications
You must be signed in to change notification settings - Fork 904
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
make prophet, lightgbm and catboost optional #1589
Conversation
Just wanted to comment to add my own user experience on a M1 Macbook (2020 macbook pro) if its all helpful to you: I have no issues installing prophet on my m1, even on arm64 architecture. I did however have issues with LightGBM installation through pip, but was easily fixed with an install through conda forge (all conda environments in this example, not virtualenv) I did have issues with installing prophet on windows x86_64 architecture, but solved by using WSL. |
Thanks for sharing. I'm now wondering if I did anything wrong when trying to install Prophet. I tried a couple of ways, including different versions of Python, installing pystan or cmdstan first etc. How are you installing it? For the record, here's what I get when I attempt
|
@hrzn Could we make lightgbm optional when installing darts pytorch? It is a pain to deal with on Macs 👎 Seems it always bundles together even if I don't use the lib. |
I've been struggling with this recently. But I think I've found a way to install both LightGBM and prophet without resorting to emulation. As @Eliotdoesprogramming suggested, install LightGBM with conda: conda install -c conda-forge 'lightgbm>=3.3.3' As for prophet, I installed CmdStan through conda, then installed the Python client and rebuilt it: conda install -c conda-forge cmdstan
pip install cmdstanpy
python -c "from cmdstanpy import rebuild_cmdstan; rebuild_cmdstan()"
export PROPHET_REPACKAGE_CMDSTAN=False Then I was able to just |
Hi @eshwen, Sorry for the delay and thank you for sharing your solution! Could you please check if your approach still works after the release of PyTorch 2.0? If, a PR adding these instructions to the documentation would be very welcome! |
No problem. I've briefly tested, and it does still work with PyTorch 2.0. In fact, it doesn't appear to need the |
Not sure if this is the correct forum, but I found a way to install prophet on MacOS 13.2.1 with M2 processor.
I do not know if prophet actually works properly as I am not interesting in using it. However, I am forced to install |
Hi, As a fellow M1 Mac user, I have found that most of the packages used in Darts fail with "used" or "old" environments (at least Conda environments). Therefore I'd suggest to create a new environment and install all the dependencies first before installing darts. It goes even smoother. As for the specific case of Prophet, I have raised a couple of issues in their repo because the cmdstan shouldn't try to build the wheel locally since the pip command should be retrieving the built wheel. You can see it here facebook/prophet#2402. They have found the issue on Windows but still missing the solution for macOS. On a second note, as for now, be sure to install prophet's version 1.1.1 since the newest one has an issue when trying to fit some data. Hence the suggestion to first install first Darts' external dependencies (i.e. PyTorch, Prophet, LightGBM, etc) and then Darts in whatever package you want. Best |
I will pick this up and additionally exclude lightgbm (there are issues for many users installing on M1) and catboost (catboost>=1.2.0 installation requires a lot of additional build tools (cmake, ninja, ...) which we should avoid forcing on the user) |
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #1589 +/- ##
==========================================
+ Coverage 93.72% 93.88% +0.16%
==========================================
Files 131 132 +1
Lines 12662 12639 -23
==========================================
- Hits 11867 11866 -1
+ Misses 795 773 -22
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the way the optional dependencies are handled, just spotted a small typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
With this, XGBoost becomes the most extensively tested model of the library if the optional dependencies are not installed...
INSTALL.md
Outdated
* Install darts with all available models (recommended): `conda install -c conda-forge -c pytorch u8darts-all`. | ||
* Install darts with all available models: `conda install -c conda-forge -c pytorch u8darts-all` | ||
* Install core only (without neural networks, Prophet, LightGBM and Catboost): `conda install -c conda-forge u8darts` | ||
* Install core + Prophet + LightGBM + CatBoost: `pip install "u8darts[notorch]"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be coherent with the others, should this flavor of the package be called udarts-notorch
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
INSTALL.md
Outdated
softwareupdate --install-rosetta | ||
``` | ||
|
||
Below are the necessary instructions to create and configure the environment: | ||
- Start by installing conda (e.g., with miniforge : `brew install miniforge`). | ||
- Install conda if you haven't done so (e.g., with miniforge : `brew install miniforge`). | ||
- Create the x_64 environment : `CONDA_SUBDIR=osx-64 conda create -n env_name python=3.9 pip` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update this to 3.10 to be coherent with the instruction above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Now that I have access to an M1 Mac, I was able to run more tests.
This is up for discussion, but I propose the following:
darts
package. That's because it's just too painful to install and I'm not even sure it can always be done on Apple silicon without using x64 emulation, which is not satisfying. Having it as a hard dependency is too much troubles for many users I suspect...prophet
has to be installed separately.Edit (@dennisbader, 2023-08-03):
Removed Prophet, LightGBM, and CatBoost dependencies from PyPI packages (
darts
,u8darts
,u8darts[torch]
), and conda-forge packages (u8darts
,u8darts-torch
) to avoid installation issues that some users were facing (installation on Apple M1/M2 devices, ...).u8darts[all]
and conda-forge packageu8darts-all
are now equivalent to the olddarts
package (all dependencies).u8darts[notorch]
, and conda-forge flavoru8darts-notorch
which are equivalent to the oldu8darts
installation.