bentoml / bentoctl

Fast model deployment on any cloud 🚀
https://bentoml.com
Other
175 stars 30 forks source link

feat (operator): git cloning operators during addition. #15

Closed jjmachan closed 2 years ago

jjmachan commented 2 years ago
jjmachan commented 2 years ago

Lets me know what you think, I'll add tests to this PR too before merge.

jjmachan commented 2 years ago

hey @yubozhao I've made the refactor so that the operator CLI does not have any change. users can still use bentoctl operator add ... for the different options we have. With the python API however, we have to be more explicit. This is to avoid unexpected gotchas for the user. for eg. if the user has a path like 'jithin/aws-lambda' and he tries to install via the Github repo name which also goes to the same name, there is a conflict. In the CLI we can use precedence to solve this (official operator name > path > github repo > git url) but I wanted to make the python api more explicit. Plus this makes our functions more modular.

let me know what you think of this approach.

yubozhao commented 2 years ago

hey @yubozhao I've made the refactor so that the operator CLI does not have any change. users can still use bentoctl operator add ... for the different options we have. With the python API however, we have to be more explicit. This is to avoid unexpected gotchas for the user. for eg. if the user has a path like 'jithin/aws-lambda' and he tries to install via the Github repo name which also goes to the same name, there is a conflict. In the CLI we can use precedence to solve this (official operator name > path > github repo > git url) but I wanted to make the python api more explicit. Plus this makes our functions more modular.

let me know what you think of this approach.

Let's keep the local_registry.add. We wan to make sure this is easy for user access with python api as well. We don't want them to implement the logic themselves

jjmachan commented 2 years ago

I've made the changes.