Skip to content

Commit a2cb877

Browse files
csg-pr-botganisbackJun Luo
authored
feat(evaluation): add AMD evalscope support (#1049)
* feat(evaluation): add AMD evalscope support * fix: use reflect.Pointer in internal message channel --------- Co-authored-by: ganisback <370036720@qq.com> Co-authored-by: Jun Luo <jun.luo@opencsg.com>
1 parent ab97809 commit a2cb877

4 files changed

Lines changed: 133 additions & 3 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"engine_name": "amd-evalscope",
3+
"enabled": 1,
4+
"model_format": "safetensors",
5+
"engine_images": [
6+
{
7+
"compute_type": "gpu",
8+
"image": "opencsghq/evalscope-amd:1.6.0-rocm7.2.2",
9+
"driver_version": "7.2",
10+
"engine_version": "1.6.0"
11+
}
12+
],
13+
"supported_archs": [
14+
"AfmoeForCausalLM",
15+
"AquilaForCausalLM",
16+
"AquilaModel",
17+
"ArcticForCausalLM",
18+
"BaiChuanForCausalLM",
19+
"BaichuanForCausalLM",
20+
"BambaForCausalLM",
21+
"BertModel",
22+
"BloomForCausalLM",
23+
"BartForConditionalGeneration",
24+
"ChatGLMModel",
25+
"ChatGLMForConditionalGeneration",
26+
"CohereForCausalLM",
27+
"Cohere2ForCausalLM",
28+
"CwmForCausalLM",
29+
"DbrxForCausalLM",
30+
"DeciLMForCausalLM",
31+
"DeepseekForCausalLM",
32+
"DeepseekV2ForCausalLM",
33+
"DeepseekV3ForCausalLM",
34+
"ExaoneForCausalLM",
35+
"FalconForCausalLM",
36+
"FalconMambaForCausalLM",
37+
"Gemma2Model",
38+
"GemmaForCausalLM",
39+
"Gemma2ForCausalLM",
40+
"Gemma3ForCausalLM",
41+
"GlmForCausalLM",
42+
"Glm4ForCausalLM",
43+
"GPT2LMHeadModel",
44+
"GPTBigCodeForCausalLM",
45+
"GPTJForCausalLM",
46+
"GPTNeoXForCausalLM",
47+
"GraniteForCausalLM",
48+
"GraniteMoeForCausalLM",
49+
"GraniteMoeSharedForCausalLM",
50+
"GritLM",
51+
"Grok1ModelForCausalLM",
52+
"InternLMForCausalLM",
53+
"InternLM2ForCausalLM",
54+
"InternLM3ForCausalLM",
55+
"JAISLMHeadModel",
56+
"JambaForCausalLM",
57+
"LlamaModel",
58+
"LlamaForCausalLM",
59+
"Llama4ForCausalLM",
60+
"MambaForCausalLM",
61+
"MiniCPMForCausalLM",
62+
"MiniCPM3ForCausalLM",
63+
"MiniMaxM1ForCausalLM",
64+
"MiniMaxM2ForCausalLM",
65+
"MistralModel",
66+
"MistralForCausalLM",
67+
"MixtralForCausalLM",
68+
"MPTForCausalLM",
69+
"NemotronForCausalLM",
70+
"OLMoForCausalLM",
71+
"OLMo2ForCausalLM",
72+
"OLMoEForCausalLM",
73+
"OlmoForCausalLM",
74+
"Olmo2ForCausalLM",
75+
"OlmoeForCausalLM",
76+
"OPTForCausalLM",
77+
"OrionForCausalLM",
78+
"PhiForCausalLM",
79+
"Phi3ForCausalLM",
80+
"Phi3SmallForCausalLM",
81+
"PhiMoEForCausalLM",
82+
"PersimmonForCausalLM",
83+
"Plamo2ForCausalLM",
84+
"QWenLMHeadModel",
85+
"Qwen2Model",
86+
"Qwen2ForCausalLM",
87+
"Qwen2MoeForCausalLM",
88+
"Qwen3ForCausalLM",
89+
"Qwen3MoeForCausalLM",
90+
"RobertaModel",
91+
"RobertaForMaskedLM",
92+
"StableLmForCausalLM",
93+
"Starcoder2ForCausalLM",
94+
"SolarForCausalLM",
95+
"TeleChat2ForCausalLM",
96+
"TeleFLMForCausalLM",
97+
"XverseForCausalLM",
98+
"XLMRobertaModel",
99+
"MiniMaxText01ForCausalLM",
100+
"Zamba2ForCausalLM"
101+
]
102+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM docker.1ms.run/rocm/pytorch:rocm7.2.2_ubuntu22.04_py3.10_pytorch_release_2.10.0
2+
3+
RUN sed -i 's|http://archive.ubuntu.com/ubuntu|http://mirrors.aliyun.com/ubuntu|g' /etc/apt/sources.list && \
4+
sed -i 's|http://security.ubuntu.com/ubuntu|http://mirrors.aliyun.com/ubuntu|g' /etc/apt/sources.list && \
5+
sed -i 's|http://ports.ubuntu.com/ubuntu-ports|https://mirrors.aliyun.com/ubuntu-ports/|g' /etc/apt/sources.list && \
6+
apt-get update && apt-get -y install dumb-init \
7+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
8+
9+
RUN pip install --no-cache-dir minio oss2 openpyxl csghub-sdk==0.7.2
10+
RUN pip install -U --no-cache-dir evalscope==1.6.0 accelerate
11+
12+
# Download NLTK resources required for BLEU and other metrics
13+
RUN python -c "from evalscope.utils.resource_utils import check_nltk_data; check_nltk_data('punkt_tab')"
14+
15+
COPY ./evalscope/ /etc/csghub/
16+
17+
RUN ln -sf /usr/bin/python3 /usr/bin/python && \
18+
chmod +x /etc/csghub/*.sh && \
19+
chmod +x /etc/csghub/*.py
20+
21+
WORKDIR /workspace/
22+
23+
ENV HUGGINGFACE_HUB_CACHE=/workspace/ \
24+
HF_HUB_ENABLE_HF_TRANSFER=0 \
25+
HF_HUB_DOWNLOAD_TIMEOUT=30
26+
27+
ENTRYPOINT [ "/usr/bin/dumb-init", "--" ]
28+
CMD ["/etc/csghub/start.sh"]

docker/evaluation/evalscope/start.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export HF_TOKEN=$ACCESS_TOKEN
7171
mkdir -p /workspace/data
7272

7373
# Ensure NLTK resources are available for BLEU and other metrics
74-
echo "Checking NLTK resources..."
75-
python -c "import nltk; nltk.download('punkt_tab', quiet=True)" 2>&1 || echo "[WARNING] Failed to download NLTK punkt_tab resource"
74+
#echo "Checking NLTK resources..."
75+
#python -c "import nltk; nltk.download('punkt_tab', quiet=True)" 2>&1 || echo "[WARNING] Failed to download NLTK punkt_tab resource"
7676

7777
# Register custom datasets
7878
echo "Registering custom datasets..."

notification/notifychannel/channel/internalmsg/internalmsg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func (s *InternalMessageChannel) sendInternalMessageToUsers(ctx context.Context,
140140

141141
func extractMessageFromData(data any) (title, content string) {
142142
v := reflect.ValueOf(data)
143-
if v.Kind() == reflect.Ptr {
143+
if v.Kind() == reflect.Pointer {
144144
v = v.Elem()
145145
}
146146
if v.Kind() == reflect.Struct {

0 commit comments

Comments
 (0)