Repository: pytorch
Issue: Python 3.12 CPU test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool is failing
Labels: module: tests,module: fx,fx,oncall: fx

### 🐛 Describe the bug

I observe following failure when adding support for python 3.12 CPU, workflow : linux-focal-py3.12-clang10
Failure:
https://github.com/pytorch/pytorch/actions/runs/7822504952/job/21342005044

Log:
```
2024-02-08T00:20:42.5928989Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d FAILED [0.0032s] [ 27%]
2024-02-08T00:20:42.5929578Z 
2024-02-08T00:20:42.5929773Z ==================================== RERUNS ====================================
2024-02-08T00:20:42.5930441Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.5931071Z Traceback (most recent call last):
2024-02-08T00:20:42.5931706Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.5932333Z     symbolic_trace(fn)
2024-02-08T00:20:42.5933201Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.5934088Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.5934520Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.5935394Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.5936185Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.5936546Z                      ^^^^^^^^^
2024-02-08T00:20:42.5937351Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.5938130Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.5938452Z     ^
2024-02-08T00:20:42.5939129Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.5939884Z     return self.tracer.iter(self)
2024-02-08T00:20:42.5940251Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.5940996Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.5941926Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.5944165Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.5946110Z 
2024-02-08T00:20:42.5946376Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.5947105Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.5947579Z 
2024-02-08T00:20:42.5947895Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.5948706Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.5949319Z Traceback (most recent call last):
2024-02-08T00:20:42.5950044Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.5950686Z     symbolic_trace(fn)
2024-02-08T00:20:42.5951546Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.5952418Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.5952859Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.5953733Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.5954509Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.5954877Z                      ^^^^^^^^^
2024-02-08T00:20:42.5955638Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.5956358Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.5956722Z     ^
2024-02-08T00:20:42.5957408Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.5958150Z     return self.tracer.iter(self)
2024-02-08T00:20:42.5958516Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.5959270Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.5960184Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.5962426Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.5964372Z 
2024-02-08T00:20:42.5964626Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.5965370Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.5965796Z 
2024-02-08T00:20:42.5966115Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.5966844Z =================================== FAILURES ===================================
2024-02-08T00:20:42.5967517Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.5968141Z Traceback (most recent call last):
2024-02-08T00:20:42.5968811Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.5969469Z     symbolic_trace(fn)
2024-02-08T00:20:42.5970381Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.5971268Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.5971711Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.5972588Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.5973369Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.5973727Z                      ^^^^^^^^^
2024-02-08T00:20:42.5974491Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.5975215Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.5975537Z     ^
2024-02-08T00:20:42.5976227Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.5976968Z     return self.tracer.iter(self)
2024-02-08T00:20:42.5977334Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.5978099Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.5979077Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.5981295Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.5983237Z 
2024-02-08T00:20:42.5983487Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.5984225Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.5984651Z 
2024-02-08T00:20:42.5984976Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.5986137Z - generated xml file: /var/lib/jenkins/workspace/test/test-reports/python-pytest/test_fx/test_fx-4db67e0a7ac6913f.xml -
2024-02-08T00:20:42.5987115Z =========================== short test summary info ============================
2024-02-08T00:20:42.5990167Z FAILED [0.0032s] test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d - torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.5992609Z 
2024-02-08T00:20:42.5992874Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.5993604Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.5994045Z 
2024-02-08T00:20:42.5994361Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.5995053Z !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-02-08T00:20:42.5995703Z ============== 1 failed, 321 passed, 13 skipped, 2 rerun in 5.50s ==============
2024-02-08T00:20:42.5996218Z Got exit code 1
2024-02-08T00:20:42.5996488Z Retrying...
2024-02-08T00:20:42.5997143Z Test results will be stored in test-reports/python-pytest/test_fx/test_fx-92ea30538d8427b8.xml
2024-02-08T00:20:42.5997914Z ============================= test session starts ==============================
2024-02-08T00:20:42.5998783Z platform linux -- Python 3.12.1, pytest-7.3.2, pluggy-1.4.0 -- /opt/conda/envs/py_3.12/bin/python
2024-02-08T00:20:42.5999476Z cachedir: .pytest_cache
2024-02-08T00:20:42.6000386Z hypothesis profile 'pytorch_ci' -> database=None, max_examples=50, derandomize=True, suppress_health_check=[HealthCheck.too_slow]
2024-02-08T00:20:42.6001244Z rootdir: /var/lib/jenkins/workspace
2024-02-08T00:20:42.6001626Z configfile: pytest.ini
2024-02-08T00:20:42.6002422Z plugins: hypothesis-5.35.1, cpp-2.3.0, flakefinder-1.1.0, rerunfailures-13.0, xdist-3.3.1, xdoctest-1.1.0
2024-02-08T00:20:42.6003322Z collecting ... collected 1212 items / 334 deselected / 878 selected
2024-02-08T00:20:42.6003906Z stepcurrent: skipping 334 already run items.
2024-02-08T00:20:42.6004334Z Running 878 items in this shard
2024-02-08T00:20:42.6004596Z 
2024-02-08T00:20:42.6005224Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d ('RERUN', {'yellow': True}) [0.0049s] [  0%]
2024-02-08T00:20:42.6006590Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d ('RERUN', {'yellow': True}) [0.0031s] [  0%]
2024-02-08T00:20:42.6007684Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d FAILED [0.0023s] [  0%]
2024-02-08T00:20:42.6008261Z 
2024-02-08T00:20:42.6008445Z ==================================== RERUNS ====================================
2024-02-08T00:20:42.6009123Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.6009745Z Traceback (most recent call last):
2024-02-08T00:20:42.6010420Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6011058Z     symbolic_trace(fn)
2024-02-08T00:20:42.6011925Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6012815Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6013240Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6014123Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6014907Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6015257Z                      ^^^^^^^^^
2024-02-08T00:20:42.6016023Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6016757Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6017068Z     ^
2024-02-08T00:20:42.6017751Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6018503Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6018855Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6019612Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6020575Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6022821Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6024745Z 
2024-02-08T00:20:42.6024994Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6025739Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.6026163Z 
2024-02-08T00:20:42.6026489Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6027296Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.6027908Z Traceback (most recent call last):
2024-02-08T00:20:42.6028538Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6029175Z     symbolic_trace(fn)
2024-02-08T00:20:42.6030118Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6031001Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6031435Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6032356Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6033194Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6033553Z                      ^^^^^^^^^
2024-02-08T00:20:42.6034306Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6035045Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6035362Z     ^
2024-02-08T00:20:42.6036031Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6036790Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6037161Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6037900Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6038827Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6041064Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6043043Z 
2024-02-08T00:20:42.6043306Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6044051Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.6044475Z 
2024-02-08T00:20:42.6044789Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6045448Z =================================== FAILURES ===================================
2024-02-08T00:20:42.6046124Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.6046799Z Traceback (most recent call last):
2024-02-08T00:20:42.6047432Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6048067Z     symbolic_trace(fn)
2024-02-08T00:20:42.6048918Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6049800Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6050241Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6051101Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6051950Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6052312Z                      ^^^^^^^^^
2024-02-08T00:20:42.6053079Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6053800Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6054122Z     ^
2024-02-08T00:20:42.6054807Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6055546Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6055917Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6056671Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6057590Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6059815Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6061767Z 
2024-02-08T00:20:42.6062020Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6062766Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.6063190Z 
2024-02-08T00:20:42.6063557Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6064760Z - generated xml file: /var/lib/jenkins/workspace/test/test-reports/python-pytest/test_fx/test_fx-92ea30538d8427b8.xml -
2024-02-08T00:20:42.6065727Z =========================== short test summary info ============================
2024-02-08T00:20:42.6068670Z FAILED [0.0023s] test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d - torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6071202Z 
2024-02-08T00:20:42.6071468Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6072263Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.6072710Z 
2024-02-08T00:20:42.6073026Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6073726Z !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-02-08T00:20:42.6074412Z ================== 1 failed, 334 deselected, 2 rerun in 0.10s ==================
2024-02-08T00:20:42.6074930Z Got exit code 1
2024-02-08T00:20:42.6075201Z Retrying...
2024-02-08T00:20:42.6075852Z Test results will be stored in test-reports/python-pytest/test_fx/test_fx-a5a6c6d420c4a386.xml
2024-02-08T00:20:42.6076644Z ============================= test session starts ==============================
2024-02-08T00:20:42.6077513Z platform linux -- Python 3.12.1, pytest-7.3.2, pluggy-1.4.0 -- /opt/conda/envs/py_3.12/bin/python
2024-02-08T00:20:42.6078194Z cachedir: .pytest_cache
2024-02-08T00:20:42.6079075Z hypothesis profile 'pytorch_ci' -> database=None, max_examples=50, derandomize=True, suppress_health_check=[HealthCheck.too_slow]
2024-02-08T00:20:42.6079940Z rootdir: /var/lib/jenkins/workspace
2024-02-08T00:20:42.6080321Z configfile: pytest.ini
2024-02-08T00:20:42.6081079Z plugins: hypothesis-5.35.1, cpp-2.3.0, flakefinder-1.1.0, rerunfailures-13.0, xdist-3.3.1, xdoctest-1.1.0
2024-02-08T00:20:42.6081969Z collecting ... collected 1212 items / 334 deselected / 878 selected
2024-02-08T00:20:42.6082552Z stepcurrent: skipping 334 already run items.
2024-02-08T00:20:42.6082978Z Running 878 items in this shard
2024-02-08T00:20:42.6083287Z 
2024-02-08T00:20:42.6083909Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d ('RERUN', {'yellow': True}) [0.0049s] [  0%]
2024-02-08T00:20:42.6085204Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d ('RERUN', {'yellow': True}) [0.0031s] [  0%]
2024-02-08T00:20:42.6086382Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d FAILED [0.0024s] [  0%]
2024-02-08T00:20:42.6086975Z 
2024-02-08T00:20:42.6087160Z ==================================== RERUNS ====================================
2024-02-08T00:20:42.6087836Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.6088462Z Traceback (most recent call last):
2024-02-08T00:20:42.6089075Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6089710Z     symbolic_trace(fn)
2024-02-08T00:20:42.6090572Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6091446Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6091884Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6092758Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6093533Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6093893Z                      ^^^^^^^^^
2024-02-08T00:20:42.6094713Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6095449Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6095753Z     ^
2024-02-08T00:20:42.6096518Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6097278Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6097627Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6098385Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6099315Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6101541Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6103494Z 
2024-02-08T00:20:42.6103745Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6104491Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.6104917Z 
2024-02-08T00:20:42.6105293Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6106086Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.6106714Z Traceback (most recent call last):
2024-02-08T00:20:42.6107343Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6107963Z     symbolic_trace(fn)
2024-02-08T00:20:42.6108817Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6109805Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6110229Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6111107Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6111901Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6112264Z                      ^^^^^^^^^
2024-02-08T00:20:42.6113016Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6113745Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6114060Z     ^
2024-02-08T00:20:42.6114783Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6115531Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6115898Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6116637Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6117564Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6119804Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6121741Z 
2024-02-08T00:20:42.6122004Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6122729Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.6123168Z 
2024-02-08T00:20:42.6123482Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6124179Z =================================== FAILURES ===================================
2024-02-08T00:20:42.6124843Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool1d _________
2024-02-08T00:20:42.6125467Z Traceback (most recent call last):
2024-02-08T00:20:42.6126233Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6126891Z     symbolic_trace(fn)
2024-02-08T00:20:42.6127793Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6128679Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6129118Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6129977Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6130772Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6131134Z                      ^^^^^^^^^
2024-02-08T00:20:42.6131886Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6132624Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6132945Z     ^
2024-02-08T00:20:42.6133615Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6134377Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6134747Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6135585Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6136768Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6139113Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6141131Z 
2024-02-08T00:20:42.6141417Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6142324Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.6142784Z 
2024-02-08T00:20:42.6143173Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6144400Z - generated xml file: /var/lib/jenkins/workspace/test/test-reports/python-pytest/test_fx/test_fx-a5a6c6d420c4a386.xml -
2024-02-08T00:20:42.6145487Z =========================== short test summary info ============================
2024-02-08T00:20:42.6148527Z FAILED [0.0024s] test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d - torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6151137Z 
2024-02-08T00:20:42.6151467Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6152321Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool1d
2024-02-08T00:20:42.6152824Z 
2024-02-08T00:20:42.6153171Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6178126Z !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-02-08T00:20:42.6178936Z ================== 1 failed, 334 deselected, 2 rerun in 0.10s ==================
2024-02-08T00:20:42.6179470Z Got exit code 1
2024-02-08T00:20:42.6179747Z Retrying...
2024-02-08T00:20:42.6180487Z Test results will be stored in test-reports/python-pytest/test_fx/test_fx-fd355d5d68599b9e.xml
2024-02-08T00:20:42.6181296Z ============================= test session starts ==============================
2024-02-08T00:20:42.6182178Z platform linux -- Python 3.12.1, pytest-7.3.2, pluggy-1.4.0 -- /opt/conda/envs/py_3.12/bin/python
2024-02-08T00:20:42.6182870Z cachedir: .pytest_cache
2024-02-08T00:20:42.6183765Z hypothesis profile 'pytorch_ci' -> database=None, max_examples=50, derandomize=True, suppress_health_check=[HealthCheck.too_slow]
2024-02-08T00:20:42.6184825Z rootdir: /var/lib/jenkins/workspace
2024-02-08T00:20:42.6185200Z configfile: pytest.ini
2024-02-08T00:20:42.6186020Z plugins: hypothesis-5.35.1, cpp-2.3.0, flakefinder-1.1.0, rerunfailures-13.0, xdist-3.3.1, xdoctest-1.1.0
2024-02-08T00:20:42.6186925Z collecting ... collected 1212 items / 335 deselected / 877 selected
2024-02-08T00:20:42.6187499Z stepcurrent: skipping 335 already run items.
2024-02-08T00:20:42.6187944Z Running 877 items in this shard
2024-02-08T00:20:42.6188208Z 
2024-02-08T00:20:42.6188710Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool1d_with_indices PASSED [0.0048s] [  0%]
2024-02-08T00:20:42.6190112Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool2d ('RERUN', {'yellow': True}) [0.0034s] [  0%]
2024-02-08T00:20:42.6191401Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool2d ('RERUN', {'yellow': True}) [0.0027s] [  0%]
2024-02-08T00:20:42.6192515Z test_fx.py::TestFunctionalTracing::test_nn_functional_adaptive_max_pool2d FAILED [0.0027s] [  0%]
2024-02-08T00:20:42.6193099Z 
2024-02-08T00:20:42.6193293Z ==================================== RERUNS ====================================
2024-02-08T00:20:42.6193964Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool2d _________
2024-02-08T00:20:42.6194641Z Traceback (most recent call last):
2024-02-08T00:20:42.6195277Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6195919Z     symbolic_trace(fn)
2024-02-08T00:20:42.6196779Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6197663Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6198108Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6198975Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6199767Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6200132Z                      ^^^^^^^^^
2024-02-08T00:20:42.6200888Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6201624Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6201944Z     ^
2024-02-08T00:20:42.6202621Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6203376Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6203808Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6204551Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6205476Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6207814Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6209757Z 
2024-02-08T00:20:42.6210028Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6210771Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool2d
2024-02-08T00:20:42.6211221Z 
2024-02-08T00:20:42.6211541Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6212356Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool2d _________
2024-02-08T00:20:42.6212981Z Traceback (most recent call last):
2024-02-08T00:20:42.6213597Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6214233Z     symbolic_trace(fn)
2024-02-08T00:20:42.6215092Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6215963Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6216473Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6217390Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6218168Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6218539Z                      ^^^^^^^^^
2024-02-08T00:20:42.6219308Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6220034Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6220350Z     ^
2024-02-08T00:20:42.6221031Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6221778Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6222131Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6222898Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6223828Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6226051Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6228055Z 
2024-02-08T00:20:42.6228308Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6229056Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool2d
2024-02-08T00:20:42.6229590Z 
2024-02-08T00:20:42.6229921Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6230571Z =================================== FAILURES ===================================
2024-02-08T00:20:42.6231251Z _________ TestFunctionalTracing.test_nn_functional_adaptive_max_pool2d _________
2024-02-08T00:20:42.6231875Z Traceback (most recent call last):
2024-02-08T00:20:42.6232494Z   File "/var/lib/jenkins/workspace/test/test_fx.py", line 4426, in functional_test
2024-02-08T00:20:42.6233127Z     symbolic_trace(fn)
2024-02-08T00:20:42.6233992Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 1184, in symbolic_trace
2024-02-08T00:20:42.6234862Z     graph = tracer.trace(root, concrete_args)
2024-02-08T00:20:42.6235302Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6236228Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/_symbolic_trace.py", line 784, in trace
2024-02-08T00:20:42.6237019Z     (self.create_arg(fn(*args)),),
2024-02-08T00:20:42.6237368Z                      ^^^^^^^^^
2024-02-08T00:20:42.6238135Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_jit_internal.py", line 489, in fn
2024-02-08T00:20:42.6238872Z     def fn(*args, **kwargs):
2024-02-08T00:20:42.6239178Z     ^
2024-02-08T00:20:42.6239863Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 410, in __iter__
2024-02-08T00:20:42.6240617Z     return self.tracer.iter(self)
2024-02-08T00:20:42.6240972Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-02-08T00:20:42.6241726Z   File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/fx/proxy.py", line 310, in iter
2024-02-08T00:20:42.6242652Z     raise TraceError('Proxy object cannot be iterated. This can be '
2024-02-08T00:20:42.6244879Z torch.fx.proxy.TraceError: Proxy object cannot be iterated. This can be attempted when the Proxy is used in a loop or as a *args or **kwargs function argument. See the torch.fx docs on pytorch.org for a more detailed explanation of what types of control flow can be traced, and check out the Proxy docstring for help troubleshooting Proxy iteration errors
2024-02-08T00:20:42.6246887Z 
2024-02-08T00:20:42.6247139Z To execute this test, run the following from the base repo dir:
2024-02-08T00:20:42.6247942Z      python test/test_fx.py -k test_nn_functional_adaptive_max_pool2d
2024-02-08T00:20:42.6248371Z 
2024-02-08T00:20:42.6248697Z This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
2024-02-08T00:20:42.6249898Z - generated xml file: /var/lib/jenkins/workspace/test/test-reports/python-pytest/test_fx/test_fx-fd355d5d68599b9e.xml -
```

### Versions

2.3.0 nightly

cc @mruberry @ZainRizvi @ezyang @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv @albanD