pytorch - 💡(How to fix) Fix DISABLED test_name_conflicts (__main__.TestNamedTuple) [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#179778Fetched 2026-04-09 07:50:03
View on GitHub
Comments
1
Participants
1
Timeline
37
Reactions
0
Participants
Timeline (top)
mentioned ×16subscribed ×16labeled ×4commented ×1

Error Message

torch._dynamo.exc.ObservedAssertionErrorError: raised exception AssertionError('False is not true')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/opt/conda/envs/py_3.13/lib/python3.13/site-packages/torch/_dynamo/eval_frame.py", line 1055, in compile_wrapper raise e.with_traceback(None) from e.cause # User compiler error ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ torch._dynamo.exc.Unsupported: Observed exception Explanation: Dynamo found no exception handler at the top-level compiled function when encountering an exception. Exception will propagate outside the compiled region. Hint: Your code may result in an error when running in eager. Please double check that your code doesn't contain a similar error when actually running eager/uncompiled. You can do this by removing the torch.compile call, or by using torch.compiler.set_stance("force_eager"). Hint: It may be possible to write Dynamo tracing rules for this code. Please report an issue to PyTorch if you encounter this graph break often and it is causing performance issues.

Developer debug context: raised exception AssertionError('False is not true')

For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0088.html

from user code: File "/var/lib/jenkins/workspace/test/dynamo/cpython/3_13/test_collections.py", line 670, in test_name_conflicts self.assertEqual(T._fields, tuple(words)) File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 907, in assertEqual assertion_func(first, second, msg=msg) File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 1124, in assertTupleEqual self.assertSequenceEqual(tuple1, tuple2, msg, seq_type=tuple) File "/opt/conda/envs/py_3.13/lib/python3.13/site-packages/torch/dynamo/polyfills/init.py", line 396, in assert_sequence_equal return self.assertTrue(seq1 == seq2, msg) File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 744, in assertTrue raise self.failureException(msg)

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"

Root Cause

This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.

Code Example

torch._dynamo.exc.ObservedAssertionErrorError: raised exception AssertionError('False is not true')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/envs/py_3.13/lib/python3.13/site-packages/torch/_dynamo/eval_frame.py", line 1055, in compile_wrapper
    raise e.with_traceback(None) from e.__cause__  # User compiler error
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
torch._dynamo.exc.Unsupported: Observed exception
  Explanation: Dynamo found no exception handler at the top-level compiled function when encountering an exception. Exception will propagate outside the compiled region.
  Hint: Your code may result in an error when running in eager. Please double check that your code doesn't contain a similar error when actually running eager/uncompiled. You can do this by removing the `torch.compile` call, or by using `torch.compiler.set_stance("force_eager")`. 
  Hint: It may be possible to write Dynamo tracing rules for this code. Please report an issue to PyTorch if you encounter this graph break often and it is causing performance issues.

  Developer debug context: raised exception AssertionError('False is not true')

 For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0088.html

from user code:
   File "/var/lib/jenkins/workspace/test/dynamo/cpython/3_13/test_collections.py", line 670, in test_name_conflicts
    self.assertEqual(T._fields, tuple(words))
  File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 907, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 1124, in assertTupleEqual
    self.assertSequenceEqual(tuple1, tuple2, msg, seq_type=tuple)
  File "/opt/conda/envs/py_3.13/lib/python3.13/site-packages/torch/_dynamo/polyfills/__init__.py", line 396, in assert_sequence_equal
    return self_.assertTrue(seq1 == seq2, msg)
  File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 744, in assertTrue
    raise self.failureException(msg)

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
RAW_BUFFERClick to expand / collapse

Platforms: dynamo

This test was disabled because it is failing in CI. See recent examples and the most recent trunk workflow logs.

Over the past 6 hours, it has been determined flaky in 4 workflow(s) with 10 failures and 4 successes.

Debugging instructions (after clicking on the recent samples link): DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs. To find relevant log snippets:

  1. Click on the workflow logs linked above
  2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
  3. Grep for test_name_conflicts
  4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.
<details><summary>Sample error message</summary>
torch._dynamo.exc.ObservedAssertionErrorError: raised exception AssertionError('False is not true')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/envs/py_3.13/lib/python3.13/site-packages/torch/_dynamo/eval_frame.py", line 1055, in compile_wrapper
    raise e.with_traceback(None) from e.__cause__  # User compiler error
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
torch._dynamo.exc.Unsupported: Observed exception
  Explanation: Dynamo found no exception handler at the top-level compiled function when encountering an exception. Exception will propagate outside the compiled region.
  Hint: Your code may result in an error when running in eager. Please double check that your code doesn't contain a similar error when actually running eager/uncompiled. You can do this by removing the `torch.compile` call, or by using `torch.compiler.set_stance("force_eager")`. 
  Hint: It may be possible to write Dynamo tracing rules for this code. Please report an issue to PyTorch if you encounter this graph break often and it is causing performance issues.

  Developer debug context: raised exception AssertionError('False is not true')

 For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0088.html

from user code:
   File "/var/lib/jenkins/workspace/test/dynamo/cpython/3_13/test_collections.py", line 670, in test_name_conflicts
    self.assertEqual(T._fields, tuple(words))
  File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 907, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 1124, in assertTupleEqual
    self.assertSequenceEqual(tuple1, tuple2, msg, seq_type=tuple)
  File "/opt/conda/envs/py_3.13/lib/python3.13/site-packages/torch/_dynamo/polyfills/__init__.py", line 396, in assert_sequence_equal
    return self_.assertTrue(seq1 == seq2, msg)
  File "/opt/conda/envs/py_3.13/lib/python3.13/unittest/case.py", line 744, in assertTrue
    raise self.failureException(msg)

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
</details>

Test file path: dynamo/cpython/3_13/test_collections.py

For all disabled tests (by GitHub issue), see https://hud.pytorch.org/disabled.

cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @amjames @Lucaskabela @jataylo @azahed98

extent analysis

TL;DR

The most likely fix for the failing test is to investigate and resolve the AssertionError caused by the mismatch between the expected and actual values of T._fields and tuple(words).

Guidance

  • Investigate the test_name_conflicts function in test_collections.py to understand why T._fields and tuple(words) are not equal.
  • Check the workflow logs for instances of test_name_conflicts to study the logs and identify patterns in the failures.
  • Consider setting TORCHDYNAMO_VERBOSE=1 and TORCH_LOGS="+dynamo" to get more detailed internal stack traces and developer context.
  • Review the PyTorch documentation on graph breaks (https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0088.html) to understand how to handle exceptions in compiled functions.

Example

No specific code snippet can be provided without more context, but the error message suggests that the issue lies in the comparison between T._fields and tuple(words).

Notes

The provided error message and stack trace indicate that the issue is related to a failed assertion in the test_name_conflicts function. However, without more information about the expected behavior and the values of T._fields and tuple(words), it is difficult to provide a more specific solution.

Recommendation

Apply a workaround by temporarily removing the torch.compile call or using torch.compiler.set_stance("force_eager") to run the test in eager mode, as suggested in the error message. This may help identify the root cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING