Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas for Code Generator #177

Open
oke-aditya opened this issue Sep 27, 2021 · 7 comments
Open

Ideas for Code Generator #177

oke-aditya opened this issue Sep 27, 2021 · 7 comments
Labels
enhancement New feature or request hacktoberfest Hacktoberfest

Comments

@oke-aditya
Copy link

Clear and concise description of the problem

A list of few new features that can make Code Generator super awesome

  1. Side by side comparison of pytorch vs ignite code ! So code-generator works for pure pytorch too, a researcher will love that.
  2. Ability to choose models, say from detection people can choose retinanet, SSD, etc.
  3. HuggingFace intergration! How nice to transparently fine tune HF models (Maybe choose a task and then a model), an awesome starter for many NLP applications.
  4. A direct torch.hub connection. Maybe all the models listed in torch.hub can be easily trained?

Suggested solution

We can probably go one feature at a time and iterate over couple of releases.

Maybe we should discuss this further over GitHub / discord

@sdesrozis
Copy link

sdesrozis commented Sep 28, 2021

@oke-aditya Thanks a lot for sharing these ideas that could really be a great improvement !

The great thing would be if you were willing to participate ! :-)

My thoughts

  1. That would be interesting but this generator was initiated for pytorch-ignite firstly.
  2. Yep, the main point is to have a detection usecase. We are working on mAP, hope we will finish soon !
  3. I agree !!
  4. That sounds great ! Good idea !

@vfdev-5 vfdev-5 added the enhancement New feature or request label Sep 28, 2021
@oke-aditya
Copy link
Author

I would be willing to participate 😄 If few more people are interested from discord, it would be easy to team up and tackle in sprints

@vfdev-5 vfdev-5 added the hacktoberfest Hacktoberfest label Oct 1, 2021
@sayantan1410
Copy link
Contributor

Hey, I would like to work on implementing this

4. A direct torch.hub connection. Maybe all the models listed in torch.hub can be easily trained?

Can you please guide me on how to start with this.

@vfdev-5
Copy link
Member

vfdev-5 commented Jan 3, 2022

@sayantan1410 I think we still need to discuss the scope of this item. @oke-aditya can you please expand a bit more the idea ?

@sayantan1410 if you would like to tackle something more well defined, for example, there is #173 which is still open. Tackling this issue IMO you'll get a better understanding of the app and the code. What do you think ?

@sayantan1410
Copy link
Contributor

@vfdev-5 Yeah, that is great, I will continue with #173.

@oke-aditya
Copy link
Author

Hi! and sorry for the delay. I was not well yesterday.
@sayantan1410 and @vfdev-5 Let me elaborate the scope.

Connecting torch.hub and code generator.

torch.hub provides a very good support for Open source libraries. All the libraries need a hubconf.py which would provide the models. Note that all classification models in torchvision are provided in hub. And there are many models which have hub support. E.g. YOLO-P, YOLOv5, Tacotron, etc

Torch hub internally clones the entire Github repo, which allows easy model building. Note that the model which is built is a dynamic graph (not a static one, like JIT scripted from Torchscript). This makes it feasible to re-train or fine-tune with pretrained weights. Torch hub does the hard part of model_building. It's hard to write and verify models from scratch.

What ignite code-gen can do?

Ignite codegen can provide boiler plate and the training script, which allows to train on any new dataset (and also with some standard datasets available in torchvision like VOC / COCO).
This is basically a rewrite of train.py with ignite. (Although we would need to verify if good results can be obtained with the new training recipe, which is slightly hard). Since ignite takes care of distributed training, etc it would be easier to train.

This makes retraining of models very simple, and with config.yaml (which has good defaults) it would be easy to fine-tune on custom data. (Maybe by passing data_dir as parameter?)

P.S.
We could all meet over discord to discuss as well.

@sayantan1410
Copy link
Contributor

@oke-aditya It will be more helpful for me to understand if we can have a meet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest Hacktoberfest
Projects
None yet
Development

No branches or pull requests

4 participants