Closed vmoens closed 2 years ago
Hi,
Looks like this is based off a nightly PyTorch build.
Here is how we use torch.stft
before converting to TorchScript
class STFT(nn.Module):
def __init__(self):
....
def forward(self, x):
return torch.stft(x,
n_fft=self.n_fft,
hop_length=self.hop_length,
win_length=self.n_fft,
return_complex=True,
window=torch.hann_window(window_length=self.n_fft,
dtype=x.dtype, device=x.device)).abs()
but now a string representing the padding mode must be included pad_mode (string, optional) – controls the padding method used when center is True. Default: "reflect"
Is it already set in stone that this breaking change will be merged as is? Usually PyTorch does not make such changes.
The following files fail:
In any case: snakers4_silero-vad_language.py
and python_code/snakers4_silero-vad_number.py
can be deprecated, because no one uses them and we decided to deprecate them.
As for python_code/snakers4_silero-models_stt.py
I can just rebuild and reupload the latest models if the change gets added to a release.
@snakers4
Is it already set in stone that this breaking change will be merged as is? Usually PyTorch does not make such changes.
it seems this PR will be reverted so let's wait for a couple of days before acting on anything.
Thanks for your responsiveness!
ok
Our CI seems to be green now: https://github.com/pytorch/hub/pull/225 (https://app.circleci.com/pipelines/github/pytorch/hub/1725/workflows/ec0914a3-1510-4dcd-b3b3-42f1eca174cd/jobs/2166)
Thanks a lot @vmoens for investigating, and @snakers4 for your timely replies!
Hope that this minor contribution made PyTorch a bit better)
It seems that silero uses the
torch.stft
function in a way that will be deprecated in the next pytorch release.Previously, the following usage was permitted
but now a string representing the padding mode must be included
Link to the old function signature
Link to the new function signature
Link to the broken CI log
PR presumably responsible of the BC breaking change
Perhaps @peterbell10 can comment on this?
@snakers4 do you think it's something that can be fixed? Because the source code is not shared it's hard for us to debug this properly.
cc @NicolasHug