From 57855295578cfbe43d0599a5ad17200ac9ccaf8f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 09:29:21 +0000
Subject: [PATCH 1/9] Initial plan
From b083930a0d14a3363b2d3467b0a1a10b6620ce2d Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 09:31:21 +0000
Subject: [PATCH 2/9] Remove visdom dependency and skip related tests
- Remove visdom from requirements-dev.txt
- Add skip decorator to all visdom tests
- Comment out visdom execution in GitHub Actions workflow
- Add warning in VisdomLogger docstring
- Update conftest.py to skip visdom server fixture
Co-authored-by: vfdev-5 <2459423+vfdev-5@users.noreply.github.com>
---
.github/workflows/unit-tests.yml | 11 ++---
ignite/handlers/visdom_logger.py | 5 +++
requirements-dev.txt | 2 +-
tests/ignite/handlers/conftest.py | 50 +++++++++++----------
tests/ignite/handlers/test_visdom_logger.py | 9 ++--
5 files changed, 45 insertions(+), 32 deletions(-)
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index 63eb19630de9..01315496e57e 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -128,11 +128,12 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
# 2) mnist_with_visdom.py
- python -c "from visdom.server.build import download_scripts; download_scripts()" # download scripts : https://github.com/facebookresearch/visdom/blob/master/py/server.py#L929
- python -m visdom.server &
- sleep 10
- python examples/mnist/mnist_with_visdom.py --epochs=1
- kill %1
+ # Commented out: visdom is unmaintained and cannot be installed with modern packages
+ # python -c "from visdom.server.build import download_scripts; download_scripts()" # download scripts : https://github.com/facebookresearch/visdom/blob/master/py/server.py#L929
+ # python -m visdom.server &
+ # sleep 10
+ # python examples/mnist/mnist_with_visdom.py --epochs=1
+ # kill %1
# 3.1) mnist_with_tensorboard.py with tbX
python examples/mnist/mnist_with_tensorboard.py --epochs=1
# 3.2) mnist_with_tensorboard.py with native torch tb
diff --git a/ignite/handlers/visdom_logger.py b/ignite/handlers/visdom_logger.py
index 8ca45d9dec5d..bf38892037d5 100644
--- a/ignite/handlers/visdom_logger.py
+++ b/ignite/handlers/visdom_logger.py
@@ -30,6 +30,11 @@ class VisdomLogger(BaseLogger):
"""
VisdomLogger handler to log metrics, model/optimizer parameters, gradients during the training and validation.
+ .. warning::
+
+ This logger is currently untested due to the visdom package being unmaintained and difficult to install
+ with modern Python packages. Use at your own risk.
+
This class requires `visdom `_ package to be installed:
.. code-block:: bash
diff --git a/requirements-dev.txt b/requirements-dev.txt
index ae66183dae01..44012685c4b9 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -17,7 +17,7 @@ tqdm
scikit-learn
matplotlib
tensorboardX
-visdom
+# visdom # Removed: unmaintained package, cannot be installed with modern packages
polyaxon
wandb
mlflow
diff --git a/tests/ignite/handlers/conftest.py b/tests/ignite/handlers/conftest.py
index 79ac0809698e..0f0a731451d9 100644
--- a/tests/ignite/handlers/conftest.py
+++ b/tests/ignite/handlers/conftest.py
@@ -5,34 +5,38 @@
import pytest
import torch
-from visdom import Visdom
-from visdom.server.build import download_scripts
+
+# Visdom imports skipped: package is unmaintained and cannot be installed with modern packages
+# from visdom import Visdom
+# from visdom.server.build import download_scripts
@pytest.fixture(scope="session")
def visdom_server():
# Start Visdom server once and stop it with visdom_server_stop
- vd_hostname = "localhost"
- if not (Path.home() / ".visdom").exists():
- (Path.home() / ".visdom").mkdir(exist_ok=True)
- download_scripts()
- vis = None
-
- vd_port = 29777
- vd_server_process = subprocess.Popen(
- ["python", "-m", "visdom.server", "--hostname", vd_hostname, "-port", str(vd_port)]
- )
- time.sleep(2)
- for ii in range(5):
- try:
- time.sleep(1)
- vis = Visdom(server=vd_hostname, port=vd_port, raise_exceptions=True)
- break
- except ConnectionError:
- continue
-
- assert vis and vis.check_connection()
- yield (vd_hostname, vd_port)
+ # Skipped: visdom is unmaintained and cannot be installed with modern packages
+ pytest.skip("Visdom is unmaintained and cannot be installed with modern packages")
+ # vd_hostname = "localhost"
+ # if not (Path.home() / ".visdom").exists():
+ # (Path.home() / ".visdom").mkdir(exist_ok=True)
+ # download_scripts()
+ # vis = None
+
+ # vd_port = 29777
+ # vd_server_process = subprocess.Popen(
+ # ["python", "-m", "visdom.server", "--hostname", vd_hostname, "-port", str(vd_port)]
+ # )
+ # time.sleep(2)
+ # for ii in range(5):
+ # try:
+ # time.sleep(1)
+ # vis = Visdom(server=vd_hostname, port=vd_port, raise_exceptions=True)
+ # break
+ # except ConnectionError:
+ # continue
+
+ # assert vis and vis.check_connection()
+ # yield (vd_hostname, vd_port)
# Trying to clean up slows things down and sometimes causes hangs.
# vis.close()
# vd_server_process.kill()
diff --git a/tests/ignite/handlers/test_visdom_logger.py b/tests/ignite/handlers/test_visdom_logger.py
index 826f63c95f3f..b7e07b74a8c7 100644
--- a/tests/ignite/handlers/test_visdom_logger.py
+++ b/tests/ignite/handlers/test_visdom_logger.py
@@ -16,9 +16,12 @@
WeightsScalarHandler,
)
-# Run tests on a single worker to avoid issues with connecting to the visdom
-# server This requires that the --dist=loadgroup option be passed to pytest.
-pytestmark = [pytest.mark.timeout(30), pytest.mark.xdist_group(name="visdom")]
+# Skip all tests in this module: visdom is unmaintained and cannot be installed with modern packages
+pytestmark = [
+ pytest.mark.skip(reason="Visdom is unmaintained and cannot be installed with modern packages"),
+ pytest.mark.timeout(30),
+ pytest.mark.xdist_group(name="visdom"),
+]
def test_optimizer_params_handler_wrong_setup():
From a62ba40a0a347af67c165f687b2b5915bd308193 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 09:32:53 +0000
Subject: [PATCH 3/9] Add warnings to setup_visdom_logging and skip related
tests
- Add warning to setup_visdom_logging function docstring
- Add skip decorator to test_setup_visdom_logging
Co-authored-by: vfdev-5 <2459423+vfdev-5@users.noreply.github.com>
---
ignite/contrib/engines/common.py | 5 +++++
tests/ignite/contrib/engines/test_common.py | 1 +
2 files changed, 6 insertions(+)
diff --git a/ignite/contrib/engines/common.py b/ignite/contrib/engines/common.py
index 68548f51826b..ed3ae5ff4eb2 100644
--- a/ignite/contrib/engines/common.py
+++ b/ignite/contrib/engines/common.py
@@ -384,6 +384,11 @@ def setup_visdom_logging(
- Learning rate(s)
- Evaluation metrics
+ .. warning::
+
+ This function uses VisdomLogger which is currently untested due to the visdom package being
+ unmaintained and difficult to install with modern Python packages. Use at your own risk.
+
Args:
trainer: trainer engine
optimizers: single or dictionary of
diff --git a/tests/ignite/contrib/engines/test_common.py b/tests/ignite/contrib/engines/test_common.py
index e14042e62c15..f4ce951b7743 100644
--- a/tests/ignite/contrib/engines/test_common.py
+++ b/tests/ignite/contrib/engines/test_common.py
@@ -505,6 +505,7 @@ def test_setup_tb_logging(dirname):
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Skip on Windows")
+@pytest.mark.skip(reason="Visdom is unmaintained and cannot be installed with modern packages")
def test_setup_visdom_logging(visdom_offline_logfile):
vis_logger = _test_setup_logging(
setup_logging_fn=setup_visdom_logging,
From 9b4ee79e4f53557248909a6a2127d17b35c65505 Mon Sep 17 00:00:00 2001
From: vfdev
Date: Mon, 9 Feb 2026 10:39:47 +0100
Subject: [PATCH 4/9] Update .github/workflows/unit-tests.yml
---
.github/workflows/unit-tests.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index 01315496e57e..82861e12f8ef 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -128,7 +128,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
# 2) mnist_with_visdom.py
- # Commented out: visdom is unmaintained and cannot be installed with modern packages
+ # Visdom is unmaintained and cannot be installed with modern packages
# python -c "from visdom.server.build import download_scripts; download_scripts()" # download scripts : https://github.com/facebookresearch/visdom/blob/master/py/server.py#L929
# python -m visdom.server &
# sleep 10
From 2b344c8451d6816fe2a6299456ba4abce0e8abdd Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 09:40:32 +0000
Subject: [PATCH 5/9] Address PR feedback: move imports into fixture and
simplify comment
- Move visdom imports into visdom_server fixture body
- Uncomment fixture code (will be skipped at runtime)
- Simplify workflow comment to be more concise
Co-authored-by: vfdev-5 <2459423+vfdev-5@users.noreply.github.com>
---
tests/ignite/handlers/conftest.py | 52 +++++++++++++++----------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/tests/ignite/handlers/conftest.py b/tests/ignite/handlers/conftest.py
index 0f0a731451d9..455390c95d94 100644
--- a/tests/ignite/handlers/conftest.py
+++ b/tests/ignite/handlers/conftest.py
@@ -6,37 +6,37 @@
import pytest
import torch
-# Visdom imports skipped: package is unmaintained and cannot be installed with modern packages
-# from visdom import Visdom
-# from visdom.server.build import download_scripts
-
@pytest.fixture(scope="session")
def visdom_server():
# Start Visdom server once and stop it with visdom_server_stop
- # Skipped: visdom is unmaintained and cannot be installed with modern packages
+ # Visdom is unmaintained and cannot be installed with modern packages
pytest.skip("Visdom is unmaintained and cannot be installed with modern packages")
- # vd_hostname = "localhost"
- # if not (Path.home() / ".visdom").exists():
- # (Path.home() / ".visdom").mkdir(exist_ok=True)
- # download_scripts()
- # vis = None
-
- # vd_port = 29777
- # vd_server_process = subprocess.Popen(
- # ["python", "-m", "visdom.server", "--hostname", vd_hostname, "-port", str(vd_port)]
- # )
- # time.sleep(2)
- # for ii in range(5):
- # try:
- # time.sleep(1)
- # vis = Visdom(server=vd_hostname, port=vd_port, raise_exceptions=True)
- # break
- # except ConnectionError:
- # continue
-
- # assert vis and vis.check_connection()
- # yield (vd_hostname, vd_port)
+
+ from visdom import Visdom
+ from visdom.server.build import download_scripts
+
+ vd_hostname = "localhost"
+ if not (Path.home() / ".visdom").exists():
+ (Path.home() / ".visdom").mkdir(exist_ok=True)
+ download_scripts()
+ vis = None
+
+ vd_port = 29777
+ vd_server_process = subprocess.Popen(
+ ["python", "-m", "visdom.server", "--hostname", vd_hostname, "-port", str(vd_port)]
+ )
+ time.sleep(2)
+ for ii in range(5):
+ try:
+ time.sleep(1)
+ vis = Visdom(server=vd_hostname, port=vd_port, raise_exceptions=True)
+ break
+ except ConnectionError:
+ continue
+
+ assert vis and vis.check_connection()
+ yield (vd_hostname, vd_port)
# Trying to clean up slows things down and sometimes causes hangs.
# vis.close()
# vd_server_process.kill()
From cbe606ff7e0b709db18fe448e91d6104dac6c54d Mon Sep 17 00:00:00 2001
From: vfdev
Date: Mon, 9 Feb 2026 10:41:57 +0100
Subject: [PATCH 6/9] Apply suggestion from @vfdev-5
---
tests/ignite/handlers/conftest.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/ignite/handlers/conftest.py b/tests/ignite/handlers/conftest.py
index 455390c95d94..896b02d14f18 100644
--- a/tests/ignite/handlers/conftest.py
+++ b/tests/ignite/handlers/conftest.py
@@ -10,8 +10,6 @@
@pytest.fixture(scope="session")
def visdom_server():
# Start Visdom server once and stop it with visdom_server_stop
- # Visdom is unmaintained and cannot be installed with modern packages
- pytest.skip("Visdom is unmaintained and cannot be installed with modern packages")
from visdom import Visdom
from visdom.server.build import download_scripts
From 2b0d2cb571aeece53c45d696d7a59713dd0f82d9 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 09:47:04 +0000
Subject: [PATCH 7/9] Add pyrefly ignore for visdom import
Since visdom is removed from requirements-dev.txt, pyrefly complains
about the import. Add ignore comment to suppress the type checking error.
Co-authored-by: vfdev-5 <2459423+vfdev-5@users.noreply.github.com>
---
ignite/handlers/visdom_logger.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ignite/handlers/visdom_logger.py b/ignite/handlers/visdom_logger.py
index bf38892037d5..642e8fd0e7a5 100644
--- a/ignite/handlers/visdom_logger.py
+++ b/ignite/handlers/visdom_logger.py
@@ -161,7 +161,7 @@ def __init__(
**kwargs: Any,
):
try:
- import visdom
+ import visdom # pyrefly: ignore
except ImportError:
raise ModuleNotFoundError(
"This contrib module requires visdom package. "
From 80116dc6f965d521e81282079c39588103c2a8e2 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 09:54:40 +0000
Subject: [PATCH 8/9] Initial plan for fixing code style error
Co-authored-by: vfdev-5 <2459423+vfdev-5@users.noreply.github.com>
---
tests/ignite/handlers/conftest.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/ignite/handlers/conftest.py b/tests/ignite/handlers/conftest.py
index 896b02d14f18..3a65b7ac68bf 100644
--- a/tests/ignite/handlers/conftest.py
+++ b/tests/ignite/handlers/conftest.py
@@ -10,10 +10,10 @@
@pytest.fixture(scope="session")
def visdom_server():
# Start Visdom server once and stop it with visdom_server_stop
-
+
from visdom import Visdom
from visdom.server.build import download_scripts
-
+
vd_hostname = "localhost"
if not (Path.home() / ".visdom").exists():
(Path.home() / ".visdom").mkdir(exist_ok=True)
From e6607c038640140597a09b67f99470820f33d72e Mon Sep 17 00:00:00 2001
From: vfdev
Date: Mon, 9 Feb 2026 11:13:21 +0100
Subject: [PATCH 9/9] Update requirements-dev.txt with TODO for py-rouge
Added TODO comment regarding py-rouge package and its dependency management.
---
requirements-dev.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 44012685c4b9..8b6189efefcd 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -27,6 +27,8 @@ torchvision
pynvml<12 # pynvml module was removed in 12.X, is not developed or maintained. We should replace pynvml with something else.
clearml
scikit-image
+# TODO: py-rouge is very old package and its code should vendored into our rouge tests and finally remove py-rouge dependency
+setuptools<82
py-rouge
pycocotools
# temporary fix for python=3.12 and v3.8.1