allennlp icon indicating copy to clipboard operation
allennlp copied to clipboard

Add a command to init AllenNLP project like spring-boot-starter

Open unikcc opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. I' a newbie for AllenNLP but I've fall in love with it to handle my own NLP task. But each time I start a new project, I have to copy the previous code of other AllenNLP project since I can't remember the file architecture. Then there will me much old code that is redundant for the new project and I have to delete so much lines that are task-specific. So I need a tool or just a command(e.g. allenlp init) to init a golden template project of AllenNLP, which contains some basic moduel for runing a AllenNLP code, like model, configuration, data processor and demo data folder, etc. I think this feature will make researcher much cheerful to work with AllenNLP.

Describe the solution you'd like Add a command to init a simplest AllenNLP project, just like spring-boot-start for java web developer.

Describe alternatives you've considered Or provide a demo code project of AllenNLP and I can easily access for it.

Additional context No

unikcc avatar Nov 30 '21 14:11 unikcc

Hi @unikcc, we have a template repo for this purpose: https://github.com/allenai/allennlp-template-config-files. You could also make your own template repo if that one is not exactly what you're looking for.

epwalsh avatar Dec 03 '21 20:12 epwalsh

I'd just like to add that I agree with @unikcc that this kind of a thing is a great boon for beginners. CLI templater tools (create-react-app and Leiningen's lein new are the ones I'm most familiar with), when done well, can get a user straight into the "real code" they want to write without requiring them to handle small but cognitively non-negligible things like, for example, renaming packages or deleting files they don't intend to use. (Templaters avoid those two problems by parameterizing package name and parameterizing modules so you can choose whether you want CI, tests, flake8/black/tox support, JSON-, Jsonnet-, or code-based execution, etc.)

Maybe it turns out this problem is better handled as a 3rd party lib than as an AllenNLP-owned functionality, but regardless I think this would be an awesome addition to the AllenNLP ecosystem. Perhaps I and anyone else who's interested could work towards implementing something like this?

lgessler avatar Dec 06 '21 04:12 lgessler

Maybe it turns out this problem is better handled as a 3rd party lib than as an AllenNLP-owned functionality

I think that's true. At least it would be easier to get up and running and faster to develop since you wouldn't have to wait for feedback from us to merge PRs. I'm happy to provide feedback / advice if you want it though.

epwalsh avatar Dec 06 '21 16:12 epwalsh