-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
False
-
-
False
-
-
Summary:
Test in TestTensorBoardWriter is failing during PyTorch unit test execution on CPU platform due to NumPy 2.0 compatibility issue.
Test Class: test/test_tensorboard.py::TestTensorBoardWriter
Number of Failing Tests: 1
Platform: CPU
Test Type: Unit Test
Version Information:
- PyTorch Commit: 6bdd8c9
- Branch: main
- Test Date: 2026-01-14
- Sprint: Sprint 24
Failure Pattern:
Single root cause - NumPy 2.0 API compatibility issue
Common Error:
AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead. To execute this test, run the following from the base repo dir: python test/test_tensorboard.py TestTensorBoardWriter.test_writer This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0. Did you mean: 'strings'?
Failing Tests:
1. test_writer
Steps to Reproduce:
1. Run test command:
TEST_CONFIG=cpu python3 test/run_test.py -i test_tensorboard TEST_CONFIG=cuda python3 test/run_test.py -i test_tensorboard
2. Observe AttributeError for np.string_ removal
Expected Result:
Test should pass
Actual Result:
Test fails with AttributeError due to NumPy 2.0 API change (np.string_ removed, should use np.bytes_)
Root Cause Analysis:
The test is using np.string_ which was removed in NumPy 2.0. The code needs to be updated to use np.bytes_ instead for NumPy 2.0 compatibility.
Potential Solutions:
1. Replace np.string_ with np.bytes_ in TensorBoard writer code
2. Add version check to use np.string_ for NumPy < 2.0 and np.bytes_ for NumPy >= 2.0
Additional Context:
- Note: sGPU ticket AIPCC-8269 exists for the same test class
- This is the CPU-specific failure
- Known NumPy 2.0 compatibility issue
Logs:
Test execution logs: /home/ktanmay/Downloads/Run 1-20260120T060019Z-1-001/Run 1/20260114_024940_commit_6bdd8c9/cpu_tests.log
Priority: P3
Labels: pytorch, unittest, cpu, tensorboard, numpy2