-
Notifications
You must be signed in to change notification settings - Fork 305
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
'scaling.py' throws torch error: 'function definitions aren't supported' when executed by 'train.py' and other scripts #1834
Comments
Would you mind posting the complete command and complete logs? Make sure you have use the latest master inside the docker container. |
/workspace/icefall/egs/librispeech/ASR/zipformer/export.py/export.py 2024-12-10 10:23:42,190 INFO [export.py:439] device: cpu And there is also another error which occurs before the error mentioned above in the method |
What is
Could you post the real command you are using? Also, could you try to use or are you using the latest master of icefall? |
Please tell us whether you have made any changes to icefall. |
I am sorry, it should be
This error at line 873 occurs in Balancer when I execute |
So there are two issues, right? Could you post the logs and commands for each issue separately?
Please answer whether you are using the latest master of icefall. You can use Since you are using
Could you tell us whether you have changed any code? Would be great if you can provide information in such a way that we can follow your command to reproduce your issue. |
Yes, exactly, there are two issues with |
I am using
torch2.4.1-cuda12.4
icefall docker image to train zipformer model on datasets like LibriSpeech or Common Voice.When I execute scripts like
train.py
orexport.py
, which use modulescaling.py
, I get following error:It seems that Torch is not supporting function definitions inside instance methods (it says: function definitions aren't supported).
There is also another such fuction in method
forward()
ofBalancer
class:_proportion_positive_to_mean()
, with functions inside:_atanh()
,_approx_inverse_erf()
.How could it be fixed?
Temporarily, I tried to extract those functions to the instance level of methods in
Balancer
class and it worked fine.The text was updated successfully, but these errors were encountered: