Skip to content

Fix CI warnings  #2649

@vfdev-5

Description

@vfdev-5

tests/ignite/handlers/test_state_param_scheduler.py: 15 warnings
  /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/torch/testing/_deprecated.py:35: FutureWarning: torch.testing.assert_allclose() is deprecated since 1.12 and will be removed in 1.14. Use torch.testing.assert_close() instead. For detailed upgrade instructions see https://github.com/pytorch/pytorch/issues/61844.
    warnings.warn(msg, FutureWarning)

tests/ignite/metrics/test_classification_report.py: 48 warnings
  /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/sklearn/metrics/_classification.py:1318: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in samples with no predicted labels. Use `zero_division` parameter to control this behavior.
    _warn_prf(average, modifier, msg_start, len(result))

tests/ignite/metrics/test_classification_report.py: 48 warnings
  /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/sklearn/metrics/_classification.py:1318: UndefinedMetricWarning: Recall and F-score are ill-defined and being set to 0.0 in samples with no true labels. Use `zero_division` parameter to control this behavior.
    _warn_prf(average, modifier, msg_start, len(result))

tests/ignite/metrics/test_precision.py: 40 warnings
tests/ignite/metrics/test_recall.py: 40 warnings
  /home/runner/work/ignite/ignite/ignite/metrics/precision.py:55: RuntimeWarning: `y` and `y_pred` should be of dtype long when entry type is binary and average!=False
    "`y` and `y_pred` should be of dtype long when entry type is binary and average!=False", RuntimeWarning

tests/ignite/metrics/test_precision.py: 30 warnings
  /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/sklearn/metrics/_classification.py:1318: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.
    _warn_prf(average, modifier, msg_start, len(result))

tests/ignite/metrics/test_precision.py: 10 warnings
  /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/sklearn/metrics/_classification.py:1318: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 due to no predicted samples. Use `zero_division` parameter to control this behavior.
    _warn_prf(average, modifier, msg_start, len(result))

tests/ignite/metrics/gan/test_inception_score.py::test_inception_score
tests/ignite/metrics/gan/test_utils.py::test_inception_extractor_wrong_inputs
tests/ignite/metrics/gan/test_utils.py::test_inception_model_probability
  /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
    f"The parameter '{pretrained_param}' is deprecated since 0.13 and will be removed in 0.15, "

tests/ignite/metrics/gan/test_inception_score.py::test_inception_score
tests/ignite/metrics/gan/test_utils.py::test_inception_extractor_wrong_inputs
tests/ignite/metrics/gan/test_utils.py::test_inception_model_probability
  /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=Inception_V3_Weights.IMAGENET1K_V1`. You can also use `weights=Inception_V3_Weights.DEFAULT` to get the most up-to-date weights.
    warnings.warn(msg)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions