Skip to content

test_tensorboard.py test_figure and test_figure_list no longer work with matplotlib 3.3.0 #41680

@ezyang

Description

@ezyang

🐛 Bug

Discovered in #38796

When you run these tests with matplotlib 3.3.0 they no longer work

Jul 20 08:04:54 ======================================================================
Jul 20 08:04:54 FAIL [0.177s]: test_figure (__main__.TestTensorBoardFigure)
Jul 20 08:04:54 ----------------------------------------------------------------------
Jul 20 08:04:54 Traceback (most recent call last):
Jul 20 08:04:54   File "test_tensorboard.py", line 642, in test_figure
Jul 20 08:04:54     self.assertFalse(plt.fignum_exists(figure.number))
Jul 20 08:04:54 AssertionError: True is not false
Jul 20 08:04:54 
Jul 20 08:04:54 ======================================================================
Jul 20 08:04:54 FAIL [1.110s]: test_figure_list (__main__.TestTensorBoardFigure)
Jul 20 08:04:54 ----------------------------------------------------------------------
Jul 20 08:04:54 Traceback (most recent call last):
Jul 20 08:04:54   File "test_tensorboard.py", line 664, in test_figure_list
Jul 20 08:04:54     self.assertTrue(all([plt.fignum_exists(figure.number) is False for figure in figures]))  # noqa F812
Jul 20 08:04:54 AssertionError: False is not true
Jul 20 08:04:54 
Jul 20 08:04:54 ----------------------------------------------------------------------
Jul 20 08:04:54 Ran 50 tests in 41.752s

I don't know enough about the APIs in question to say if this is an upstream bug or not.

To Reproduce

Steps to reproduce the behavior:

  1. Install matplotlib 3.3.0
  2. Build PyTorch
  3. Run the tensorboard tests

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions