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

Allow Import Paths of Arbitrary Length #501

Closed
wants to merge 1 commit into from

Conversation

fabianlim
Copy link

@fabianlim fabianlim commented May 1, 2024

The import_module would be called only on a single level up from a submodule

  • i.e., submodule.submodule will work, and
  • and package.submodule.submodule will work
  • but submodule.submodule.submodule will not work

For example this will work

utils.extract_model_from_parallel
utils.save
utils.wait_for_everyone
utils.set_seed
utils.synchronize_rng_state
utils.install_xla 
utils.load_checkpoint_in_model
utils.load_and_quantize_model
utils.DeepSpeedPlugin
utils.DeepSpeedPlugin.deepspeed_config_process
accelerate.DeepSpeedPlugin.deepspeed_config_process

Also this will work, because it starts from accelerate

accelerate.DeepSpeedPlugin.deepspeed_config_process

But this will not work

utils.deepspeed.DummyOptim

This PR will allow the last example to work

@fabianlim
Copy link
Author

Closing because https://github.com/huggingface/accelerate/pull/2729/files seems to address the issue and has been merged. Can be reopened in future if there is interest.

@fabianlim fabianlim closed this May 2, 2024
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

Successfully merging this pull request may close these issues.

1 participant