Commit d326844
authored
Extend Api + VertexPlatform to support submitting training jobs + deployments (#1331)
## Summary
Added a first cut implementation of adding the rails to submit training
jobs & deployments with the Vertex platform. The implementation is
fairly basic atm (e.g 0 to 1 traffic rollouts, support for additional
deploy types like b/g). We can flesh these out in follow ups - the
current implementation allows us to start building a basic end to end
scaffolding and MVP.
Pulled in the Vertex SDK to trigger these. We needed the HTTP client for
the Vertex predict calls (to support custom & published models - this
isn't as easy to configure in the SDK) but using the SDK for training
and deploy is a lot more ergonomic.
## Testing
Tested using the local integration test that submits a training run,
creates and endpoint, uploads a model and deploys it to an endpoint. Was
able to validate that the model is up and can be hit for serving.
```
INFO a.c.i.cloud_gcp.VertexOrchestration - Submitting training job for test_ctr_model-1.0; Python pkg: gs://zipline-warehouse-models/builds/test_ctr_model-1.0.tar.gz; Model output dir: gs://zipline-warehouse-models/training_output/test_ctr_model-1.0/2025-12-08
INFO a.c.i.cloud_gcp.VertexOrchestration - Training job submitted successfully: projects/703996152583/locations/us-central1/customJobs/5518405205760147456
INFO a.c.i.c.VertexOrchestrationTest - Training job name: projects/703996152583/locations/us-central1/customJobs/5518405205760147456
INFO a.c.i.c.VertexOrchestrationTest - Waiting for training job. Current state: UNKNOWN
INFO a.c.i.c.VertexOrchestrationTest - Waiting for training job. Current state: PENDING
...
INFO a.c.i.c.VertexOrchestrationTest - Waiting for training job. Current state: RUNNING
...
INFO a.c.i.c.VertexOrchestrationTest - Step 2: Creating endpoint (if absent)...
INFO a.c.i.c.VertexOrchestrationTest - ================================================================================
INFO a.c.i.cloud_gcp.VertexOrchestration - Found existing endpoint: projects/703996152583/locations/us-central1/endpoints/8483716271198699520
INFO a.c.i.c.VertexOrchestrationTest - Endpoint resource name: projects/703996152583/locations/us-central1/endpoints/8483716271198699520
INFO a.c.i.c.VertexOrchestrationTest -
================================================================================
INFO a.c.i.c.VertexOrchestrationTest - Step 2: Deploying model (endpoint creation + model upload + deployment)...
INFO a.c.i.c.VertexOrchestrationTest - ================================================================================
INFO a.c.i.cloud_gcp.VertexOrchestration - Found existing endpoint: projects/703996152583/locations/us-central1/endpoints/8483716271198699520
INFO a.c.i.cloud_gcp.VertexOrchestration - Uploading model: test_ctr_model-1.0; Artifact URI: gs://zipline-warehouse-models/training_output/test_ctr_model-1.0/2025-12-08/model; Container Image: us-docker.pkg.dev/vertex-ai/prediction/xgboost-cpu.2-1:latest
INFO a.c.i.cloud_gcp.VertexOrchestration - Model upload completed: projects/703996152583/locations/us-central1/models/7906534239267454976
INFO a.c.i.cloud_gcp.VertexOrchestration -
Deploying model to endpoint. Details:
Model: projects/703996152583/locations/us-central1/models/7906534239267454976;
Endpoint: projects/703996152583/locations/us-central1/endpoints/8483716271198699520;
Replicas: 3-10
Machine type: n1-standard-4
INFO a.c.i.cloud_gcp.VertexOrchestration - Model deployment initiated. Operation: projects/703996152583/locations/us-central1/endpoints/8483716271198699520/operations/5139381969750065152
INFO a.c.i.c.VertexOrchestrationTest - Deployment ID: projects/703996152583/locations/us-central1/endpoints/8483716271198699520/operations/5139381969750065152
INFO a.c.i.c.VertexOrchestrationTest - Waiting for deployment. Current state: UNKNOWN
INFO a.c.i.c.VertexOrchestrationTest - Waiting for deployment. Current state: RUNNING
...
```
## Checklist
- [X] Added Unit Tests
- [ ] Covered by existing CI
- [X] Integration tested
- [ ] Documentation update
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Vertex AI orchestration: submit/monitor training jobs, create/manage
endpoints, deploy models, and query operation/job status.
* **New Utilities**
* Centralized HTTP client and prediction request/response helpers for
Vertex interactions.
* **API**
* Model platform API extended with training/deploy requests, operations,
and job status types.
* **Tests**
* Added comprehensive tests covering orchestration, model construction,
deployment, and status mapping.
* **Chores**
* Added GCP AI Platform client dependency.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 5a12a09 commit d326844
File tree
10 files changed
+917
-150
lines changed- cloud_gcp
- src
- main/scala/ai/chronon/integrations/cloud_gcp
- test/scala/ai/chronon/integrations/cloud_gcp
- online/src
- main/scala/ai/chronon/online
- test/scala/ai/chronon/online/test
- python/test/canary/models/gcp
- spark/src/test/scala/ai/chronon/spark
10 files changed
+917
-150
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
Lines changed: 134 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
0 commit comments