Skip to content

Commit 130a924

Browse files
committed
merge from main
Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com>
2 parents f921640 + e69f112 commit 130a924

File tree

9 files changed

+35
-36
lines changed

9 files changed

+35
-36
lines changed

.github/workflows/pr-sglang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
# Common
1717
CONTAINER_TYPE: "general"
1818
FRAMEWORK: "sglang"
19-
SGLANG_VERSION: "0.5.7"
19+
SGLANG_VERSION: "0.5.8"
2020
PYTHON_VERSION: "py312"
2121
CUDA_VERSION: "cu129"
2222
OS_VERSION: "ubuntu22.04"

docker/sglang/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Declare the argument as default to use as input
22
# base image: https://hub.docker.com/r/lmsysorg/sglang/tags
3-
ARG BASE_IMAGE=lmsysorg/sglang:v0.5.7-cu129-amd64
3+
ARG BASE_IMAGE=lmsysorg/sglang:v0.5.8-cu129-amd64
44

55
# Use input argument as base image
66
FROM $BASE_IMAGE AS base

docs/src/image_config.py

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ class ImageConfig:
3232
def __init__(self, repository: str, **kwargs: Any) -> None:
3333
self._repository = repository
3434
self._data = kwargs
35-
# Compute framework_group from GLOBAL_CONFIG, default to repository
36-
self._framework_group = repository
37-
for group_key, repos in GLOBAL_CONFIG.get("framework_groups", {}).items():
38-
if repository in repos:
39-
self._framework_group = group_key
40-
break
4135

4236
@classmethod
4337
def from_yaml(cls, path: Path, repository: str) -> "ImageConfig":
@@ -66,7 +60,10 @@ def repository(self) -> str:
6660
@property
6761
def framework_group(self) -> str:
6862
"""Framework group key (or repository if not in a group)."""
69-
return self._framework_group
63+
for group_key, repos in GLOBAL_CONFIG.get("framework_groups", {}).items():
64+
if self._repository in repos:
65+
return group_key
66+
return self._repository
7067

7168
@property
7269
def is_supported(self) -> bool:
@@ -121,27 +118,27 @@ def display_repository(self) -> str:
121118
raise KeyError(f"Display name not found for: {self._repository}")
122119
return display_names[self._repository]
123120

121+
@property
122+
def display_tag(self) -> str:
123+
"""Get first tag for display (used in available_images.md). Tags must be a list."""
124+
tags = self.get("tags", [])
125+
if not isinstance(tags, list):
126+
raise ValueError(f"'tags' field must be a list in {self._repository}")
127+
return tags[0] if tags else ""
128+
124129
@property
125130
def display_framework_group(self) -> str:
126131
"""Get human-readable display name for the framework group."""
127132
display_names = GLOBAL_CONFIG.get("display_names", {})
128-
if self._framework_group not in display_names:
129-
raise KeyError(f"Display name not found for: {self._framework_group}")
130-
return display_names[self._framework_group]
133+
if self.framework_group not in display_names:
134+
raise KeyError(f"Display name not found for: {self.framework_group}")
135+
return display_names[self.framework_group]
131136

132137
@property
133138
def display_framework_version(self) -> str:
134139
"""Framework and version combined for table display."""
135140
return f"{self.get('framework', '')} {self.get('version', '')}"
136141

137-
@property
138-
def display_tag(self) -> str:
139-
"""Get first tag for display (used in available_images.md). Tags must be a list."""
140-
tags = self.get("tags", [])
141-
if not isinstance(tags, list):
142-
raise ValueError(f"'tags' field must be a list in {self._repository}")
143-
return tags[0] if tags else ""
144-
145142
@property
146143
def display_example_url(self) -> str:
147144
"""Example ECR URL for table display."""

