Skip to content

Script to help Contributing new templates #316

Open
@guptaaryan16

Description

@guptaaryan16

Clear and concise description of the problem

The idea is to provide a new script to make it easy for us to contribute templates to the code generator app. This should be like a python script which can be provided information in the form of a main.py file and helps in creating necessary changes in the code generator app based on the script for the necessary tasks.

Suggested solution

I propose something like this

main.py (to be submitted as template)

### DataLoaders 
train_dataloader = ...
test_dataloader = ...

## model 
class MyModel(nn.module):
      def __init___(self, ):
           pass

## Training Step
def step(engine, batch):
        ....

## Evaluation function
def evaluate():
        ....
   

Now using the comments like data loaders, we can separate the code through a script and then input the code below at specific places in the template and then use it for the template creation as well. This approach seems to be less tedious than making all the changes individually and hoping everything to work

Alternative

Also we can add a template-contributing.md guide that can help people who want to contribute new templates to the existing app.

cc @vfdev-5 @theory-in-progress

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions