recommenders-team / recommenders

Best Practices on Recommendation Systems
https://recommenders-team.github.io/recommenders/intro.html
MIT License
19.35k stars 3.12k forks source link

[BUG] Warnings from pytest #2136

Closed SimonYansenZhao closed 2 weeks ago

SimonYansenZhao commented 4 months ago

Description

I saw lots of warnings from the result of pytest. Those warnings were not taken into considration because they are suppressed in the CICD testing workflow. Many warnings have something to do with deprecation usage in the code, such as https://github.com/recommenders-team/recommenders/actions/runs/10173799542/job/28139367400?pr=2134#step:3:1207

  ../../../../../../../azureml-envs/azureml_f165202b520dc80b574d66d71099a169/lib/python3.8/site-packages/pyspark/sql/pandas/utils.py:37: 2 warnings
  tests/unit/recommenders/datasets/test_spark_splitter.py: 8 warnings
  tests/unit/recommenders/evaluation/test_spark_evaluation.py: 160 warnings
    /azureml-envs/azureml_f165202b520dc80b574d66d71099a169/lib/python3.8/site-packages/pyspark/sql/pandas/utils.py:37: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      if LooseVersion(pandas.__version__) < LooseVersion(minimum_pandas_version):

In which platform does it happen?

The warnings are from the CICD testing workflow.

How do we replicate the issue?

The warnings were disabled in the testing workflow.

Expected behavior (i.e. solution)

Resolve the warnings as soon as possible.

Willingness to contribute

miguelgfierro commented 2 weeks ago

I think this was fixed right @SimonYansenZhao?

The --disable-warnings should be in this line https://github.com/recommenders-team/recommenders/blob/main/tests/ci/azureml_tests/run_groupwise_pytest.py#L54 and it is not there.

Feel free to reopen if it is not the case.