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

LightFM Python 3.12+ support #224

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

chezou
Copy link
Contributor

@chezou chezou commented Dec 7, 2024

Description

This PR is to support LightFM for Python 3.12+

Bonus

I locally confirmed it works with Python 3.13 with 380b975

➜  RecTools git:(feature/lightfm-py312) ✗ poetry run python --version
Python 3.13.1
➜  RecTools git:(feature/lightfm-py312) ✗ poetry run pytest tests/models/test_lightfm.py
================================================= test session starts ==================================================
platform linux -- Python 3.13.1, pytest-8.1.1, pluggy-1.5.0
rootdir: /home/aki/src/RecTools
configfile: setup.cfg
plugins: cov-5.0.0, subtests-0.12.1, typeguard-4.4.1, mock-3.14.0
collected 26 items

tests/models/test_lightfm.py ..........................                                                          [100%]

================================================== 26 passed in 0.73s ==================================================

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Optimization

How Has This Been Tested?

Before submitting a PR, please check yourself against the following list. It would save us quite a lot of time.

  • Have you read the contribution guide?
  • Have you updated the relevant docstrings? We're using Numpy format, please double-check yourself
  • Does your change require any new tests?
  • Have you updated the changelog file?

Copy link

codecov bot commented Dec 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (9b3992e) to head (a9e585b).
Report is 83 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main      #224     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           45        59     +14     
  Lines         2242      3872   +1630     
===========================================
+ Hits          2242      3872   +1630     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chezou
Copy link
Contributor Author

chezou commented Dec 7, 2024

Confirmed the CI passed with Python 3.12 with LightFM https://github.com/MobileTeleSystems/RecTools/actions/runs/12209831381/job/34065165444?pr=224

@chezou
Copy link
Contributor Author

chezou commented Dec 7, 2024

@feldlime JFYI, here is the proof of concept for feldlime/rectools-lightfm#4

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@chezou chezou force-pushed the feature/lightfm-py312 branch 2 times, most recently from 3015119 to e8ffa62 Compare December 8, 2024 00:55
@chezou chezou changed the title [Do not merge] LightFM Python 3.12 support LightFM Python 3.12 support Dec 8, 2024
@chezou chezou changed the title LightFM Python 3.12 support LightFM Python 3.12+ support Dec 8, 2024
@chezou
Copy link
Contributor Author

chezou commented Dec 8, 2024

Since implicit doesn't provide wheels on PyPI for Python 3.12+, CI takes longer than other versions. https://github.com/MobileTeleSystems/RecTools/actions/runs/12225017897/job/34098490713?pr=224

We may want to host some wheels for implicit, like nmslib-metabrainz.

@chezou chezou marked this pull request as ready for review December 8, 2024 20:46
@chezou chezou force-pushed the feature/lightfm-py312 branch 3 times, most recently from ffb0fc3 to d976b71 Compare December 9, 2024 18:10
@chezou chezou force-pushed the feature/lightfm-py312 branch from d976b71 to 844834e Compare December 9, 2024 18:11
@chezou
Copy link
Contributor Author

chezou commented Dec 9, 2024

@feldlime Now I use rectools-lightfm 1.17.3, and ready for review. Please have a look when you have a chance.

@chezou chezou force-pushed the feature/lightfm-py312 branch from 1b39e05 to 1bb6030 Compare December 10, 2024 00:28
@chezou chezou force-pushed the feature/lightfm-py312 branch from 1bb6030 to a9e585b Compare December 10, 2024 00:39
@feldlime
Copy link
Collaborator

Thanks @chezou, merging it

@feldlime feldlime merged commit de8c44a into MobileTeleSystems:main Dec 10, 2024
8 checks passed
@chezou chezou deleted the feature/lightfm-py312 branch December 10, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants