Skip to content

Commit 5afde53

Browse files
committed
Extends container config with usages field
1 parent 1a81431 commit 5afde53

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ads/aqua/config/container_config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ class AquaContainerConfigItem(Serializable):
8080
default_factory=AquaContainerConfigSpec,
8181
description="Detailed container specification.",
8282
)
83+
usages: Optional[List[str]] = Field(
84+
default_factory=list, description="Supported usages."
85+
)
8386

8487
class Config:
8588
extra = "allow"
@@ -131,7 +134,7 @@ def from_container_index_json(
131134
-------
132135
AquaContainerConfig: The constructed container configuration.
133136
"""
134-
#TODO: Return this logic back if necessary in the next iteraion.
137+
# TODO: Return this logic back if necessary in the next iteraion.
135138
# if not config:
136139
# config = get_container_config()
137140

@@ -144,6 +147,7 @@ def from_container_index_json(
144147
for container in containers:
145148
platforms = container.get("platforms", [])
146149
model_formats = container.get("modelFormats", [])
150+
usages = container.get("usages", [])
147151
container_spec = (
148152
config.get(ContainerSpec.CONTAINER_SPEC, {}).get(
149153
container_type, {}
@@ -160,6 +164,7 @@ def from_container_index_json(
160164
family=container_type,
161165
platforms=platforms,
162166
model_formats=model_formats,
167+
usages=usages,
163168
spec=(
164169
AquaContainerConfigSpec(
165170
cli_param=container_spec.get(

0 commit comments

Comments
 (0)