Skip to content

torch.stft() signature has been updated for PyTorch 1.7+ Please update PyTorch to remain compatible with later versions of NeMo.  #2780

@briebe

Description

@briebe

Describe the bug

[NeMo W 2021-09-06 11:58:47 patch_utils:50] torch.stft() signature has been updated for PyTorch 1.7+
Please update PyTorch to remain compatible with later versions of NeMo.

and followed by

/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py in _pad(input, pad, mode, value)
4157 assert len(pad) == 2, "3D tensors expect 2 values for padding"
4158 if mode == "reflect":
-> 4159 return torch._C._nn.reflection_pad1d(input, pad)
4160 elif mode == "replicate":
4161 return torch._C._nn.replication_pad1d(input, pad)

RuntimeError: Argument #4: Padding size should be less than the corresponding input dimension, but got: padding (256, 256) at dimension 2 of input [1, 2, 2]

also in this notebook, next to the AN4 Source not available problem:

Original Cell: restored_model.setup_finetune_model(config.model)

TypeError Traceback (most recent call last)

in ()
----> 1 restored_model.setup_finetune_model(config.model)

if i change to
Cell: restored_model.setup_finetune_model(model_config = config.model)

TypeError: setup_finetune_model() missing 1 required positional argument: 'model_config'
NameError Traceback (most recent call last)
in ()
----> 1 restored_model.setup_finetune_model(self, model_config=config.model)

NameError: name 'self' is not defined

same with this
cell: restored_model.set_trainer(trainer_finetune)

TypeError Traceback (most recent call last)
in ()
----> 1 restored_model.set_trainer(trainer_finetune)
2 log_dir_finetune = exp_manager(trainer_finetune, config.get("exp_manager", None))
3 print(log_dir_finetune)

TypeError: set_trainer() missing 1 required positional argument: 'trainer'

Steps/Code to reproduce bug

Cell: trainer.fit(speaker_model)

in

https://colab.research.google.com/github/NVIDIA/NeMo/blob/main/tutorials/speaker_recognition/Speaker_Recognition_Verification.ipynb

Expected behavior
(as expected by the ppl that made this notebook.... Colab training should work without bugfixing :-))

Torch 1.9 is installed, no updates possible as it seems...

Environment overview (please complete the following information)

torch @ https://download.pytorch.org/whl/cu102/torch-1.9.0%2Bcu102-cp37-cp37m-linux_x86_64.whl
torch-stft==0.1.4
torchaudio==0.9.0
torchmetrics==0.5.1
torchsummary==1.5.1
torchtext==0.10.0
torchvision @ https://download.pytorch.org/whl/cu102/torchvision-0.10.0%2Bcu102-cp37-cp37m-linux_x86_64.whl

Environment details

GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions