-
Notifications
You must be signed in to change notification settings - Fork 0
[CLI][SDK] Add supports to CServe V3 #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anandj91
reviewed
Sep 2, 2025
anandj91
reviewed
Sep 2, 2025
anandj91
reviewed
Sep 2, 2025
anandj91
reviewed
Sep 2, 2025
anandj91
reviewed
Sep 2, 2025
anandj91
reviewed
Sep 2, 2025
anandj91
reviewed
Sep 2, 2025
anandj91
reviewed
Sep 2, 2025
57ae722
to
7924f56
Compare
michaelshin
approved these changes
Sep 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with me
anandj91
requested changes
Sep 10, 2025
anandj91
reviewed
Sep 10, 2025
centml/sdk/api.py
Outdated
Comment on lines
73
to
78
def create_inference_v2(self, request: CreateInferenceDeploymentRequest): | ||
return self._api.create_inference_deployment_deployments_inference_post(request) | ||
|
||
def create_inference_v3(self, request: CreateInferenceV3DeploymentRequest): | ||
return self._api.create_inference_v3_deployment_deployments_inference_v3_post(request) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need these two. we should only allow creating v3 deployments
anandj91
approved these changes
Sep 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes Made
SDK Updates (
centml/sdk/api.py
)CServe v3 Support
CreateCServeV3DeploymentRequest
importget_cserve()
with auto-detection (tries V3 first, falls back to V2)create_cserve()
to default to V3 API (breaking change)create_cserve_v2()
methodupdate_cserve()
with version validation and unified interfaceInference v3 Support
CreateInferenceV3DeploymentRequest
importget_inference()
with auto-detection (tries V3 first, falls back to V2)create_inference()
to default to V3 APIcreate_inference_v2()
andcreate_inference_v3()
methodsupdate_inference()
with version validation and unified interfacedetect_inference_deployment_version()
CLI Updates (
centml/cli/cluster.py
)CSERVE_V3
andINFERENCE_V3
deployment type mappingscserve
andinference
commands default to V3_get_replica_info()
helper for field mapping (min_scale
↔min_replicas
)Examples
create_cserve.py
to use V3 by default with rollout strategy demonstrationcreate_inference.py
to use V3 by default with V3-specific featuresKey Features
min_scale
,max_scale
min_replicas
,max_replicas
max_surge
,max_unavailable
initial_replicas
🧪 Testing Results
🔬 Inference v3 Creation & Auto-Detection
🖥️ CLI Display - Inference v3
🔬 CServe v3 Creation & Testing
🖥️ CLI Display - CServe v3
🔬 Backward Compatibility - V2 Still Works
🔧 Version Detection Working
📝 Update Functionality - V3 Updates Working
🛡️ Cross-Version Validation - Error Handling
$ python -c "Cross-version validation tests..." Testing cross-version validation (should fail)... ✅ V2→V3 validation working correctly: Deployment 4238 is Inference V2, but you provided a V3 request. Please use CreateInferenceDeploymentRequest instead. ✅ V3→V2 validation working correctly: Deployment 4239 is Inference V3, but you provided a V2 request. Please use CreateInferenceV3DeploymentRequest instead. ✅ V2→V3 validation working correctly: Deployment 4241 is CServe V2, but you provided a V3 request. Please use CreateCServeV2DeploymentRequest instead. ✅ V3→V2 validation working correctly: Deployment 4240 is CServe V3, but you provided a V2 request. Please use CreateCServeV3DeploymentRequest instead.
🔄 CLI After Updates - Field Mapping Working
🧹 Testing Summary
🎯 CServe & Inference V3 in Action - CLI & SDK Snippets
⚡ SDK Examples
1. Inference V3 with Rollout Strategy (New Default)
2. CServe V3 with Rollout Strategy (Default)
3. Auto-Detection in Action
4. V2 Backward Compatibility
Migration Guide
For SDK Users
For CLI Users
Rollout Strategy Note
V3 rollout parameters (
max_surge
,max_unavailable
) are accepted during creation and influence platform orchestration behavior for zero-downtime deployments, but are not returned in deployment responses (by platform design).Backward Compatibility ✅
create_inference_v2
,create_cserve_v2
)The test outputs above demonstrate that: