Closed podestplatz closed 1 year ago
Hi! Thank you for your contribution! Please re-check all issue template checklists - unfilled issues would be closed automatically. And do not forget to join our slack for collaboration.
Please use accelerate==0.5.1
🐛 Bug Report
DataParallelEngine
inherits fromaccelerator.Accelerator
which defines theprepare_model
function with the kwargdevice_placement
.DataParallelEngine
overrides this function without this kwarg causing an exception inaccelerator.Accelerator.prepare_one()
becauseprepare_one
callsself.prepare_model
in line 741 withdevice_placement=device_placement
. This call gets redirected toDataParallelEngine.prepare_model
, which would then call itssuper
implementation, would it not receive the unexpected kwarg.How To Reproduce
Steps to reproduce the behavior:
The stack trace I get on my machine is:
Code sample
Screenshots
Expected behavior
I'd expect the model to train properly, that is that
DataParallelEngine.prepare_model
forwards all the kwargs it receives tosuper().prepare_model()
.Environment
The output of the
collect_env.py
script is the following:Additional context
Checklist
FAQ
Please review the FAQ before submitting an issue: