accelerate icon indicating copy to clipboard operation
accelerate copied to clipboard

`preload_module_classes` is lost in attach_execution_device_hook.

Open wejoncy opened this issue 1 year ago • 4 comments

System Info

https://github.com/huggingface/accelerate/blob/3fcc9461c4fcb7228df5e5246809ba09cfbb232e/src/accelerate/hooks.py#L439 Should we pass preload_module_classes to the next calling? such as

        attach_execution_device_hook(child, execution_device, tied_params_map=tied_params_map, 
 preload_module_classes=preload_module_classes)

Information

  • [ ] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
  • [ ] My own task or dataset (give details below)

Reproduction

Step into the code is enough.

Expected behavior

Identify the bug.

wejoncy avatar Aug 29 '24 10:08 wejoncy

Hi @muellerzr Could you please take a look at it? Sorry if I ping the wrong contributor could you please help to recommend someone? Thanks

wejoncy avatar Sep 02 '24 05:09 wejoncy

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.

github-actions[bot] avatar Sep 28 '24 15:09 github-actions[bot]

Could anyone help to look at this issue?

wejoncy avatar Sep 29 '24 02:09 wejoncy

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.

github-actions[bot] avatar Oct 23 '24 15:10 github-actions[bot]

Hi @SunMarc

Could you please take a look at this issue when you get a time? Thanks.

wejoncy avatar Oct 28 '24 04:10 wejoncy

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.

github-actions[bot] avatar Nov 21 '24 15:11 github-actions[bot]

Oh my bad sorry for the delay @wejoncy, I totally missed it. We indeed need to pass it. Could you open a PR to fix it ?

SunMarc avatar Nov 21 '24 15:11 SunMarc

Sure. I opened a PR to resolve this. https://github.com/huggingface/accelerate/pull/3248

wejoncy avatar Nov 22 '24 02:11 wejoncy