_pickle.UnpicklingError running test.py script (SOLVED)
freds0 opened this issue · comments
Frederico S. Oliveira commented
Hi @junjun3518,
First, congratulations on the work. I trained the nuwave model for r=2 and r=3, however I'm having trouble running the test.py script.
Please if you can help me that would be great. The following error message occurs when running:
# python test.py -r=645 -e
checkpoint_ratio_2/nuwave_x2_01_07_22_epoch=645_EMA
GPU available: True, used: True
TPU available: None, using: 0 TPU cores
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
full speakers 109
2 9
num_workers: 64
Testing: 0%| | 0/3552 [00:00<?, ?it/s]Exception in thread Thread-3:
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/opt/conda/lib/python3.6/site-packages/prefetch_generator/__init__.py", line 80, in run
for item in self.generator:
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 388, in __next__
data = self._next_data()
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1018, in _next_data
return self._process_data(data)
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1043, in _process_data
data.reraise()
File "/opt/conda/lib/python3.6/site-packages/torch/_utils.py", line 420, in reraise
raise self.exc_type(msg)
_pickle.UnpicklingError: Caught UnpicklingError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop
data = fetcher.fetch(index)
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/Documentos/Upsampling/nuwave/dataloader.py", line 104, in __getitem__
wav = torch.load(self.data_list[index])
File "/opt/conda/lib/python3.6/site-packages/torch/serialization.py", line 595, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/opt/conda/lib/python3.6/site-packages/torch/serialization.py", line 765, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: unpickling stack underflow
I'm using docker container. My hparameter.yaml file is as follows:
train:
batch_size: 16
lr: 0.00003
weight_decay: 0.00
num_workers: 64
gpus: 1 #ddp
opt_eps: 1e-9
beta1: 0.5
beta2: 0.999
data:
dir: './VCTK-Corpus/wav48/' #dir/spk/format
format: '*.wav'
cv_ratio: (100./108., 8./108., 0.00) #train/val/test
audio:
sr: 48000
nfft: 1024
hop: 256
ratio: 2 #upscale_ratio
length: 32768 #32*1024 ~ 1sec
arch:
residual_layers: 30 #
residual_channels: 64
dilation_cycle_length: 10
pos_emb_dim: 512
ddpm:
max_step: 1000
noise_schedule: "torch.linspace(1e-6, 0.006, hparams.ddpm.max_step)"
pos_emb_scale: 50000
pos_emb_channels: 128
infer_step: 8
infer_schedule: "torch.tensor([1e-6,2e-6,1e-5,1e-4,1e-3,1e-2,1e-1,9e-1])"
log:
name: 'nuwave_x2'
checkpoint_dir: 'checkpoint_ratio_2/'
tensorboard_dir: 'tensorboard_ratio_2/'
test_result_dir: 'test_sample/result'
Thank you very much in advance.
Frederico S. Oliveira commented
Sorry, my fault. I forgot to run the wv2pt.py script