Skip to content

Commit

Permalink
Merge pull request #2019 from recommenders-team/staging
Browse files Browse the repository at this point in the history
Staging to main: security fix due to Tensorflow
  • Loading branch information
miguelgfierro authored Oct 13, 2023
2 parents 305f6b6 + 2c6b258 commit b000b78
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@
extras_require = {
"gpu": [
"nvidia-ml-py3>=7.352.0",
# TensorFlow compiled with CUDA 11.2, CuDNN 8.1
"tensorflow~=2.6.1;python_version=='3.6'",
"tensorflow~=2.7.0;python_version>='3.7'",
"tensorflow==2.8.4", # FIXME: Temporarily pinned due to issue with TF version > 2.10.1 See #2018
"tf-slim>=1.1.0",
"torch>=1.13.1", # for CUDA 11 support
"fastai>=1.0.46,<2",
Expand Down
20 changes: 10 additions & 10 deletions tests/ci/azureml_tests/test_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,23 @@
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_FFM_iterator", # 0.74s
"tests/smoke/recommenders/recommender/test_newsrec_utils.py::test_news_iterator", # 3.04s
#
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_model_lightgcn", # 6.03s
"tests/functional/examples/test_notebooks_gpu.py::test_lightgcn_deep_dive_functional", # 19.45s
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_model_lightgcn", # 6.03s # FIXME: Issue with TF version > 2.10.1 See #2018
"tests/functional/examples/test_notebooks_gpu.py::test_lightgcn_deep_dive_functional", # 19.45s # FIXME: Issue with TF version > 2.10.1 See #2018
#
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_model_sum", # 27.23s
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_model_sum", # 27.23s # FIXME: Issue with TF version > 2.10.1 See #2018
#
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_model_dkn", # 187.20s
"tests/functional/examples/test_notebooks_gpu.py::test_dkn_quickstart_functional", # 1167.93s
#
"tests/functional/examples/test_notebooks_gpu.py::test_slirec_quickstart_functional", # 175.00s
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_model_slirec", # 346.72s
"tests/functional/examples/test_notebooks_gpu.py::test_slirec_quickstart_functional", # 175.00s # FIXME: Issue with TF version > 2.10.1 See #2018
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_model_slirec", # 346.72s # FIXME: Issue with TF version > 2.10.1 See #2018
],
"group_gpu_002": [ # Total group time: 1896.76s
"tests/unit/examples/test_notebooks_gpu.py::test_gpu_vm", # 0.76s (Always the first test to check the GPU works)
"tests/smoke/recommenders/recommender/test_deeprec_model.py::test_model_xdeepfm", # 3.10s
# FIXME: https://github.com/microsoft/recommenders/issues/1883
# "tests/smoke/examples/test_notebooks_gpu.py::test_xdeepfm_smoke", # 77.93s
"tests/functional/examples/test_notebooks_gpu.py::test_xdeepfm_functional", # 470.11s
"tests/functional/examples/test_notebooks_gpu.py::test_xdeepfm_functional", # FIXME: Issue with TF version > 2.10.1 See #2018
#
"tests/smoke/examples/test_notebooks_gpu.py::test_cornac_bivae_smoke", # 67.84s
"tests/functional/examples/test_notebooks_gpu.py::test_cornac_bivae_functional", # 453.21s
Expand Down Expand Up @@ -420,12 +420,12 @@
],
"group_gpu_002": [ # Total group time:
"tests/unit/examples/test_notebooks_gpu.py::test_gpu_vm", # 0.76s (Always the first test to check the GPU works)
"tests/unit/recommenders/models/test_deeprec_model.py::test_xdeepfm_component_definition",
"tests/unit/recommenders/models/test_deeprec_model.py::test_xdeepfm_component_definition", # FIXME: Issue with TF version > 2.10.1 See #2018
"tests/unit/recommenders/models/test_deeprec_model.py::test_dkn_component_definition",
"tests/unit/recommenders/models/test_deeprec_model.py::test_dkn_item2item_component_definition",
"tests/unit/recommenders/models/test_deeprec_model.py::test_slirec_component_definition",
"tests/unit/recommenders/models/test_deeprec_model.py::test_slirec_component_definition", # FIXME: Issue with TF version > 2.10.1 See #2018
"tests/unit/recommenders/models/test_deeprec_model.py::test_nextitnet_component_definition",
"tests/unit/recommenders/models/test_deeprec_model.py::test_sum_component_definition",
"tests/unit/recommenders/models/test_deeprec_model.py::test_sum_component_definition", # FIXME: Issue with TF version > 2.10.1 See #2018
"tests/unit/recommenders/models/test_deeprec_model.py::test_lightgcn_component_definition",
"tests/unit/recommenders/models/test_deeprec_utils.py::test_prepare_hparams",
"tests/unit/recommenders/models/test_deeprec_utils.py::test_load_yaml_file",
Expand All @@ -443,7 +443,7 @@
"group_notebooks_gpu_002": [ # Total group time: 241.15s
"tests/unit/examples/test_notebooks_gpu.py::test_gpu_vm", # 0.76s (Always the first test to check the GPU works)
"tests/unit/examples/test_notebooks_gpu.py::test_wide_deep",
"tests/unit/examples/test_notebooks_gpu.py::test_xdeepfm",
"tests/unit/examples/test_notebooks_gpu.py::test_xdeepfm", # FIXME: Issue with TF version > 2.10.1 See #2018
"tests/unit/examples/test_notebooks_gpu.py::test_gpu_vm",
],
}
3 changes: 2 additions & 1 deletion tests/security/test_dependency_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def test_pandas():
def test_tensorflow():
# Security issue: https://github.com/advisories/GHSA-w5gh-2wr2-pm6g
# Security issue: https://github.com/advisories/GHSA-r6jx-9g48-2r5r
assert tf.__version__ >= "2.5.1"
# Security issue: https://github.com/advisories/GHSA-xxcj-rhqg-m46g
assert tf.__version__ >= "2.8.4"


@pytest.mark.gpu
Expand Down
6 changes: 4 additions & 2 deletions tests/smoke/recommenders/recommender/test_deeprec_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import os
import pytest

from recommenders.datasets import movielens
from recommenders.datasets.python_splitters import python_stratified_split

try:
import tensorflow as tf
from recommenders.models.deeprec.deeprec_utils import (
Expand All @@ -24,8 +27,7 @@
)
from recommenders.models.deeprec.models.graphrec.lightgcn import LightGCN
from recommenders.models.deeprec.DataModel.ImplicitCF import ImplicitCF
from recommenders.datasets import movielens
from recommenders.datasets.python_splitters import python_stratified_split

except ImportError:
pass # disable error while collecting tests for non-gpu environments

Expand Down

0 comments on commit b000b78

Please sign in to comment.