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 mypy, tests
  • Loading branch information
biswapanda committed May 29, 2025
commit c3a6990ac2bba007c39e4e4eec13684a1c9b2a26
2 changes: 1 addition & 1 deletion deploy/sdk/src/dynamo/sdk/core/protocol/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ServiceConfig(BaseModel):
"""Base service configuration that can be extended by adapters"""

dynamo: DynamoConfig
resource: ResourceConfig = ResourceConfig()
resources: ResourceConfig = ResourceConfig()
workers: int = 1
image: str | None = None
envs: List[Env] | None = None
Expand Down
7 changes: 6 additions & 1 deletion deploy/sdk/src/dynamo/sdk/tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import pytest

from dynamo.sdk.cli.utils import configure_target_environment
from dynamo.sdk.core.protocol.interface import ServiceInterface
from dynamo.sdk.core.runner import TargetEnum

pytestmark = pytest.mark.pre_merge
Expand All @@ -40,4 +41,8 @@ class MyService:
def __init__(self) -> None:
pass

assert MyService.config is not None # type: ignore
dyn_svc: ServiceInterface = MyService
assert dyn_svc.config is not None # type: ignore
assert dyn_svc.config.resources.cpu == 2
assert dyn_svc.config.resources.gpu == "1"
assert dyn_svc.config.resources.memory == "4Gi"