rusty1s / pyg_autoscale

Implementation of "GNNAutoScale: Scalable and Expressive Graph Neural Networks via Historical Embeddings" in PyTorch
http://arxiv.org/abs/2106.05609
MIT License
158 stars 27 forks source link

Installation Failure #23

Closed joneswong closed 1 year ago

joneswong commented 2 years ago

My environment: centos7, GCC 5.4, nvidia driver 470.82.01, cuda: 11.4, anaconda, python 3.9.13 pytorch 1.10.1, pyg 2.0.4

Install from source, with pip install -e .

20F9D08A-3F08-47DD-AABC-422863F8B617

Could you help me install this package? Thanks!

rusty1s commented 1 year ago

Thanks for the issue. Is it possible to share the full log with me?

joneswong commented 1 year ago

The stdout shows:

Obtaining file:///home/jones.wz/pyg_autoscale Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Requirement already satisfied: ogb in /home/jones.wz/myogb (from torch-geometric-autoscale==0.0.0) (1.3.4) Requirement already satisfied: hydra-core in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from torch-geometric-autoscale==0.0.0) (1.2.0) Requirement already satisfied: antlr4-python3-runtime==4.9.* in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from hydra-core->torch-geometric-autoscale==0.0.0) (4.9.3) Requirement already satisfied: omegaconf~=2.2 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from hydra-core->torch-geometric-autoscale==0.0.0) (2.2.3) Requirement already satisfied: packaging in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from hydra-core->torch-geometric-autoscale==0.0.0) (21.3) Requirement already satisfied: torch>=1.6.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from ogb->torch-geometric-autoscale==0.0.0) (1.10.1) Requirement already satisfied: numpy>=1.16.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from ogb->torch-geometric-autoscale==0.0.0) (1.22.4) Requirement already satisfied: tqdm>=4.29.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from ogb->torch-geometric-autoscale==0.0.0) (4.64.0) Requirement already satisfied: scikit-learn>=0.20.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from ogb->torch-geometric-autoscale==0.0.0) (1.1.1) Requirement already satisfied: pandas>=0.24.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from ogb->torch-geometric-autoscale==0.0.0) (1.4.4) Requirement already satisfied: six>=1.12.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from ogb->torch-geometric-autoscale==0.0.0) (1.16.0) Requirement already satisfied: urllib3>=1.24.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from ogb->torch-geometric-autoscale==0.0.0) (1.26.12) Requirement already satisfied: outdated>=0.2.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from ogb->torch-geometric-autoscale==0.0.0) (0.2.1) Requirement already satisfied: PyYAML>=5.1.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from omegaconf~=2.2->hydra-core->torch-geometric-autoscale==0.0.0) (6.0) Requirement already satisfied: littleutils in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from outdated>=0.2.0->ogb->torch-geometric-autoscale==0.0.0) (0.2.2) Requirement already satisfied: requests in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from outdated>=0.2.0->ogb->torch-geometric-autoscale==0.0.0) (2.28.1) Requirement already satisfied: python-dateutil>=2.8.1 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from pandas>=0.24.0->ogb->torch-geometric-autoscale==0.0.0) (2.8.2) Requirement already satisfied: pytz>=2020.1 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from pandas>=0.24.0->ogb->torch-geometric-autoscale==0.0.0) (2022.2.1) Requirement already satisfied: joblib>=1.0.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from scikit-learn>=0.20.0->ogb->torch-geometric-autoscale==0.0.0) (1.1.0) Requirement already satisfied: threadpoolctl>=2.0.0 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from scikit-learn>=0.20.0->ogb->torch-geometric-autoscale==0.0.0) (3.1.0) Requirement already satisfied: scipy>=1.3.2 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from scikit-learn>=0.20.0->ogb->torch-geometric-autoscale==0.0.0) (1.8.0) Requirement already satisfied: typing_extensions in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from torch>=1.6.0->ogb->torch-geometric-autoscale==0.0.0) (4.3.0) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from packaging->hydra-core->torch-geometric-autoscale==0.0.0) (3.0.9) Requirement already satisfied: certifi>=2017.4.17 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from requests->outdated>=0.2.0->ogb->torch-geometric-autoscale==0.0.0) (2022.6.15) Requirement already satisfied: charset-normalizer<3,>=2 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from requests->outdated>=0.2.0->ogb->torch-geometric-autoscale==0.0.0) (2.1.1) Requirement already satisfied: idna<4,>=2.5 in /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages (from requests->outdated>=0.2.0->ogb->torch-geometric-autoscale==0.0.0) (3.3) Installing collected packages: torch-geometric-autoscale Running setup.py develop for torch-geometric-autoscale

joneswong commented 1 year ago

The stderr shows:

error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [185 lines of output]
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
      warnings.warn(
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
      warnings.warn(
    running develop
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running egg_info
    writing torch_geometric_autoscale.egg-info/PKG-INFO
    writing dependency_links to torch_geometric_autoscale.egg-info/dependency_links.txt
    writing requirements to torch_geometric_autoscale.egg-info/requires.txt
    writing top-level names to torch_geometric_autoscale.egg-info/top_level.txt
    reading manifest file 'torch_geometric_autoscale.egg-info/SOURCES.txt'
    adding license file 'LICENSE'
    writing manifest file 'torch_geometric_autoscale.egg-info/SOURCES.txt'
    running build_ext
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/utils/cpp_extension.py:782: UserWarning: The detected CUDA version (11.4) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
      warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
    building 'torch_geometric_autoscale._async' extension
    gcc -pthread -B /home/jones.wz/anaconda3/envs/fs/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/jones.wz/anaconda3/envs/fs/include -I/home/jones.wz/anaconda3/envs/fs/include -fPIC -O2 -isystem /home/jones.wz/anaconda3/envs/fs/include -fPIC -DWITH_CUDA -Icsrc -I/home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include -I/home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/TH -I/home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.4/include -I/home/jones.wz/anaconda3/envs/fs/include/python3.9 -c csrc/async.cpp -o build/temp.linux-x86_64-cpython-39/csrc/async.o -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_async -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    /usr/local/cuda-11.4/bin/nvcc -DWITH_CUDA -Icsrc -I/home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include -I/home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/TH -I/home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.4/include -I/home/jones.wz/anaconda3/envs/fs/include/python3.9 -c csrc/cuda/async_cuda.cu -o build/temp.linux-x86_64-cpython-39/csrc/cuda/async_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -arch=sm_35 --expt-relaxed-constexpr -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_async -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::CrossMapLRN2dImpl]’:
    /tmp/tmpxft_0000d27f_00000000-6_async_cuda.cudafe1.stub.c:15:27:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::EmbeddingBagImpl]’:
    /tmp/tmpxft_0000d27f_00000000-6_async_cuda.cudafe1.stub.c:15:27:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::EmbeddingImpl]’:
    /tmp/tmpxft_0000d27f_00000000-6_async_cuda.cudafe1.stub.c:15:27:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::ParameterDictImpl]’:
    /tmp/tmpxft_0000d27f_00000000-6_async_cuda.cudafe1.stub.c:15:27:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::SequentialImpl]’:
    /tmp/tmpxft_0000d27f_00000000-6_async_cuda.cudafe1.stub.c:15:27:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::ModuleListImpl]’:
    /tmp/tmpxft_0000d27f_00000000-6_async_cuda.cudafe1.stub.c:15:27:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::ModuleDictImpl]’:
    /tmp/tmpxft_0000d27f_00000000-6_async_cuda.cudafe1.stub.c:15:27:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::TransformerDecoderImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::TransformerEncoderImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::TransformerDecoderLayerImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::TransformerEncoderLayerImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::GroupNormImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::LocalResponseNormImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::LayerNormImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::MultiheadAttentionImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::ThresholdImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::LogSoftmaxImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::SoftminImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::SoftmaxImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::GRUCellImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::LSTMCellImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::RNNCellImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::GRUImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::LSTMImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::RNNImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::FractionalMaxPool3dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::FractionalMaxPool2dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::ZeroPad2dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::UnfoldImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::FoldImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::ConvTranspose3dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::ConvTranspose2dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::ConvTranspose1dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::Conv3dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::Conv2dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::Conv1dImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::AdaptiveLogSoftmaxWithLossImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::BilinearImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::UnflattenImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&) const [with Derived = torch::nn::LinearImpl]’:
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/optim/sgd.h:49:48:   required from here
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:59: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’
    /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:69:61: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >’ to type ‘torch::OrderedDict<std::basic_string<char>, std::shared_ptr<torch::nn::Module> >&’
    error: command '/usr/local/cuda-11.4/bin/nvcc' failed with exit code 1
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

× python setup.py develop did not run successfully. │ exit code: 1 ╰─> [185 lines of output] /home/jones.wz/anaconda3/envs/fs/lib/python3.9/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn(

and it repeats again

rusty1s commented 1 year ago

The error seems to be invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’. A similar issue is reported in https://github.com/NVIDIA/apex/issues/1268. Hopefully, updating GCC to a later version will fix this problem.

joneswong commented 1 year ago

The error seems to be invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&’. A similar issue is reported in NVIDIA/apex#1268. Hopefully, updating GCC to a later version will fix this problem.

I updated gcc to version 7.3.1. It works! Thanks!