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.
Uh oh!
There was an error while loading. Please reload this page.
-
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
fitso I might be misunderstanding some things.tune. From what I understandtuneis 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_examplestest is always used afterfitand just doing a print of the result. In lightning-transformers there is a flag to runtestafterfit. I haven't seen an example in whichtestis run independently fromfit. Though I do think it might make sense. It is possible to runfitand then in a later point in time want to runtestfor a particular checkpoint. Or having a pretrained model and want to run a test for it potentially on different test sets. Iftestis a subcommand some questions could be:testand no possibility for doing something additional?validate. I guess this is similar totestthough maybe less common to run independently from the command line.predict. I think certainly makes sense to be a subcommand. But the purpose of runningpredictdepends 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