jataware / dojo-cli

A command-line interface to for black box model execution.
MIT License
0 stars 0 forks source link

Outstanding development tasks and issues for Dojo-CLI #1

Open GoogleSheets opened 2 years ago

GoogleSheets commented 2 years ago

Tasks

Issues

brandomr commented 2 years ago

Looks great so far. I noticed a couple things when I tested it out:

  1. There seems to be an unnecessary extra directory layer inside the run directory...can this be avoided?
  2. Can we write the parameters file used back out to the run result directory for posterity's sake?
  3. We should try to do some kind of model search where you can put in a word/keyword and see a list of ranked matching models
  4. We should give the model container a name that is somewhat descriptive (e.g. the model name with some timestamp or something)
  5. we should aim to have this pip installable so instead of python dojocli/cli.py it would be something like dojo-cli runmodel etc
  6. Are accessories being sucked out of the container? If not, we should grab them and possibly to to write a captions.txt file that would have captions for them.
  7. I don't think dockerhub auth is needed--all these images should be public
  8. We might want to consider some kind of "interactive mode" which asks the user a set of questions such as:
    • what kind of model are you looking for? -> user enters some text
    • select model from list -> user enters a number
    • select from options [describe model, choose parameters] -> user picks from 2 options and either learns more about the model from its description/maintainer info or gets to set parameters
    • user is iteratively asked to set each parameter (or shown the default)
  9. We should definitely have a mechanism to get the model description (sanitized of the UAZ ontologies). This is a describe command.
  10. We should show users parameter descriptions so they can make good choices somewhere. This is a get parameters command (could name it something more elegant)
  11. We should show users output variable descriptions so they can interpret the output. This is a get output variables command.

NOTE: #9-11 are probably most important.

brandomr commented 2 years ago

For #1 withCHIRPS-GEFS Monthly the structure is:

runs/
   CHIRPS-GEFS Monthly/
      20212404132416/
         ddd12a2c-2939-44f6-91e1-6d6146752b8a/
            chirps.csv

Where ddd12a2c-2939-44f6-91e1-6d6146752b8a is the id of the outputfile. Do we need this? I think it is going to confuse people.

brandomr commented 2 years ago

Here is an example of accessories for a model with captions: https://dojo-test.com/dojo/accessories/33cf1a60-2544-420f-ae08-b453a9751cfc

brandomr commented 2 years ago

Once Docker is installed on Linux or Mac you can add the current user to the Docker group with:

sudo groupadd docker
sudo gpasswd -a $USER docker

then log out/back in so changes can take effect. This should be done after installing Docker (include this in README, as well as link to Docker install instructions)

GoogleSheets commented 2 years ago
1. There seems to be an unnecessary extra directory layer inside the run directory...can this be avoided?

Changed this folder to output. Need to test a bit more.

2. Can we write the parameters file used back out to the run result directory for posterity's sake?

Done.

3. We should try to do some kind of model search where you can put in a word/keyword and see a list of ranked matching models

TODO.

4. We should give the model container a name that is somewhat descriptive (e.g. the model name with some timestamp or something)

Done. ModelNameDatetimeStamp e.g. stochasticgriddedconflictmodel20211209164335

5. we should aim to have this `pip installable` so instead of `python dojocli/cli.py` it would be something like `dojo-cli runmodel` etc

Done, got build to work on by specifying sdist and wheel: python -m build --sdist ~/source/repos/dojo-cli --wheel

6. Are accessories being sucked out of the container? If not, we should grab them and possibly to to write a `captions.txt` file that would have captions for them.

Yes, try --model="Stochastic Gridded Conflict Model". Captions written to accessories-captions.json

7. I don't think dockerhub auth is needed--all these images should be public

Correct; dockerhub auth is removed.

8. We might want to consider some kind of "interactive mode" which asks the user a set of questions such as:

   * what kind of model are you looking for? -> user enters some text
   * select model from list -> user enters a number
   * select from options `[describe model, choose parameters]` -> user picks from 2 options and either learns more about the model from its description/maintainer info or gets to set parameters
   * user is iteratively asked to set each parameter (or shown the default)

Need to decide if it is worth the effort.

9. We should definitely have a mechanism to get the model description (sanitized of the UAZ ontologies). This is a `describe` command.

describe command implemented

10. We should show users parameter descriptions so they can make good choices somewhere. This is a `get parameters` command (could name it something more elegant)

printparams implemented

11. We should show users output variable descriptions so they can interpret the output. This is a `get output variables` command.

printoutputs implemented

See the updated README.MD for examples of describe, printparams, and printoutputs.

"Stochastic Gridded Conflict Model" is a good test model because it has multiple accessory and output files. printparams does not find any example params in the command_raw, so I run it with no params it apparently uses default values.

Other items:

brandomr commented 2 years ago

@GoogleSheets thanks for the update on this! Will take a look--let's plan to circle up on next steps on Monday.

brandomr commented 2 years ago

I think we should rename dojocli to just dojo for the install.

I think we should change printparams to parameters and printoutputs to just `outputs.

We probably should have a versions command to list versions and commit messages; then --version option for the other commands.

brandomr commented 2 years ago
  1. Adding version flag
  2. Adding listversions command
  3. Write logs.txt to run directory
  4. Quotes around all the things
  5. Stop/remove container after run completes
  6. Clean up README
  7. Move repo to "dojo-modeling" organization on Github
  8. attach to model (default to true)
GoogleSheets commented 2 years ago

Updated TODO

@brandomr

GoogleSheets commented 2 years ago

@brandomr Repo is moved to https://github.com/dojo-modeling/dojo-cli but I will continue updating this issue or we can create a new issue there.

The detached container logging is outstanding.

GoogleSheets commented 2 years ago

@brandomr Noting a few issues or updates after seeing demo:

GoogleSheets commented 2 years ago

PyPi 0.1.3 published with --results command to check if a detached model run is complete. If it is, the outputs and logs will be copied locally and the container removed.