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

add cli command that generates an empty config file #366

Open
Tracked by #614
Luke-Poeppel opened this issue Jun 17, 2021 · 4 comments
Open
Tracked by #614

add cli command that generates an empty config file #366

Luke-Poeppel opened this issue Jun 17, 2021 · 4 comments
Labels
ENH: enhancement enhancement; new feature or request

Comments

@Luke-Poeppel
Copy link
Contributor

Luke-Poeppel commented Jun 17, 2021

The Auto-Annotate tutorial suggests downloading a given config.toml file. But is there currently a tool for creating a template config file, e.g. something like vak make /test_a/config.toml --train_mode True or vak make /test_a/config.toml --predict_mode True with empty values? Maybe this exists and I missed it in the source –– as such, I'm not sure if this is a docs or feature request 😄

@NickleDave NickleDave added the ENH: enhancement enhancement; new feature or request label Jun 18, 2021
@NickleDave
Copy link
Collaborator

Hi @Luke-Poeppel
No there is not currently a way to generate a config file through the cli, but yes I have thought about it and agree it would be nice to have.

I haven't raised an issue about it though, so now this is that issue, thank you

I guess I would favor the command vak init with flags '--prep', '--train', '--learncurve', etc

Here's how poetry does it (for future reference):
https://github.com/python-poetry/poetry/blob/b753aaf4c3c08ef0e54941a6616fe318fdf4f6e4/poetry/console/commands/init.py

@NickleDave NickleDave changed the title A config.toml template? add cli command that generates an empty config file Jun 20, 2021
@NickleDave
Copy link
Collaborator

NickleDave commented Jun 20, 2021

a couple further thoughts on this:

  • I think I would rather have a command that simply generates an "empty" config file
    • instead of having a series of interactive questions.
    • In my experience it's easier to just open up the file in a text editor and cut and paste things by hand.
    • Some people who live in the terminal might use an interactive Q&A at the prompt, but most people wouldn't (I think)
  • would prefer an explicit name for the command
    • init was a bad idea (mine) because we're not initializing anything
    • don't want to clash with config because that would be natural for configuring the behavior of vak itself
    • so I guess a command name should be something like makeconfig or maketoml, prefer the former because not everyone knows what a "toml" is.
    • Or, more verbose: $vak configfile make train
  • a command like vak configfile make train implies we now have multiple sub-parsers though
    • an additional point to consider is that in my mind the cli should stay as simple as possible;
    • the goal is for anyone who needs to do anything more complex to be able to do so with the actual API of the library, not to have a super-fancy cli
    • but still worth the extra cli functionality here, because it is annoying to not just have config files at hand

@NickleDave
Copy link
Collaborator

NickleDave commented Mar 16, 2022

Coming back to this.

Noticing during tutorials that there's a lot of cutting-and-pasting of links.
E.g. a lot of the options in the eval and predict section are basically fixed links that come from a results_dir.

Would be nice to be able to say

vak config predict --results_dir ./path/to/train_results/results_20221312_100439

and get a config with all those options already filled in

@NickleDave
Copy link
Collaborator

NickleDave commented Mar 16, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENH: enhancement enhancement; new feature or request
Projects
None yet
Development

No branches or pull requests

2 participants