From 7995b5b1a8c292446782291408c6b6dc21426d21 Mon Sep 17 00:00:00 2001 From: dayuy <973860441@qq.com> Date: Wed, 13 Mar 2024 13:46:44 +0800 Subject: [PATCH] fix: also add the argument `revision` for HuggingFaceRepo --- pkg/worker/runner.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/worker/runner.go b/pkg/worker/runner.go index 964a07091..b73920006 100644 --- a/pkg/worker/runner.go +++ b/pkg/worker/runner.go @@ -217,13 +217,15 @@ func (runner *RunnerFastchatVLLM) Build(ctx context.Context, model *arcadiav1alp if err := runner.c.Get(ctx, types.NamespacedName{Namespace: *model.Namespace, Name: model.Name}, &m); err != nil { return nil, err } + if m.Spec.Revision != "" { + extraAgrs += fmt.Sprintf(" --revision %s", m.Spec.Revision) + } if m.Spec.HuggingFaceRepo != "" { modelFileDir = m.Spec.HuggingFaceRepo } if m.Spec.ModelScopeRepo != "" { modelFileDir = m.Spec.ModelScopeRepo additionalEnvs = append(additionalEnvs, corev1.EnvVar{Name: "FASTCHAT_USE_MODELSCOPE", Value: "True"}, corev1.EnvVar{Name: "VLLM_USE_MODELSCOPE", Value: "True"}) - extraAgrs += fmt.Sprintf(" --revision %s", m.Spec.Revision) } }