SeldonIO / MLServer

An inference server for your machine learning models, including support for multiple frameworks, multi-model serving and more
https://mlserver.readthedocs.io/en/latest/
Apache License 2.0
693 stars 179 forks source link

Allow to load settings and model-settings from CLI flags #51

Open adriangonz opened 3 years ago

adriangonz commented 3 years ago

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.

yonil7 commented 3 years ago

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

adriangonz commented 3 years ago

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

yonil7 commented 3 years ago

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.