Skip to content

Commit 75d7c3b

Browse files
authored
fix: remove unused bentoml references (#1412)
1 parent 55c6525 commit 75d7c3b

File tree

20 files changed

+82
-89
lines changed

20 files changed

+82
-89
lines changed

deploy/cloud/api-store/ai_dynamo_store/api/components.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class DynamoComponentVersionApiSchema(BaseModel):
165165

166166
class DynamoComponentVersionManifestSchema(BaseModel):
167167
service: str
168-
bentoml_version: Optional[str] = None
168+
dynamo_version: Optional[str] = None
169169
apis: Dict[str, DynamoComponentVersionApiSchema]
170170
size_bytes: int
171171

@@ -179,7 +179,7 @@ def _validate_manifest(v):
179179

180180

181181
class DynamoComponentVersionSchema(ResourceSchema):
182-
bento_repository_uid: str
182+
dynamo_repository_uid: str
183183
version: str
184184
description: str
185185
image_build_status: ImageBuildStatus
@@ -205,9 +205,9 @@ class DynamoComponentVersionFullSchema(DynamoComponentVersionSchema):
205205

206206

207207
class DynamoComponentSchema(ResourceSchema):
208-
latest_bento: Optional[DynamoComponentVersionSchema]
209-
latest_bentos: Optional[List[DynamoComponentVersionSchema]]
210-
n_bentos: int
208+
latest_dynamo: Optional[DynamoComponentVersionSchema]
209+
latest_dynamos: Optional[List[DynamoComponentVersionSchema]]
210+
n_dynamos: int
211211
description: str
212212

213213

deploy/cloud/api-store/ai_dynamo_store/api/deployments.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ async def create_deployment(deployment: CreateDeploymentSchema):
8585
kube_namespace = get_namespace()
8686

8787
# Generate deployment name
88-
deployment_name = sanitize_deployment_name(deployment.name, deployment.bento)
88+
deployment_name = sanitize_deployment_name(deployment.name, deployment.dynamo)
8989

9090
# Create the deployment using helper function
9191
created_crd = create_dynamo_deployment(
9292
name=deployment_name,
9393
namespace=kube_namespace,
94-
dynamo_component=deployment.bento or deployment.component,
94+
dynamo_component=deployment.dynamo or deployment.component,
9595
labels={
9696
"ngc-organization": ownership["organization_id"],
9797
"ngc-user": ownership["user_id"],
@@ -323,17 +323,17 @@ def update_deployment(name: str, deployment: UpdateDeploymentSchema):
323323
ownership = {"organization_id": "default-org", "user_id": "default-user"}
324324
kube_namespace = get_namespace()
325325
existing_deployment = get_deployment(name)
326-
if existing_deployment.bento != deployment.bento:
326+
if existing_deployment.dynamo != deployment.dynamo:
327327
raise HTTPException(
328328
status_code=422,
329329
detail="Cannot update the Dynamo components of a deployment.",
330330
)
331331

332-
deployment_name = sanitize_deployment_name(name, deployment.bento)
332+
deployment_name = sanitize_deployment_name(name, deployment.dynamo)
333333
updated_crd = update_dynamo_deployment(
334334
name=deployment_name,
335335
namespace=kube_namespace,
336-
dynamo_nim=deployment.bento,
336+
dynamo_nim=deployment.dynamo,
337337
labels={
338338
"ngc-organization": ownership["organization_id"],
339339
"ngc-user": ownership["user_id"],

deploy/cloud/api-store/ai_dynamo_store/api/dynamo.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ async def dynamo_component_handler(
122122

123123

124124
@router.get(
125-
"/bento_repositories/{dynamo_component_name}",
125+
"/dynamo_repositories/{dynamo_component_name}",
126126
responses={
127127
200: {"description": "Successful Response"},
128128
422: {"description": "Validation Error"},
@@ -169,16 +169,16 @@ async def get_dynamo_component(
169169
resource_type=ResourceType.DynamoComponent,
170170
labels=[],
171171
description=dynamo_component.description,
172-
latest_bento=None
172+
latest_dynamo=None
173173
if not latest_dynamo_component_versions
174174
else latest_dynamo_component_versions[0],
175-
latest_bentos=latest_dynamo_component_versions,
176-
n_bentos=len(dynamo_components),
175+
latest_dynamos=latest_dynamo_component_versions,
176+
n_dynamos=len(dynamo_components),
177177
)
178178

179179

180180
@router.post(
181-
"/bento_repositories",
181+
"/dynamo_repositories",
182182
responses={
183183
200: {"description": "Successful Response"},
184184
422: {"description": "Validation Error"},
@@ -240,14 +240,14 @@ async def create_dynamo_component(
240240
resource_type=ResourceType.DynamoComponent,
241241
labels=[],
242242
description=db_dynamo_component.description,
243-
latest_bentos=None,
244-
latest_bento=None,
245-
n_bentos=0,
243+
latest_dynamos=None,
244+
latest_dynamo=None,
245+
n_dynamos=0,
246246
)
247247

248248

249249
@router.get(
250-
"/bento_repositories",
250+
"/dynamo_repositories",
251251
responses={
252252
200: {"description": "Successful Response"},
253253
422: {"description": "Validation Error"},
@@ -375,7 +375,7 @@ async def dynamo_component_version_handler(
375375

376376

377377
@router.get(
378-
"/bento_repositories/{dynamo_component_name}/bentos/{version}",
378+
"/dynamo_repositories/{dynamo_component_name}/dynamos/{version}",
379379
responses={
380380
200: {"description": "Successful Response"},
381381
422: {"description": "Validation Error"},
@@ -415,7 +415,7 @@ async def get_dynamo_component_version(
415415

416416

417417
@router.post(
418-
"/bento_repositories/{dynamo_component_name}/bentos",
418+
"/dynamo_repositories/{dynamo_component_name}/dynamos",
419419
responses={
420420
200: {"description": "Successful Response"},
421421
422: {"description": "Validation Error"},
@@ -483,7 +483,7 @@ async def create_dynamo_component_version(
483483

484484

485485
@router.get(
486-
"/bento_repositories/{dynamo_component_name}/bentos",
486+
"/dynamo_repositories/{dynamo_component_name}/dynamos",
487487
responses={
488488
200: {"description": "Successful Response"},
489489
422: {"description": "Validation Error"},
@@ -544,7 +544,7 @@ async def get_dynamo_component_versions(
544544

545545

546546
@router.patch(
547-
"/bento_repositories/{dynamo_component_name}/bentos/{version}",
547+
"/dynamo_repositories/{dynamo_component_name}/dynamos/{version}",
548548
responses={
549549
200: {"description": "Successful Response"},
550550
422: {"description": "Validation Error"},
@@ -588,7 +588,7 @@ async def update_dynamo_component_version(
588588

589589

590590
@router.put(
591-
"/bento_repositories/{dynamo_component_name}/bentos/{version}/upload",
591+
"/dynamo_repositories/{dynamo_component_name}/dynamos/{version}/upload",
592592
responses={
593593
200: {"description": "Successful Response"},
594594
422: {"description": "Validation Error"},
@@ -636,7 +636,7 @@ def generate_file_path(version) -> str:
636636

637637

638638
@router.get(
639-
"/bento_repositories/{dynamo_component_name}/bentos/{version}/download",
639+
"/dynamo_repositories/{dynamo_component_name}/dynamos/{version}/download",
640640
responses={
641641
200: {"description": "Successful Response"},
642642
422: {"description": "Validation Error"},
@@ -672,7 +672,7 @@ async def download_dynamo_component_version(
672672

673673

674674
@router.patch(
675-
"/bento_repositories/{dynamo_component_name}/bentos/{version}/start_upload",
675+
"/dynamo_repositories/{dynamo_component_name}/dynamos/{version}/start_upload",
676676
responses={
677677
200: {"description": "Successful Response"},
678678
422: {"description": "Validation Error"},
@@ -769,13 +769,13 @@ async def convert_dynamo_component_model_to_schema(
769769
name=entity.name,
770770
resource_type=ResourceType.DynamoComponent,
771771
labels=[],
772-
latest_bento=(
772+
latest_dynamo=(
773773
None
774774
if not dynamo_component_version_schemas
775775
else dynamo_component_version_schemas[0]
776776
),
777-
latest_bentos=dynamo_component_version_schemas,
778-
n_bentos=total,
777+
latest_dynamos=dynamo_component_version_schemas,
778+
n_dynamos=total,
779779
description=entity.description,
780780
)
781781
)
@@ -832,7 +832,7 @@ async def convert_dynamo_component_version_model_to_schema(
832832
labels=[],
833833
manifest=entity.manifest,
834834
updated_at=updated_at,
835-
bento_repository_uid=dynamo_component.id,
835+
dynamo_repository_uid=dynamo_component.id,
836836
# upload_started_at=upload_started_at,
837837
# upload_finished_at=upload_finished_at,
838838
transmission_strategy=TransmissionStrategy.Proxy,

deploy/cloud/api-store/ai_dynamo_store/api/k8s.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def create_dynamo_deployment(
8383
Args:
8484
name: Deployment name
8585
namespace: Target namespace
86-
dynamo_component: Bento name and version (format: name:version)
86+
dynamo_component: Dynamo artifact name and version (format: name:version)
8787
labels: Resource labels
8888
envs: Optional list of environment variables
8989
@@ -215,7 +215,7 @@ def update_dynamo_deployment(
215215
Args:
216216
name: Deployment name
217217
namespace: Target namespace
218-
dynamo_nim: Bento name and version (format: name:version)
218+
dynamo_nim: Dynamo artifact name and version (format: name:version)
219219
labels: Resource labels
220220
envs: Optional list of environment variables
221221

deploy/cloud/api-store/ai_dynamo_store/api/utils.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
def get_deployment_status(resource: Dict[str, Any]) -> str:
2222
"""
2323
Get the current status of a deployment.
24-
Maps operator status to BentoML status values.
25-
Returns lowercase status values matching BentoML's DeploymentStatus enum.
24+
Maps operator status to Dynamo status values.
25+
Returns lowercase status values matching Dynamo's DeploymentStatus enum.
2626
"""
2727
status = resource.get("status", {})
2828
conditions = status.get("conditions", [])
@@ -43,7 +43,7 @@ def get_deployment_status(resource: Dict[str, Any]) -> str:
4343
if state == "failed":
4444
return "failed"
4545
elif state == "pending":
46-
return "deploying" # map pending to deploying to match BentoML states
46+
return "deploying" # map pending to deploying to match Dynamo states
4747

4848
# Default fallback
4949
return "unknown"
@@ -72,11 +72,11 @@ def build_latest_revision_from_cr(cr: dict) -> dict:
7272
spec = cr.get("spec", {})
7373
meta = cr.get("metadata", {})
7474
now = datetime.utcnow().isoformat() + "Z"
75-
bento_str = spec.get("dynamoGraph", "unknown:unknown")
76-
if ":" in bento_str:
77-
bento_name, bento_version = bento_str.split(":", 1)
75+
dynamo_str = spec.get("dynamoGraph", "unknown:unknown")
76+
if ":" in dynamo_str:
77+
dynamo_name, dynamo_version = dynamo_str.split(":", 1)
7878
else:
79-
bento_name, bento_version = "unknown", "unknown"
79+
dynamo_name, dynamo_version = "unknown", "unknown"
8080
# Dummy creator
8181
creator = {"name": "system", "email": "", "first_name": "", "last_name": ""}
8282
# Dummy repository
@@ -85,24 +85,24 @@ def build_latest_revision_from_cr(cr: dict) -> dict:
8585
"created_at": now,
8686
"updated_at": now,
8787
"deleted_at": None,
88-
"name": bento_name,
89-
"resource_type": "bento_repository",
88+
"name": dynamo_name,
89+
"resource_type": "dynamo_repository",
9090
"labels": [],
9191
"description": "",
92-
"latest_bento": None,
92+
"latest_dynamo": None,
9393
}
94-
# Dummy bento
95-
bento = {
96-
"uid": "dummy-bento-uid",
94+
# Dummy dynamo
95+
dynamo = {
96+
"uid": "dummy-dynamo-uid",
9797
"created_at": now,
9898
"updated_at": now,
9999
"deleted_at": None,
100-
"name": bento_version,
101-
"resource_type": "bento",
100+
"name": dynamo_version,
101+
"resource_type": "dynamo",
102102
"labels": [],
103103
"description": "",
104104
"repository": repository,
105-
"version": bento_version,
105+
"version": dynamo_version,
106106
"image_build_status": "",
107107
"upload_status": "",
108108
"upload_finished_reason": "",
@@ -125,7 +125,7 @@ def build_latest_revision_from_cr(cr: dict) -> dict:
125125
"access_authorization": True,
126126
"envs": spec.get("envs", []),
127127
},
128-
"bento": bento,
128+
"dynamo": dynamo,
129129
}
130130
# Revision
131131
return {

deploy/cloud/api-store/ai_dynamo_store/models/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class DeploymentConfigSchema(BaseModel):
5656

5757

5858
class UpdateDeploymentSchema(DeploymentConfigSchema):
59-
bento: Optional[str] = None
59+
dynamo: Optional[str] = None
6060
component: Optional[str] = None
6161

6262

deploy/cloud/api-store/ai_dynamo_store/tests/test_utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def test_build_latest_revision_from_cr_minimal():
7676
rev = build_latest_revision_from_cr(cr)
7777
assert rev["uid"] == "u1"
7878
assert rev["name"] == "n1"
79-
assert rev["targets"][0]["bento"]["repository"]["name"] == "repo"
80-
assert rev["targets"][0]["bento"]["name"] == "ver"
79+
assert rev["targets"][0]["dynamo"]["repository"]["name"] == "repo"
80+
assert rev["targets"][0]["dynamo"]["name"] == "ver"
8181
assert rev["targets"][0]["config"]["services"] == {"svc": {}}
8282
assert rev["targets"][0]["config"]["envs"] == [{"name": "A", "value": "B"}]
8383

@@ -87,14 +87,14 @@ def test_build_latest_revision_from_cr_missing_fields():
8787
rev = build_latest_revision_from_cr(cr)
8888
assert rev["uid"] == "dummy-uid"
8989
assert rev["name"] == "dummy-revision"
90-
assert rev["targets"][0]["bento"]["repository"]["name"] == "unknown"
91-
assert rev["targets"][0]["bento"]["name"] == "unknown"
90+
assert rev["targets"][0]["dynamo"]["repository"]["name"] == "unknown"
91+
assert rev["targets"][0]["dynamo"]["name"] == "unknown"
9292
assert rev["targets"][0]["config"]["services"] == {}
9393
assert rev["targets"][0]["config"]["envs"] == []
9494

9595

96-
def test_build_latest_revision_from_cr_bento_colonless():
96+
def test_build_latest_revision_from_cr_dynamo_colonless():
9797
cr = {"spec": {"dynamoGraph": "justrepo"}}
9898
rev = build_latest_revision_from_cr(cr)
99-
assert rev["targets"][0]["bento"]["repository"]["name"] == "unknown"
100-
assert rev["targets"][0]["bento"]["name"] == "unknown"
99+
assert rev["targets"][0]["dynamo"]["repository"]["name"] == "unknown"
100+
assert rev["targets"][0]["dynamo"]["name"] == "unknown"

deploy/helm/deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ docker login "$DOCKER_REGISTRY"
5151
# Change to the specified directory
5252
cd "$DYNAMO_DIRECTORY"
5353

54-
# Build the Bento container
55-
echo "Building Bento image for $DYNAMO_IDENTIFIER..."
54+
# Build the Dynamo application container
55+
echo "Building Dynamo application image for $DYNAMO_IDENTIFIER..."
5656
DOCKER_DEFAULT_PLATFORM=linux/amd64 uv run dynamo build --containerize $DYNAMO_IDENTIFIER
5757

58-
# Extract the module and the bento name
58+
# Extract the module and the dynamo name
5959
DYNAMO_MODULE=$(echo "$DYNAMO_IDENTIFIER" | awk -F':' '{print $1}' | tr '[:upper:]' '[:lower:]')
6060
DYNAMO_NAME=$(echo "$DYNAMO_IDENTIFIER" | awk -F':' '{print $2}' | tr '[:upper:]' '[:lower:]')
6161

deploy/sdk/src/dynamo/sdk/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
import warnings
1717
from typing import Any
1818

19-
# Suppress warning from setuptools caused by bentoml
20-
# TODO: Remove this line after the bentoml import is removed from this file
2119
warnings.filterwarnings("ignore", category=UserWarning, message=".*pkg_resources.*")
2220

2321
# flake8: noqa: E402

deploy/sdk/src/dynamo/sdk/cli/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def main(
6161
):
6262
"""
6363
The Dynamo CLI is a CLI for serving, containerizing, and deploying Dynamo applications.
64-
It takes inspiration from and leverages core pieces of the BentoML deployment stack.
6564
6665
At a high level, you use `serve` to run a set of dynamo services locally,
6766
`build` and `containerize` to package them up for deployment, and then `cloud`

0 commit comments

Comments
 (0)