Skip to content

Commit

Permalink
Catch import error separately for SUMModel
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Zhao <[email protected]>
  • Loading branch information
SimonYansenZhao committed Apr 4, 2024
1 parent 96fe3cf commit bd1a95f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/smoke/recommenders/recommender/test_deeprec_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from recommenders.models.deeprec.io.dkn_iterator import DKNTextIterator
from recommenders.models.deeprec.io.sequential_iterator import SequentialIterator
from recommenders.models.deeprec.models.sequential.sli_rec import SLI_RECModel
from recommenders.models.deeprec.models.sequential.sum import SUMModel
from recommenders.datasets.amazon_reviews import (
download_and_extract,
data_preprocessing,
Expand All @@ -31,6 +30,11 @@
except ImportError:
pass # disable error while collecting tests for non-gpu environments

try:
from recommenders.models.deeprec.models.sequential.sum import SUMModel
except ImportError:
pass # disable error while collecting tests for SUMModel


@pytest.mark.gpu
def test_FFM_iterator(deeprec_resource_path):
Expand Down

0 comments on commit bd1a95f

Please sign in to comment.