-
Notifications
You must be signed in to change notification settings - Fork 718
Enable all tests #4061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: pseudo_main
Are you sure you want to change the base?
Enable all tests #4061
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/4061
Note: Links to docs will display an error until the docs builds have been completed. ❌ 8 New FailuresAs of commit e45fe5e with merge base a645da6 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
The torchscript consistency tests don't seem to work with manual autograd in python (torch.autograd.Function overloads). Pretty much all the torchscript consistency checks seem to have this issue. The only way forward is to either: |
It is possible to fix torchscript consistency tests by avoiding autograd functions under jit-scripting. For instance, diff --git a/src/torchaudio/functional/functional.py b/src/torchaudio/functional/functional.py
index 5d4284d5..a72c6091 100644
--- a/src/torchaudio/functional/functional.py
+++ b/src/torchaudio/functional/functional.py
@@ -1821,7 +1821,13 @@ def _rnnt_loss(
if blank < 0: # reinterpret blank index if blank < 0.
blank = logits.shape[-1] + blank
- costs = RnntLoss.apply(
+ if torch.jit.is_scripting():
+ # TorchScript does not support autograd functions
+ func = torch.ops.torchaudio.rnnt_loss_forward
+ else:
+ func = RnntLoss.apply
+
+ costs = func(
logits,
targets,
logit_lengths,
@@ -1831,6 +1837,9 @@ def _rnnt_loss(
fused_log_softmax
)
+ if torch.jit.is_scripting():
+ costs = costs[0]
+
if reduction == "mean":
return costs.mean()
elif reduction == "sum": |
Now that deprecated functionality has been removed, we can remove the restrictions given when running the test suite during CI. This PR depends on the functionality in the branch
pseudo_main
.