pytorch - 💡(How to fix) Fix DISABLED test_torchvision_models_convnext_base (__main__.TestVisionTracing) [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#182259Fetched 2026-05-04 04:57:53
View on GitHub
Comments
1
Participants
1
Timeline
13
Reactions
0
Participants
Timeline (top)
labeled ×4mentioned ×4subscribed ×4commented ×1

Error Message

Traceback (most recent call last): File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 58, in testPartExecutor yield File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 669, in run self._callTestMethod(testMethod) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 615, in _callTestMethod result = method() File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/testing/_internal/common_utils.py", line 3532, in wrapper method(*args, **kwargs) ~~~~~~^^^^^^^^^^^^^^^^^ File "/__w/pytorch/pytorch/test/test_fx.py", line 5451, in run_test script = torch.jit.script(graph) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 1498, in script ret = _script_impl( obj=obj, ...<3 lines>... example_inputs=example_inputs, ) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 1196, in _script_impl return torch.jit._recursive.create_script_module( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ obj, torch.jit._recursive.infer_methods_to_compile ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 566, in create_script_module return create_script_module_impl(nn_module, concrete_type, stubs_fn) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) ~~~~~~~^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( orig_value, sub_concrete_type, stubs_fn ) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) ~~~~~~~^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( orig_value, sub_concrete_type, stubs_fn ) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) ~~~~~~~^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( orig_value, sub_concrete_type, stubs_fn ) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) ~~~~~~~^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( orig_value, sub_concrete_type, stubs_fn ) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) ~~~~~~~^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( orig_value, sub_concrete_type, stubs_fn ) File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 638, in create_script_module_impl create_methods_and_properties_from_stubs( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ concrete_type, method_stubs, property_stubs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs concrete_type._create_methods_and_properties( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ property_defs, property_rcbs, method_defs, method_rcbs, method_defaults ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 1037, in compile_unbound_method create_methods_and_properties_from_stubs(concrete_type, (stub,), ()) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs concrete_type._create_methods_and_properties( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ property_defs, property_rcbs, method_defs, method_rcbs, method_defaults ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ RuntimeError: builtin cannot be used as a value: File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/nn/modules/conv.py", line 550 return F.conv2d( F.pad( input, self._reversed_padding_repeated_twice, mode=self.padding_mode ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE ), weight, 'Conv2d._conv_forward' is being compiled since it was called from 'Conv2d.forward' File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/nn/modules/conv.py", line 565 def forward(self, input: Tensor) -> Tensor: return self._conv_forward(input, self.weight, self.bias) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE

To execute this test, run the following from the base repo dir: python test/test_fx.py TestVisionTracing.test_torchvision_models_convnext_base

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0

Root Cause

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

Code Example

Traceback (most recent call last):
  File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 669, in run
    self._callTestMethod(testMethod)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 615, in _callTestMethod
    result = method()
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/testing/_internal/common_utils.py", line 3532, in wrapper
    method(*args, **kwargs)
    ~~~~~~^^^^^^^^^^^^^^^^^
  File "/__w/pytorch/pytorch/test/test_fx.py", line 5451, in run_test
    script = torch.jit.script(graph)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 1498, in script
    ret = _script_impl(
        obj=obj,
    ...<3 lines>...
        example_inputs=example_inputs,
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 1196, in _script_impl
    return torch.jit._recursive.create_script_module(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        obj, torch.jit._recursive.infer_methods_to_compile
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 566, in create_script_module
    return create_script_module_impl(nn_module, concrete_type, stubs_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 638, in create_script_module_impl
    create_methods_and_properties_from_stubs(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        concrete_type, method_stubs, property_stubs
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        property_defs, property_rcbs, method_defs, method_rcbs, method_defaults
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 1037, in compile_unbound_method
    create_methods_and_properties_from_stubs(concrete_type, (stub,), ())
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        property_defs, property_rcbs, method_defs, method_rcbs, method_defaults
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
RuntimeError: 
builtin cannot be used as a value:
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/nn/modules/conv.py", line 550
            return F.conv2d(
                F.pad(
                    input, self._reversed_padding_repeated_twice, mode=self.padding_mode
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
                ),
                weight,
'Conv2d._conv_forward' is being compiled since it was called from 'Conv2d.forward'
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/nn/modules/conv.py", line 565
    def forward(self, input: Tensor) -> Tensor:
        return self._conv_forward(input, self.weight, self.bias)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE


To execute this test, run the following from the base repo dir:
    python test/test_fx.py TestVisionTracing.test_torchvision_models_convnext_base

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
RAW_BUFFERClick to expand / collapse

Platforms: linux

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 3 workflow(s) with 3 failures and 3 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_torchvision_models_convnext_base
  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>
Traceback (most recent call last):
  File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 669, in run
    self._callTestMethod(testMethod)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/unittest/case.py", line 615, in _callTestMethod
    result = method()
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/testing/_internal/common_utils.py", line 3532, in wrapper
    method(*args, **kwargs)
    ~~~~~~^^^^^^^^^^^^^^^^^
  File "/__w/pytorch/pytorch/test/test_fx.py", line 5451, in run_test
    script = torch.jit.script(graph)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 1498, in script
    ret = _script_impl(
        obj=obj,
    ...<3 lines>...
        example_inputs=example_inputs,
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 1196, in _script_impl
    return torch.jit._recursive.create_script_module(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        obj, torch.jit._recursive.infer_methods_to_compile
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 566, in create_script_module
    return create_script_module_impl(nn_module, concrete_type, stubs_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 634, in create_script_module_impl
    script_module = torch.jit.RecursiveScriptModule._construct(cpp_module, init_fn)
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
    ~~~~~~~^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
        orig_value, sub_concrete_type, stubs_fn
    )
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 638, in create_script_module_impl
    create_methods_and_properties_from_stubs(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        concrete_type, method_stubs, property_stubs
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        property_defs, property_rcbs, method_defs, method_rcbs, method_defaults
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 1037, in compile_unbound_method
    create_methods_and_properties_from_stubs(concrete_type, (stub,), ())
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        property_defs, property_rcbs, method_defs, method_rcbs, method_defaults
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
RuntimeError: 
builtin cannot be used as a value:
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/nn/modules/conv.py", line 550
            return F.conv2d(
                F.pad(
                    input, self._reversed_padding_repeated_twice, mode=self.padding_mode
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
                ),
                weight,
'Conv2d._conv_forward' is being compiled since it was called from 'Conv2d.forward'
  File "/opt/conda/envs/py_3.14/lib/python3.14t/site-packages/torch/nn/modules/conv.py", line 565
    def forward(self, input: Tensor) -> Tensor:
        return self._conv_forward(input, self.weight, self.bias)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE


To execute this test, run the following from the base repo dir:
    python test/test_fx.py TestVisionTracing.test_torchvision_models_convnext_base

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
</details>

Test file path: test_fx.py

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

cc @ezyang @EikanWang @jgong5 @wenzhe-nrv

extent analysis

TL;DR

The most likely fix for the failing test test_torchvision_models_convnext_base is to update the PyTorch version or modify the test to handle the RuntimeError caused by the builtin function being used as a value.

Guidance

  • Investigate the Conv2d._conv_forward method to determine why it's being compiled and causing the error.
  • Check the PyTorch version being used and consider updating to a newer version that may have fixed this issue.
  • Modify the test to handle the RuntimeError exception and provide more informative error messages.
  • Review the torch/nn/modules/conv.py file to understand how the builtin function is being used and why it's causing the error.

Example

No code example is provided as the issue is related to a specific PyTorch version and test case.

Notes

The error message indicates that the builtin function is being used as a value, which is not allowed. This issue may be specific to the PyTorch version being used, and updating to a newer version may resolve the issue.

Recommendation

Apply a workaround by modifying the test to handle the RuntimeError exception, as updating the PyTorch version may not be feasible in all cases. This will allow the test to continue running and provide more informative error messages.

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

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