Refactor & Cleanup setup.py / setup.cfg#632
Conversation
e2af42f to
cf8e3be
Compare
Update miniconda versions Re-Add name Try to fix builds For debugging ... Fix path Reset changes
|
Mh, currently it is hard for me to fix our builds and tests b/c they are spread over appveyor, travis, circleci . Some of these services don't provide very good convenience images (appveyor) and it is hard to find good examples of how to use this properly. I think this would be solved by moving to github actions. Additionally, we could automate the build process for the docs. Initial experiments with GH Actions here: #636 |
|
The tests for windows are failing but I don't know why (https://github.com/SimonCW/lightfm/runs/5440138903?check_suite_focus=true). I might try to debug with my other Windows Laptop later this week. I also quickly checked https://github.com/pypa/cibuildwheel/, which looks promising for creating windows and macOS wheels. |
|
The build wheel action is running successfully but the created wheel doesn't work for me. Installing the wheel from the artifacts here: https://github.com/SimonCW/lightfm/actions/runs/1983477030 and running python -c "from lightfm import LightFM
from lightfm.datasets import fetch_movielens
from lightfm.evaluation import precision_at_k
# Load the MovieLens 100k dataset. Only five
# star ratings are treated as positive.
data = fetch_movielens(min_rating=5.0)
# Instantiate and train the model
model = LightFM(loss='warp')
model.fit(data['train'], epochs=30, num_threads=2)
# Evaluate the trained model
test_precision = precision_at_k(model, data['test'], k=5).mean(); print(test_precision)"Gives this error: /Users/simon.weiss/Repos/contrib/lightfm/lightfm/_lightfm_fast.py:9: UserWarning: LightFM was compiled without OpenMP support. Only a single thread will be used.
warnings.warn(
Traceback (most recent call last):
File "/Users/simon.weiss/Repos/contrib/lightfm/lightfm/__init__.py", line 2, in <module>
__LIGHTFM_SETUP__
NameError: name '__LIGHTFM_SETUP__' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/simon.weiss/Repos/contrib/lightfm/lightfm/_lightfm_fast.py", line 3, in <module>
from ._lightfm_fast_openmp import * # NOQA
ModuleNotFoundError: No module named 'lightfm._lightfm_fast_openmp'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/simon.weiss/Repos/contrib/lightfm/lightfm/__init__.py", line 4, in <module>
from .lightfm import LightFM
File "/Users/simon.weiss/Repos/contrib/lightfm/lightfm/lightfm.py", line 8, in <module>
from ._lightfm_fast import (
File "/Users/simon.weiss/Repos/contrib/lightfm/lightfm/_lightfm_fast.py", line 14, in <module>
from ._lightfm_fast_no_openmp import * # NOQA
ImportError: dlopen(/Users/simon.weiss/Repos/contrib/lightfm/lightfm/_lightfm_fast_no_openmp.cpython-38-darwin.so, 0x0002): tried: '/Users/simon.weiss/Repos/contrib/lightfm/lightfm/_lightfm_fast_no_openmp.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))The cython parts still seem to be compiled to @maciejkula, do you have an M1 and could try to run this? |
|
@SimonCW, any progress on this? We are looking for a solution to install LightFM on Python |
|
@SimonCW do you need any help? |
|
Hey @dbalabka, unfortunately, my current private and work situation doesn't leave any time for LightFM. You are very welcome to take over. Edit: I'd be happy to give you context and/or test (I am on a M1 pro). |
Hi @maciejkula,
I changed a few things about the setup here:
description_file.cythonized with the new settings and a new cython version (I think that was also holding us back in building for python3.10 on conda Rebuild for python310 conda-forge/lightfm-feedstock#16)