-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
autocast() got an unexpected keyword argument 'cache_enabled when use trainer.torch_jit_model_eval #35706
Comments
The last |
@SunMarc Of course, I will submit a fix PR ASAP to fix this bug. :) |
…rrectly when calling torch_jit_model_eval (huggingface#35706)
…l` (huggingface#35722) Fix the bug that the accelerator.autocast does not pass parameters correctly when calling torch_jit_model_eval (huggingface#35706)
…l` (huggingface#35722) Fix the bug that the accelerator.autocast does not pass parameters correctly when calling torch_jit_model_eval (huggingface#35706)
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
System Info
transformers
version: 4.46.3Who can help?
@muellerzr
@SunMarc
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
When using the
torch_jit_model_eval()
method in trainer, it promptsLooking at the details, it was found that the error was caused by the
self.accelerator.autocast(cache_enabled=False)
method. Its method definition isdef autocast(self, autocast_handler: AutocastKwargs = None)
, and there is nocache_enabled
method.Is this because the code here has not been updated, or because I ignored some settings?
Is there a solution now?
Expected behavior
Work normally.
The text was updated successfully, but these errors were encountered: