Open GoogleSheets opened 2 years ago
Looks great so far. I noticed a couple things when I tested it out:
pip installable
so instead of python dojocli/cli.py
it would be something like dojo-cli runmodel
etccaptions.txt
file that would have captions for them.[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 parametersdescribe
command.get parameters
command (could name it something more elegant)get output variables
command.NOTE: #9-11 are probably most important.
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.
Here is an example of accessories for a model with captions: https://dojo-test.com/dojo/accessories/33cf1a60-2544-420f-ae08-b453a9751cfc
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)
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:
@GoogleSheets thanks for the update on this! Will take a look--let's plan to circle up on next steps on Monday.
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
versions
dojo-
bash -c
e.g. Flee and Topoflowmain
branch default)@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.
@brandomr Noting a few issues or updates after seeing demo:
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.
Tasks
unix://var/run/docker.sock
) to configuration file.runmodel
could probably return this and print it in the console after the run.Issues
chown clouseau:clouseau
on those folders in the container; but there should be a way to specify the folder owner when running the container.python -m build
has been screwy on Linux; it does something weird with the path.