Closed philippmwirth closed 1 year ago
It might not be a big problem, but I found that we don't have a CLI keyword for uploading metadata . Instead, if upload
is neither thumbnails
nor full
, then there is the metadata upload.
This has lead to us using very different keywords for metadata upload. In some documentation it is called metadata
, in other meta
, in other None
. Should we try to make this consistent and enforce a single valid keyword?
Not planned.
Use structured configs to enforce types in command-line tool
Using structured configs is a better solution for #575. However, it requires
dataclasses
which is only available from Python 3.7. There is a backport for dataclasses so we could also try this but we should be careful and test thoroughly.Another option would be to "hack" something together with different config files for Python 3.6 and Python >= 3.7.
Docs for structured configs with hydra: https://hydra.cc/docs/tutorials/structured_config/schema/
For my experiments I used the following code which enforced types for the
download_cli
:lightly/cli/config/config.yaml
:lightly/cli/config/config.py
:In
lightly/cli/download_cli.py
: