pytorch - 💡(How to fix) Fix DISABLED test_torchvision_models_efficientnet_b0 (__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#182174Fetched 2026-05-02 05:26:54
View on GitHub
Comments
1
Participants
1
Timeline
21
Reactions
0
Participants
Timeline (top)
mentioned ×8subscribed ×8labeled ×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 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_efficientnet_b0

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 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_efficientnet_b0

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 5 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_efficientnet_b0
  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 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_efficientnet_b0

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_b0 is failing due to a RuntimeError caused by the torch.jit.script function, and a potential workaround is to modify the test to avoid using torch.jit.script or to update the PyTorch version.

Guidance

  • Investigate the torch.jit.script function call in the test_fx.py file to see if there's a way to modify it to avoid the error.
  • Check the PyTorch version being used and consider updating to a newer version, as this issue may have been fixed in a later release.
  • Review the debugging instructions provided in the issue to gather more information about the error and potential causes.
  • Run the test using the command python test/test_fx.py TestVisionTracing.test_torchvision_models_efficientnet_b0 to reproduce the error and gather more information.

Example

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

Notes

The error message indicates that the builtin function cannot be used as a value, which suggests a potential issue with the PyTorch version or the way the torch.jit.script function is being used. More information is needed to provide a definitive solution.

Recommendation

Apply a workaround by modifying the test to avoid using torch.jit.script or update the PyTorch version to a newer release, as this may fix 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

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