Comments (2)
If you define your cli as cli = LightningCLI(pl.LightningModule, BoringDataModule, subclass_mode_model=True)
or cli = LightningCLI(datamodule_class=BoringDataModule)
and then run:
python prepare_config.py fit --model DemoModel --print_config
you get the expected result. If you define the cli as you show, then you need to drop the --model DemoModel
for it not to error and give you the expected result.
I think what the documentation is suggesting when it shows the example you're using is that if no model is passed to the LightningCLI
-- "By default, no model is selected, meaning the printed config will not include model settings. To get a config with the default values of a particular model would be: python main.py fit --model DemoModel --print_config
". I think what isn't clear is that the cli setup is different from what is shown directly above with the hardcoded DemoModel
passed in.
from pytorch-lightning.
If you define your cli as
cli = LightningCLI(pl.LightningModule, BoringDataModule, subclass_mode_model=True)
orcli = LightningCLI(datamodule_class=BoringDataModule)
and then run:python prepare_config.py fit --model DemoModel --print_config
you get the expected result. If you define the cli as you show, then you need to drop the
--model DemoModel
for it not to error and give you the expected result.I think what the documentation is suggesting when it shows the example you're using is that if no model is passed to the
LightningCLI
-- "By default, no model is selected, meaning the printed config will not include model settings. To get a config with the default values of a particular model would be:python main.py fit --model DemoModel --print_config
". I think what isn't clear is that the cli setup is different from what is shown directly above with the hardcodedDemoModel
passed in.
@synapticarbors Thanks! Now I totally get it.
from pytorch-lightning.
Related Issues (20)
- [fabric.example.rl] Not support torch.float64 for MPS device
- Another profiling tool is already active
- Add truncated backpropagation through time (TBPTT) example HOT 1
- Handle gradient accumulations at the end of epoch differently HOT 1
- TransformerEnginePrecision _convert_layers(module) fails for FSDP zero2/zero3
- EarlyStopping override disrupts wandb logging frequency
- Show how to over-fit batches for real HOT 2
- Fabric example trainer fails with validation
- Logging with Fabric using steps HOT 2
- Load from checkpoint doesn't load model for inference HOT 1
- Cannot correctly parse some import paths when using config file for LightningCLI HOT 2
- error: Parser key "data": Problem with given class_path 'my_class_path': __args__
- Pinning the `lightning` package doesn't pin the `pytorch_lightning` package HOT 2
- Smoothing in tqdm progress bar has no effect
- LearningRateFinder during training
- Make distributed checkpoint saving atomic HOT 2
- Gathering a list of strings from multiple devices using Fabric HOT 1
- Teardown trying to copy "meta" tensors HOT 2
- Multiple subclassing levels required to use LightningDataModule in LightningCLI HOT 2
- [Fabric Lightning] Named barriers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-lightning.