-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can create_multi_gpu_supervised_trainer inherit from monai's SupervisedTrainer instead of Ignite's create_supervised_trainer? #5910
Comments
Hi @chezhia , For multi-gpu training with Thanks. |
Thanks for the response. I ended up creating a version of multi gpu trainer that is derived from SupervsiedTrainer and it works for my use cases, but I think there is room for improvement: `def SupervisedTrainer_multi_gpu( max_epochs: int,
|
I honestly don't use these routines myself, for multi-GPU I've been using bundles which have a variation of this script to essentially monkey-patch in the needed components. Outside of bundles perhaps we should deprecate these routines and add the functionality to the trainer/evaluator classes. CC @wyli |
Most of the routines I have looked at are wrappers for .py scripts and do not work in a jupyter notebook environment. The solution I posted works for notebooks and would like something similar in the official release without having to worry about local rank, world size etc. |
|
Is your feature request related to a problem? Please describe.
I was trying to use multi_gpu_supervised_trainer in my existing workflow that currently uses monai's SupervisedTrainer, but the switch was not straightforward because of the create_multi_gpu_supervised_trainer inheriting directly from Ignite's trainer class. There are also no proper tutorials explaining how to use this multi_gpu class for more realistic workflows.
Describe the solution you'd like
Ideally, I'd expect the SupervisedTrainer to support multi-gpu workloads without needing a separate class.
Describe alternatives you've considered
I am considering other pytorch wrappers like lightning or catalyst. The tutorials seem to use different approaches for multi-gpu workloads and I'd really like to see a default approach for this. Since monai uses ignite as the base class for its trainer implementation, I thought it is the default approach, but it's not clear.
Additional context
What is the preferred approach in MONAI to do multi-gpu training?
The text was updated successfully, but these errors were encountered: