Skip to content
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

python3.7版本使用accelerate报错 #79

Open
zhangyu345293721 opened this issue Nov 30, 2023 · 0 comments
Open

python3.7版本使用accelerate报错 #79

zhangyu345293721 opened this issue Nov 30, 2023 · 0 comments

Comments

@zhangyu345293721
Copy link
Collaborator

210             train_epoch_runner = self.EpochRunner(train_step_runner,should_quiet)
211             train_metrics = {'epoch':epoch}

--> 212 train_metrics.update(train_epoch_runner(train_dataloader))
213
214 for name, metric in train_metrics.items():

/opt/conda3/envs/py37_lgb3.2.1/lib/python3.7/site-packages/torchkeras/kerasmodel.py in call(self, dataloader)
74
75 for step, batch in loop:
---> 76 with self.accelerator.accumulate(self.net):
77 step_losses,step_metrics = self.steprunner(batch)
78 step_log = dict(step_losses,**step_metrics)

AttributeError: 'Accelerator' object has no attribute 'accumulate'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant