How to write pytest tests for pytorch lightning custom callbacks? #13116
Unanswered
malfonsoarquimea
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
Can we imitate the pl tests or something? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I am currently trying to write a set of pytest tests for our codebase, and I have some questions.
My current approach to testing that the training is working as expected was to launch a training process within the pytest test using
subprocess.run()
with a given set of arguments (in the form of a config file) and then checking that the training process produces the expected files (checkpoints mostly) at the expected directories.I think that this approach is not appropriate, so I would like to know If any of you could suggest a better way of testing the custom callbacks that I wrote that run when training
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions