Skip to content

Commit

Permalink
fix: also add the argument revision for HuggingFaceRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
dayuy committed Mar 13, 2024
1 parent 433ac09 commit 7995b5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/worker/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 7995b5b

Please sign in to comment.