MLServer icon indicating copy to clipboard operation
MLServer copied to clipboard

Allow to load settings and model-settings from CLI flags

Open adriangonz opened this issue 5 years ago • 3 comments
trafficstars

Currently, mlserver relies on having settings.json and model-settings.json files present or falling back to environment variables. It would be good to also allow users to specify these flags directly through the CLI.

For that, we should look for an integration between Pydantic (what we use to define the settings parameters) and some CLI library. We are currently using click for our CLI, but it doesn't seem that both projects are integrated.

adriangonz avatar Oct 23 '20 10:10 adriangonz

https://github.com/facebookresearch/hydra might be interesting option to look at (for unified config file / CLI arguments handling)

yonil7 avatar Aug 27 '21 08:08 yonil7

Thanks for sharing @yonil7! Do you know if hydra integrates with Pydantic to expose CLI options?

adriangonz avatar Aug 27 '21 08:08 adriangonz

I don't know about Pydantic integration. It just seems like a promising library to me that might take the pain from CLI args / config file args unification.

yonil7 avatar Aug 27 '21 10:08 yonil7