Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
biswapanda committed May 29, 2025
commit 106d5d0889c449dd4d8fc330c4f144d28c4322d1
2 changes: 1 addition & 1 deletion deploy/sdk/src/dynamo/sdk/cli/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def from_service(cls, service: ServiceInterface[T]) -> ServiceInfo:
config = ServiceConfig(
name=name,
service="",
resource=service.config.resource.model_dump(),
resource=service.config.resources.model_dump(),
workers=service.config.workers,
image=image,
dynamo=service.config.dynamo.model_dump(),
Expand Down
16 changes: 11 additions & 5 deletions deploy/sdk/src/dynamo/sdk/core/protocol/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
from abc import ABC, abstractmethod
from collections import defaultdict
from enum import Enum, auto
from typing import Any, Dict, Generic, List, Optional, Set, Tuple, Type, TypeVar
from typing import Any, Dict, Generic, List, Optional, Set, Tuple, Type, TypeVar, Union

from fastapi import FastAPI
from pydantic import BaseModel
from pydantic import BaseModel, Field, field_validator

from dynamo.sdk.core.protocol.deployment import Env

Expand Down Expand Up @@ -59,9 +59,15 @@ class DynamoTransport(Enum):
class ResourceConfig(BaseModel):
"""Configuration for Dynamo resources"""

cpu: int = 1
memory: str = "100Mi"
gpu: str = "0"
cpu: str = Field(default="1")
memory: str = Field(default="500Mi")
gpu: str = Field(default="0")

@field_validator("gpu", mode="before")
@classmethod
def convert_gpu_to_string(cls, v: Union[str, int]) -> str:
"""Convert gpu value to string if it's an integer"""
return str(v)


class ServiceConfig(BaseModel):
Expand Down