Description
for script and interactive modes, we need a way to trigger model builds, deployments & monitoring from the ds.publish() call. in remote mode, ds.publish(deploy=True) does the following:
=== Dotscience remote publish ===
Found project mnist-keras-tf.
* Uploading output/model files....... done
-> Dotscience run: https://[redacted]-dotscience.com/project/b0ca2640-01dd-42cb-b505-3e7f281b9cfb/runs/summary/f3e055f8-187e-4933-a748-bb551586f752
* Building docker image................ done
-> Docker image: quay.io/dotscience-playground/models:f4d65f0c-8768-4cc3-995b-b14d038f97ae-0a296917-fa0a-4c6a-ba36-68002f38bd60
* Deploying to Kubernetes... done
-> Endpoint: https://b6185b30.app.cloud.dotscience.net/v1/models/model:predict
* Creating Grafana dashboard... done
-> Dashboard: https://monitoring.[redacted]-dotscience.com/d/064e26cf-1b3a-42f7-be2a-e7474ff84cfe/monitoring-model-mnistkerastf
Waiting for model endpoint to become active.... done
=== Dotscience publish complete ===
Need something equivalent for script and interactive modes. Possibly this could go hand-in-hand with switching those modes to use an explicit, synchronous API for runs rather than waiting for runs to be picked up.
Design question: should the build, publish, monitor APIs be exposed on the agent, so dotscience python lib talks to local container on the runner? Or should we plumb in creds so the python lib can talk directly to the gateway?
Alaric's opinion: "No" to both. Just set a flag in the model metadata that the gateway notices and decides to trigger the build and deploy when it registers the model in the commit watcher. That way there's no need to block the python library until the model is uploaded, no issues when connectivity to the gateway is flaky, etc.