test_serialization_state_norm failed during test run on Ubuntu 20.04
Environment details:
Ubuntu 20.04.1 LTS (Windows subsystem for Linux)
Miniconda 4.8.3
Python 3.8.5
Steps to reproduce:
-
Create conda environment
conda create -n <my-env> python=3.8
Replace<my-env>
with desired environment name. -
Activate the conda environment
conda activate <my-env>
-
Install dependencies as mentioned in README. numpy:
conda install numpy
scipy:conda install scipy
Pytorch:conda install pytorch torchvision cpuonly -c pytorch
Above command for pytorch installation is generated from https://pytorch.org/get-started/locally/ specific for a Linux + conda environment
numericalunits:conda install -c conda-forge numericalunits
matplotlib:conda install matplotlib
svgwrite:conda install -c conda-forge svgwrite
requests:conda install requests
nose:conda install nose
pip3 install git+https://github.com/pulkin/dfttools.git#subdirectory=src
-
Clone the miniff repository
-
Build and install
python3 setup.py build
python3 setup.py install
- Rnun tests
python3 setup.py nosetests
Below is an excerpt of the output after executing the command python setup.py nosetests
. The full terminal log is attached.
ERROR: test_serialization_state_norm (miniff.test_ml.LJBoxTestUnalignedTwoComponentCharges)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/nagrawal/miniff/miniff/test_ml.py", line 588, in test_serialization_state_norm
ref = ml.NNPotential.from_state_dict(torch.load(f))
File "/home/nagrawal/miniconda3/envs/dressingupmlcode/lib/python3.8/site-packages/torch/serialization.py", line 577, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/home/nagrawal/miniconda3/envs/dressingupmlcode/lib/python3.8/site-packages/torch/serialization.py", line 241, in __init__
super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: [enforce fail at inline_container.cc:144] . PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted