Create a docstring generator
Please read the topic categorydescriptionto understand what this is all aboutDescriptionApplications like GitHub’s CoPilot can automatically generate docstrings from a class or function name. The goal of this project is to fine-tune a Transformer like CodeT5 to do this ourselves!Model(s)Generating docstrings from source code can be modelled as a sequence-to-sequence task, so T5 models are a good starting point here:Salesforce/codet5-baseDatasetsA good dataset for this task iscode_search_net, but feel free to find alternative datasets if you can’t find your favourite programming language there.ChallengesModels like CodeT5 are rather large and you’ll need to think about what metrics one should use for this type of task.Desired project outcomesCreate a Streamlit or Gradio app onSpacesthat can automatically generate a docstring from a class of function name in your favourite programming language!Don’t forget to push all your models and datasets to the Hub so others can build on them!Additional resourceshttps://arxiv.org/abs/2109.00859v1https://blog.einstein.ai/codet5/Discord channelTo chat and organise with other people interested in this project, head over to ourDiscordand:Follow the instructions on the#join-coursechannelJoin the#docstring-generatorchannelJust make sure you comment here to indicate that you’ll be contributing to this project
2021-11-15T08:13:06Z
I find this task interesting and would like to find out more about how to contribute: for example, would fine-tuning for PL to NL (code comment/docstring) generation for Python be a suitable case for this project?
2021-11-15T08:49:43Z
I actually did this by fine-tuning CodeT5 for generating docstrings for Ruby code.The model is on the hub:nielsr/codet5-small-code-summarization-ruby · Hugging FaceThe notebook used to fine-tune T5 can be foundhere.
2021-11-15T14:13:15Z
Hey@stmnkthis is a super cool idea and definitely worth exploring! And thanks to@nielsryou have a nice template to work fromI’ve also created a Discord channel (see topic description) for you and others in case you need it
2021-11-15T14:38:17Z
Thank you for the links, they are really helpful!
2021-11-15T14:39:33Z
Thank you!