pytorch - 💡(How to fix) Fix DISABLED test_torchvision_models_efficientnet_b2 (__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#180414Fetched 2026-04-16 06:34:45
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 "/__w/pytorch/pytorch/test/test_fx.py", line 5426, in run_test script = torch.jit.script(graph) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_script.py", line 1498, in script ret = _script_impl( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_script.py", line 1196, in _script_impl return torch.jit._recursive.create_script_module( File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct init_fn(script_module) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn scripted = create_script_module_impl( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 638, in create_script_module_impl create_methods_and_properties_from_stubs( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs concrete_type._create_methods_and_properties( File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs concrete_type._create_methods_and_properties( RuntimeError: builtin cannot be used as a value: File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/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_efficientnet_b2

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 "/__w/pytorch/pytorch/test/test_fx.py", line 5426, in run_test
    script = torch.jit.script(graph)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_script.py", line 1498, in script
    ret = _script_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_script.py", line 1196, in _script_impl
    return torch.jit._recursive.create_script_module(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 638, in create_script_module_impl
    create_methods_and_properties_from_stubs(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(
RuntimeError: 
builtin cannot be used as a value:
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/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_efficientnet_b2

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

Platforms: linux, slow

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 4 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_torchvision_models_efficientnet_b2
  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 "/__w/pytorch/pytorch/test/test_fx.py", line 5426, in run_test
    script = torch.jit.script(graph)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_script.py", line 1498, in script
    ret = _script_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_script.py", line 1196, in _script_impl
    return torch.jit._recursive.create_script_module(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_script.py", line 673, in _construct
    init_fn(script_module)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 610, in init_fn
    scripted = create_script_module_impl(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 638, in create_script_module_impl
    create_methods_and_properties_from_stubs(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/site-packages/torch/jit/_recursive.py", line 473, in create_methods_and_properties_from_stubs
    concrete_type._create_methods_and_properties(
RuntimeError: 
builtin cannot be used as a value:
  File "/opt/conda/envs/py_3.10/lib/python3.10/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.10/lib/python3.10/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_efficientnet_b2

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 test test_torchvision_models_efficientnet_b2 is failing due to a RuntimeError caused by the builtin function being used as a value in the Conv2d module.

Guidance

  • Investigate the Conv2d module in torch/nn/modules/conv.py to understand why builtin is being used as a value.
  • Check the PyTorch version being used, as this issue may be related to a known bug that has been fixed in a later version.
  • Run the test with the PYTORCH_PRINT_REPRO_ON_FAILURE=1 environment variable set to get more detailed error messages.
  • Try to reproduce the issue by running the test locally using the command python test/test_fx.py TestVisionTracing.test_torchvision_models_efficientnet_b2.

Example

No code snippet is provided as the issue is related to a specific PyTorch module and requires further investigation.

Notes

The issue is marked as flaky, which means it may not always reproduce. The test has been disabled in CI to prevent false negatives.

Recommendation

Apply workaround: Investigate and fix the Conv2d module issue or upgrade to a later PyTorch version if the issue is related to a known bug.

FAIL-SAFE: Given the information, the best course of action is to investigate the Conv2d module and try to reproduce the issue locally. If the issue persists, consider upgrading to a later PyTorch version or seeking further assistance from the PyTorch community.

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_efficientnet_b2 (__main__.TestVisionTracing) [1 comments, 1 participants]