-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[FEATURE] On pymanopt #2138
Comments
- Had to do it for python 3.12 and 3.8 compat Signed-off-by: David Davó <[email protected]>
I needed two different versions to work with python<=3.8 and python>=3.12, so I went with the requierements.txt approach. |
Pymanopt is right now in the experimental Line 75 in 4f86e47
Can you share the error? Maybe the problem is that the tests are executed but it should be commented? |
I know, but the version in extras_require did not work. That's why a certain commit needs to be installed. Lines 86 to 88 in 4f86e47
It also says so on the README too. On python312 I created the requirements-external.txt file to simplify instructions. We could even add my lightfm fork to this file too. recommenders/requirements-external.txt Lines 1 to 5 in 8515dbf
The tests always install pymanopt, even if its not needed. If they try to install a version that is not compatible with other deps, it will fail before even starting. recommenders/tests/ci/azureml_tests/aml_utils.py Lines 90 to 96 in 4f86e47
Note: In the python3.12 branch, the tests use |
This shouldn't happen. That line should be removed. @daviddavo This is yet another reminder that adding dependencies can cause us a lot of headaches in the future. I think I'm going to self proclaim as the Chief Dependency Remover lol |
Then, should the tests that use pymanopt be moved to the experimental test groups and that line removed? Should I do it in another branch? Or just on the python312 branch? I would keep the requirements-experimental.txt file or something similar (perhaps in another folder or along the notebook), and add lightfm there too. It "centralizes" the version requirements and makes them easier to install, instead of saying "if you have this version use this command, or if you have this version use this other command, if you have...", which could cause errors with inexperienced users. |
Yes, the tests should be moved. I think it would be better to do this on a different branch. Once it's reviewed, it can be merged to the python312. About the requirements file, what I would suggest is to either have the deps in the setup file together with the experimental deps, or to have two different files, one for the standard requirements and another for the experimental. Having only one can cause confusion to users because they may think the experimental file is the standard requirements file. I think the reason we haven't used the requirements.txt is because it was easier to operate with the azureml tests |
Signed-off-by: David Davó <[email protected]>
The problem is that you can't use packages from outside pypi in the setup.py. It will work on local but it doesn't allow you to upload it. There's no reason to name it just I would use the setup.py for everything except experimental, and a file called |
Moved pymanopt tests to experimental test group #2138
With #2139 merged, what about the |
It would be good to have a point of view not only on this scenario, but in all other scenarios. Let me put the options on the table to discuss (others feel free to add more). I think the options would be:
@daviddavo @SimonYansenZhao @anargyri if we wanted to make a decision on what option to follow, not only on this specific usecase, but also in any generic case. What would be your point of view? |
About modifying setup.py, it works if someone where to install via
About pymanopt, there are newer versions that work, but they have not been uploaded to pypi. Latest version is from 10 months ago, and does not include Python 3.12. If they were to release the current version, it would not work with 3.8. Furthermore, we also have to take into account lightfm, which has not been updated to support Cython 3, but could be installed from a forked version. lyst/lightfm#709 Therefore, LightFM should become one of these git dependecies. |
Btw see this issue #1597 as to why we removed pymanopt. |
Description
The pymanopt dependency must currently be installed with an external command, making the setup more difficult. Setup should be transparent to the user and just
pip install recommenders
.Although the dependency can be included in install_requires, it won't let you upload the recommenders package to pypi.
Nevertheless, pymanopt team doesn't update the pypi package anymore.
Expected behavior with the suggested feature
pip install recommenders
just worksWillingness to contribute
Possible solutions
tldr:
Forking
Making a fork or mirror in recommenders-team and then re-releasing it to pypi under a different name like recommenders-pymanopt
Vendoring
Including the code or the project as a git submodule, and then installing "from file".
Creating a requirements.txt-like file
Creating an external-dependencies.txt file, and then instructing people (and the CI flow) to use
pip install -r external-dependencies.txt
The text was updated successfully, but these errors were encountered: