Issue 1:
This error happens when trying to read in the weights file using an older version of Pytorch. I assume this is why you say Pytorch needs to be built from source. However I've tried that all evening and I can't find a way to navigate all of the nvcc/gcc/cuda incompatibilities to get it to compile. Many errors, all of which are common when I google, with lots of workarounds, but all of them only partially work. Fundamentally it seems like some sort of std::tuple issue with CUDA/nvcc which Nvidia acknowledges but say they won't fix until the next CUDA release.

Is there any chance you could cave your weight file out into an older PyTorch format? Then I could just install python-pytorch-cuda-0.3.1-2 for my version of linux and be up and running in moments. ELF itself compiled fine, and it runs with python-pytorch-cuda-0.3.1-2... it just can't read the weights file. #5729 states it's because of the newer file format.

Thanks!

I did try going to https://pytorch.org/ and choosing Linux / pip / Python 3.6 / CUDA 9.2 which gives me these commands:

pip3 install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl

pip3 install torchvision

Which doesn't give me the error above, but I do instead get:

RuntimeError: Error(s) in loading state_dict for Model_PolicyValue:
Unexpected key(s) in state_dict: "init_conv.1.num_batches_tracked", "pi_final_conv.1.num_batches_tracked", "value_final_conv.1.num_batches_tracked", "resnet.resnet.0.conv_lower.1.num_batches_tracked", "resnet.resnet.0.conv_upper.1.num_batches_tracked", "resnet.resnet.1.conv_lower.1.num_batches_tracked", "resnet.resnet.1.conv_upper.1.num_batches_tracked", "resnet.resnet.2.conv_lower.1.num_batches_tracked", "resnet.resnet.2.conv_upper.1.num_batches_tracked", "resnet.resnet.3.conv_lower.1.num_batches_tracked", "resnet.resnet.3.conv_upper.1.num_batches_tracked", "resnet.resnet.4.conv_lower.1.num_batches_tracked", "resnet.resnet.4.conv_upper.1.num_batches_tracked", "resnet.resnet.5.conv_lower.1.num_batches_tracked", "resnet.resnet.5.conv_upper.1.num_batches_tracked", "resnet.resnet.6.conv_lower.1.num_batches_tracked", "resnet.resnet.6.conv_upper.1.num_batches_tracked", "resnet.resnet.7.conv_lower.1.num_batches_tracked", "resnet.resnet.7.conv_upper.1.num_batches_tracked", "resnet.resnet.8.conv_lower.1.num_batches_tracked", "resnet.resnet.8.conv_upper.1.num_batches_tracked", "resnet.resnet.9.conv_lower.1.num_batches_tracked", "resnet.resnet.9.conv_upper.1.num_batches_tracked", "resnet.resnet.10.conv_lower.1.num_batches_tracked", "resnet.resnet.10.conv_upper.1.num_batches_tracked", "resnet.resnet.11.conv_lower.1.num_batches_tracked", "resnet.resnet.11.conv_upper.1.num_batches_tracked", "resnet.resnet.12.conv_lower.1.num_batches_tracked", "resnet.resnet.12.conv_upper.1.num_batches_tracked", "resnet.resnet.13.conv_lower.1.num_batches_tracked", "resnet.resnet.13.conv_upper.1.num_batches_tracked", "resnet.resnet.14.conv_lower.1.num_batches_tracked", "resnet.resnet.14.conv_upper.1.num_batches_tracked", "resnet.resnet.15.conv_lower.1.num_batches_tracked", "resnet.resnet.15.conv_upper.1.num_batches_tracked", "resnet.resnet.16.conv_lower.1.num_batches_tracked", "resnet.resnet.16.conv_upper.1.num_batches_tracked", "resnet.resnet.17.conv_lower.1.num_batches_tracked", "resnet.resnet.17.conv_upper.1.num_batches_tracked", "resnet.resnet.18.conv_lower.1.num_batches_tracked", "resnet.resnet.18.conv_upper.1.num_batches_tracked", "resnet.resnet.19.conv_lower.1.num_batches_tracked", "resnet.resnet.19.conv_upper.1.num_batches_tracked".

Issue 2:
PyTorch GitHub Issues Guidelines

We like to limit our issues to bug reports and feature requests. If you have a question or would like help and support, please visit our forums: https://discuss.pytorch.org/

If you are submitting a feature request, please preface the title with [feature request].

When submitting a bug report, please include the following information (where relevant):

PyTorch or Caffe2: PyTorch

OS: Ubuntu 16.04

PyTorch version: save using 0.4.0a0+67bbf58, load using 0.2.0

How you installed PyTorch (conda, pip, source): source

Python version: python2.7

CUDA/cuDNN version: 8.0/6.1

GPU models and configuration: TitanXp

GCC version (if compiling from source): gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

CMake version: cmake version 3.5.1

Build command you used (if compiling from source): python setup.py install --user

Versions of any other relevant libraries:

In addition, including the following information will also be very helpful for us to diagnose the problem:

A script to reproduce the bug. Please try to provide as minimal of a test case as possible.

Error messages and/or stack traces of the bug

Context around what you are trying to do

Create a tensor and save it in 0.4.0a0+67bbf58:

import torch as tc
print(tc.__version__) # 0.2.0
t = tc.ones(3)
tc.save(t, './t.pth')

Load it in 0.2.0:

import torch as tc
print(tc.__version__) # 0.4.0a0+67bbf58
t = tc.load('./t.pth') # error

ERROR:

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-5932959b71e5> in <module>()
----> 1 x = tc.load('./t.pth')

/home/ylxie/.local/lib/python2.7/site-packages/torch/serialization.pyc in load(f, map_location, pickle_module)
229 f = open(f, 'rb')
230 try:
--> 231 return _load(f, map_location, pickle_module)
232 finally:
233 if new_fd:

/home/ylxie/.local/lib/python2.7/site-packages/torch/serialization.pyc in _load(f, map_location, pickle_module)
377 unpickler = pickle_module.Unpickler(f)
378 unpickler.persistent_load = persistent_load
--> 379 result = unpickler.load()
380
381 deserialized_storage_keys = pickle_module.load(f)

AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'

How could I solve this? this is an abstract version of my issue, the t is actually a state_dict. Is there any way I can specify a saving protocol for the convenience of loading models at an older version.