test/docs/mock_data/data/mock-repo/1.0-cpu-ec2.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ accelerator: cpu
44
python: py311
55
os: ubuntu22.04
66
platform: ec2
7-
tag: "1.0.0-cpu-py311-ubuntu22.04-ec2"
87
ga: "2024-01-01"
98
eop: "2025-01-01"
109
public_registry: false
10+
11+
tags:
12+
- "1.0.0-cpu-py311-ubuntu22.04-ec2"

test/docs/mock_data/data/mock-repo/1.5-neuronx-ec2.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ python: py311
55
sdk: "2.20.0"
66
os: ubuntu22.04
77
platform: ec2
8-
tag: "1.5.0-neuronx-py311-sdk2.20.0-ubuntu22.04-ec2"
8+
9+
tags:
10+
- "1.5.0-neuronx-py311-sdk2.20.0-ubuntu22.04-ec2"

test/docs/mock_data/data/mock-repo/2.0-gpu-ec2.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ python: py312
55
cuda: cu121
66
os: ubuntu22.04
77
platform: ec2
8-
tag: "2.0.0-gpu-py312-cu121-ubuntu22.04-ec2"
98
ga: "2025-01-01"
109
eop: "2027-01-01"
1110
public_registry: true
11+
12+
tags:
13+
- "2.0.0-gpu-py312-cu121-ubuntu22.04-ec2"

test/docs/mock_data/data/mock-repo/2.0-gpu-sagemaker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ python: py312
55
cuda: cu121
66
os: ubuntu22.04
77
platform: sagemaker
8-
tag: "2.0.0-gpu-py312-cu121-ubuntu22.04-sagemaker"
98
ga: "2025-01-01"
109
eop: "2027-01-01"
1110
public_registry: true
11+
12+
tags:
13+
- "2.0.0-gpu-py312-cu121-ubuntu22.04-sagemaker"

test/docs/mock_data/tables/support_policy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
columns:
2-
- field: framework
3-
data: framework_group
2+
- field: framework_group
43
header: "Framework"
54
- field: version
65
header: "Version"

test/docs/test_image_config.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
ImageConfig,
2121
build_image_row,
2222
check_public_registry,
23-
get_latest_image,
23+
get_latest_image_uri,
2424
load_legacy_images,
2525
load_repository_images,
2626
sort_by_version,
@@ -187,12 +187,7 @@ class TestBuildImageRow:
187187
],
188188
["PyTorch 2.0", "py312"],
189189
),
190-
(
191-
[{"field": "version", "data": "framework_version", "header": "Framework"}],
192-
["PyTorch 2.0"],
193-
),
194190
],
195-
ids=["basic_columns", "data_override"],
196191
)
197192
def test_build_row(self, columns, expected):
198193
img = ImageConfig("repo", framework="PyTorch", version="2.0", python="py312")
@@ -278,12 +273,12 @@ def test_mixed(self, caplog):
278273

279274
class TestGetLatestImage:
280275
def test_success(self, mock_paths):
281-
LOGGER.debug("Testing get_latest_image for valid repo/platform")
282-
uri = get_latest_image("mock-repo", "ec2")
276+
LOGGER.debug("Testing get_latest_image_uri for valid repo/platform")
277+
uri = get_latest_image_uri("mock-repo", "ec2")
283278
LOGGER.debug(f"Latest image URI: {uri}")
284279
assert "mock-repo" in uri
285280
assert "2.0.0-gpu-py312" in uri
286-
LOGGER.info("get_latest_image test passed")
281+
LOGGER.info("get_latest_image_uri test passed")
287282

288283
@pytest.mark.parametrize(
289284
"repo,platform",
@@ -292,4 +287,4 @@ def test_success(self, mock_paths):
292287
)
293288
def test_not_found(self, mock_paths, repo, platform):
294289
with pytest.raises(ValueError, match="Image not found"):
295-
get_latest_image(repo, platform)
290+
get_latest_image_uri(repo, platform)

0 commit comments

Comments
 (0)