Trainer.fit_loop #10758
Replies: 1 comment
-
Hey @eladar, The Loop documentation is here: https://pytorch-lightning.readthedocs.io/en/stable/extensions/loops.html And here is the API for the FitLoop: https://pytorch-lightning.readthedocs.io/en/stable/api/pytorch_lightning.loops.FitLoop.html#pytorch_lightning.loops.FitLoop
You are entirely right, I am wrapping the default fit_loop of the Trainer with my KFold Loop and replacing it with the fit_loop attribute on the Trainer. When you call trainer.fit(...), this would now execute the I hope it is more clear. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/PyTorchLightning/pytorch-lightning/blob/b57feccbff57271144dae70a82b1948f7a4cf7af/pl_examples/loop_examples/kfold.py#L256
I really like the new FitLoop class. I've started with the KFold example and had hard time to figure out what going on in this line. I've look around the documentation and couldn't find any mention for trainer.fit_loop.
Looking into the Trainer code it seems that it has a default fit_loop property (not mentioned elsewhere?). if I got it correct, this line replace the trainer's default loop with the kfold loop, not before using the default loop as an inner loop for the kfold class. ?
It would a good idea to add a comment here.
Beta Was this translation helpful? Give feedback.
All reactions