Skip to content

Commit

Permalink
disabled lightfm tests for python >= 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
feldlime committed Nov 30, 2024
1 parent 8ee764f commit 5af9c65
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/models/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
import pytest
from implicit.als import AlternatingLeastSquares
from implicit.nearest_neighbours import ItemItemRecommender
from lightfm import LightFM

try:
from lightfm import LightFM
except ImportError:
LightFM = object # it's ok in case we're skipping the tests

import sys

from rectools.models import (
ImplicitALSWrapperModel,
Expand All @@ -17,7 +23,11 @@

from .utils import get_final_successors

MODEL_CLASSES = [cls for cls in get_final_successors(ModelBase) if cls.__module__.startswith("rectools.models")]
MODEL_CLASSES = [
cls
for cls in get_final_successors(ModelBase)
if cls.__module__.startswith("rectools.models") and not (sys.version_info >= (3, 12) and cls is LightFMWrapperModel)
]


def init_default_model(model_cls: tp.Type[ModelBase]) -> ModelBase:
Expand Down

0 comments on commit 5af9c65

Please sign in to comment.