From 982118488d2d630f4216cf99c99f09db34d83238 Mon Sep 17 00:00:00 2001 From: vfdev Date: Mon, 5 Feb 2024 15:38:02 +0100 Subject: [PATCH 1/2] Fixed failing test on engine that does not warn (#3196) --- tests/ignite/engine/test_engine.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/ignite/engine/test_engine.py b/tests/ignite/engine/test_engine.py index ae848138afb..3cbd447bb6d 100644 --- a/tests/ignite/engine/test_engine.py +++ b/tests/ignite/engine/test_engine.py @@ -639,7 +639,7 @@ def limited_data_iterator(): self._test_check_triggered_events(limited_data_iterator(), max_epochs=1, epoch_length=100, exp_iter_stops=0) self._test_check_triggered_events(limited_data_iterator(), max_epochs=10, epoch_length=10, exp_iter_stops=0) - # These tests will fail + # These tests should fail with pytest.raises(AssertionError): with pytest.warns(UserWarning, match=r"Data iterator can not provide data anymore"): self._test_check_triggered_events(limited_data_iterator(), max_epochs=3, epoch_length=100) @@ -649,8 +649,10 @@ def limited_data_iterator(): self._test_check_triggered_events(limited_data_iterator(), max_epochs=3, epoch_length=75) with pytest.raises(AssertionError): - with pytest.warns(UserWarning, match=r"Data iterator can not provide data anymore"): - self._test_check_triggered_events(limited_data_iterator(), max_epochs=1, epoch_length=101) + # Below test does not raise "Data iterator can not provide data anymore" warning as the last + # epoch is equal max_epochs + # with pytest.warns(UserWarning, match=r"Data iterator can not provide data anymore"): + self._test_check_triggered_events(limited_data_iterator(), max_epochs=1, epoch_length=101) def test_run_check_triggered_events_on_iterator(self): self._test_run_check_triggered_events_on_iterator() From 77906dac55020ab9c49d1ed8d5c03257068b961b Mon Sep 17 00:00:00 2001 From: vfdev Date: Mon, 5 Feb 2024 16:06:17 +0100 Subject: [PATCH 2/2] Fixed failing docs linkcheck (#3194) * Fixed docs linkcheck * Updated actions/labeler version * temporary enable labeler on PR * Revert last commit --- .github/workflows/triage.yml | 2 +- ignite/distributed/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 86e70b75c7c..e27afe0f611 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Pull Request Labeler # if: github.event_name == 'pull_request_target' - uses: actions/labeler@v3 + uses: actions/labeler@v5 with: configuration-path: .github/pr-labeler-config.yml repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/ignite/distributed/utils.py b/ignite/distributed/utils.py index 0249a5150d3..000b5c9a685 100644 --- a/ignite/distributed/utils.py +++ b/ignite/distributed/utils.py @@ -304,7 +304,7 @@ def train_fn(local_rank, a, b, c, d=12): idist.spawn("xla-tpu", train_fn, args=(a, b, c), kwargs_dict={"d": 23}, nproc_per_node=8) .. _dist.init_process_group: https://pytorch.org/docs/stable/distributed.html#torch.distributed.init_process_group - .. _mp.start_processes: https://pytorch.org/docs/stable/multiprocessing.html#torch.multiprocessing.spawn + .. _mp.start_processes: https://pytorch.org/docs/stable/multiprocessing.html#torch.multiprocessing.spawn.spawn .. _xmp.spawn: https://pytorch.org/xla/release/1.6/index.html#torch_xla.distributed.xla_multiprocessing.spawn .. _hvd_run: https://horovod.readthedocs.io/en/latest/api.html#module-horovod.run