Skip to content

Commit

Permalink
fix string.foramt wrong parameter position (#1921) (#1960)
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
(cherry picked from commit 991193c)

Co-authored-by: Hailong Cui <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and Hailong-am authored Feb 1, 2024
1 parent 737630d commit e98d6ec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public String getPrebuiltModelMetaListPath() {

public String getPrebuiltModelConfigPath(String modelName, String version, MLModelFormat modelFormat) {
String format = modelFormat.name().toLowerCase(Locale.ROOT);
return String.format("%s/%s/%s/%s/config.json", MODEL_REPO, modelName, version, format, Locale.ROOT);
return String.format(Locale.ROOT, "%s/%s/%s/%s/config.json", MODEL_REPO, modelName, version, format);
}

public String getPrebuiltModelPath(String modelName, String version, MLModelFormat modelFormat) {
Expand All @@ -67,7 +67,7 @@ public String getPrebuiltModelPath(String modelName, String version, MLModelForm
// /huggingface/sentence-transformers/msmarco-distilbert-base-tas-b/1.0.0/onnx/config.json
String format = modelFormat.name().toLowerCase(Locale.ROOT);
String modelZipFileName = modelName.substring(index).replace("/", "_") + "-" + version + "-" + format;
return String.format("%s/%s/%s/%s/%s.zip", MODEL_REPO, modelName, version, format, modelZipFileName, Locale.ROOT);
return String.format(Locale.ROOT, "%s/%s/%s/%s/%s.zip", MODEL_REPO, modelName, version, format, modelZipFileName);
}

public Path getRegisterModelPath(String modelId, String modelName, String version) {
Expand Down

0 comments on commit e98d6ec

Please sign in to comment.