Repository: pytorch
Issue: JIT compiling a ParameterList raises an unnecessary warning
Labels: oncall: jit

## 🐛 Bug

JIT compiling a module with a ParameterList raises a warning

## To Reproduce

```
import torch                                                                                                                                                
                                                                                                                                                              
                                                                                                                                                              
  class Custom(torch.nn.Module):                                                                                                                              
      def __init__(self):                                                                                                                                     
          super().__init__()                                                                                                                                  
          self.paramlist = torch.nn.ParameterList([torch.nn.Parameter(torch.empty(1)) for _ in range(2)])                                                     
                                                                                                                                                              
custom = torch.jit.script(Custom()) 
```
This triggers the warning
```
UserWarning: Setting attributes on ParameterList is not s
upported.                                                                                                                                                     
  warnings.warn("Setting attributes on ParameterList is not supported.")                
```                

## Expected behavior

Warning should not be triggered since this code is correct usage of ParameterList, JIT may set attributes internally but whatever it is doing it seems to be correct and supported.

## Environment

PyTorch version: 1.9.0.dev20210527+cu111
Is debug build: False
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.2 LTS (x86_64)
GCC version: (Ubuntu 8.4.0-3ubuntu2) 8.4.0
Clang version: 10.0.0-4ubuntu1 
CMake version: version 3.16.3
Libc version: glibc-2.10

Python version: 3.7 (64-bit runtime)
Python platform: Linux-5.8.0-50-generic-x86_64-with-debian-bullseye-sid
Is CUDA available: True
CUDA runtime version: 11.1.105
GPU models and configuration: GPU 0: Quadro RTX 6000
Nvidia driver version: 460.73.01
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.18.1
[pip3] pytorch-memlab==0.2.2
[pip3] torch==1.9.0.dev20210527+cu111
[pip3] torchani==2.3.dev250+ge864b76
[pip3] torchaudio==0.9.0.dev20210415
[pip3] torchvision==0.10.0.dev20210415
[pip3] torchviz==0.0.2
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               11.0.221             h6bb024c_0  
[conda] mkl                       2020.1                      217  
[conda] mkl-service               2.3.0            py37he8ac12f_0  
[conda] mkl_fft                   1.2.0            py37h23d657b_0  
[conda] mkl_random                1.1.1            py37h0573a6f_0  
[conda] numpy                     1.18.1                   pypi_0    pypi
[conda] numpy-base                1.19.2           py37hfa32c7d_0  
[conda] pytorch-memlab            0.2.2                    pypi_0    pypi
[conda] torch                     1.9.0.dev20210527+cu111          pypi_0    pypi
[conda] torchaudio                0.9.0.dev20210415          pypi_0    pypi
[conda] torchvision               0.10.0.dev20210415          pypi_0    pypi
[conda] torchviz                  0.0.2                    pypi_0    pypi



cc @gmagogsfm