Add script to create new projects
Ricocotam opened this issue · 2 comments
Feature
An additional script to create a new project architecture
Motivation
I recently did my first project using bootstrap and it wasn't easy to figure what was expected for loss' input/output. Automatically generating the whole architecture with basic examples is simpler than writing a full documentation/tutorial and would provide an easy way to start a project.
Example of use
I imagine something like :
python -m bootstrap.new --path /path/to/new/project --datasets --criterion --network --metrics
would create directories for custom criterion/network/metrics but not for engine or viewspython -m bootstrap.new --path /path/to/new/project --complete
would create any subdirectories (datasets, criterion, network, metrics, views, engine, optimizer for now)
I suggest in both cases to have a default option file generated with all basic option to be filled (e.g. : imports for models, miscellaneous with seed & cuda, ...) and for each sub-directory created, add an example file. For example, if "criterion" option is picked we also create in the directory models/criterions a mycriterion.py
file with an empty class just having the forward function filled with arguments and a factory.py
file with an example of how to create a criterion in the factory (namely, return the built criterion ; this seems stupid but for datasets it's more complicated)
Good idea. It remembers me of https://book.cakephp.org/2/en/console-and-shells/code-generation-with-bake.html
I guess we can close this :)