Replies: 4 comments 3 replies
-
I agree
I think it's fair to override the LightningCLI to run
I personally have used this a lot. For example, you might want to save GPU costs so you train on a GPU cluster and then run test separately on CPU with a checkpoint on another machine.
Exactly
I think it could use the
Isn't this choice a responsibility of the
Yes, but it's expected that predict returns raw predictions (transformed by |
Beta Was this translation helpful? Give feedback.
-
I have looked further in particular at the methods Since these are methods of |
Beta Was this translation helpful? Give feedback.
-
Another point is that there should be a way to easily extend the support for new trainer functions. For example, in Flash we have the So the design should allow to: class FlashCLI(LightningCLI):
# adds support for trainer.finetune():
# python train.py finetune ...
... |
Beta Was this translation helpful? Give feedback.
-
If you are from the future, this is now done and merged to master! |
Beta Was this translation helpful? Give feedback.
-
In the discussion of pull request #6862 a comment from @carmocca was:
Adding subcommands to the CLI is possible, wouldn't require too much effort and be mostly compatible with what is currently implemented. But there needs to be some discussion to understand if a change like this makes sense. I think that having subcommands make sense only if there are normal use cases in which each subcommand is executed independently in different command line calls. Below are some of my thoughts. I have not used lightning's other methods apart from
fit
so I might be misunderstanding some things.tune
. From what I understandtune
is something to run beforefit
. If this is the case then I think it does not make sense to have it as a subcommand. It could be added as an init parameter.test
. In thepl_examples/basic_examples
test is always used afterfit
and just doing a print of the result. In lightning-transformers there is a flag to runtest
afterfit
. I haven't seen an example in whichtest
is run independently fromfit
. Though I do think it might make sense. It is possible to runfit
and then in a later point in time want to runtest
for a particular checkpoint. Or having a pretrained model and want to run a test for it potentially on different test sets. Iftest
is a subcommand some questions could be:test
and no possibility for doing something additional?validate
. I guess this is similar totest
though maybe less common to run independently from the command line.predict
. I think certainly makes sense to be a subcommand. But the purpose of runningpredict
depends on the particular model and use case. People might want to implement code to further process the output ofpredict
. This could be done by some method ofLightningCLI
.Beta Was this translation helpful? Give feedback.
All reactions