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

Precision Plugins should be part of Training Type Plugins #7324

Closed
ananthsub opened this issue May 3, 2021 · 3 comments · Fixed by #10570 or #10596
Closed

Precision Plugins should be part of Training Type Plugins #7324

ananthsub opened this issue May 3, 2021 · 3 comments · Fixed by #10570 or #10596
Assignees
Labels
help wanted Open to be worked on let's do it! approved to implement plugin refactor
Milestone

Comments

@ananthsub
Copy link
Contributor

ananthsub commented May 3, 2021

🚀 Feature

Precision Plugin should be a property of the training type plugin, not the accelerator. these can overlap, and interleaving sequences of operations across the two in the accelerator can be challenging to get fully right.

cc @justusschock @awaelchli @kaushikb11 @tchaton

todo: fill out in more detail

Motivation

This would make management of things like this easier:

Pitch

Alternatives

Additional context

@ananthsub ananthsub added feature Is an improvement or enhancement help wanted Open to be worked on labels May 3, 2021
@ananthsub ananthsub added this to the v1.4 milestone May 3, 2021
@ananthsub ananthsub changed the title Precision Plugins should be part of Training Type Plugins [wip] Precision Plugins should be part of Training Type Plugins May 3, 2021
@justusschock
Copy link
Member

@ananthsub This was discussed quite a few times already now and I think the agreement was to change this, when we maybe also move the accelerator inside the training type plugin

cc @SeanNaren

@SeanNaren
Copy link
Contributor

Thanks @ananthsub for making this. I recall doing an initial POC of this a few months back and realised there is quite some work to make this change when being careful of BW compat.

It would also make these 'shell' classes obsolete, like we see with deepspeed: https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/plugins/precision/deepspeed_precision.py

all the above logic should live within the TrainingTypePlugin really. We do have to be careful though, I do like distinctions to remain (precision logic to be separate if possible).

@carmocca
Copy link
Contributor

carmocca commented Jul 8, 2021

It might be helpful to compare how the implementation of one training type or plugin would look if this was done. As it stands, it is not clear to me exactly what the benefits of this are

@four4fish four4fish self-assigned this Nov 16, 2021
@ananthsub ananthsub changed the title [wip] Precision Plugins should be part of Training Type Plugins Precision Plugins should be part of Training Type Plugins Nov 17, 2021
@four4fish four4fish reopened this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment