Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/97274.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 97274
summary: Improve model downloader robustness
area: Machine Learning
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ protected void masterOperation(Task task, Request request, ClusterState state, A
final long relativeStartNanos = System.nanoTime();
logAndWriteNotificationAtInfo(modelId, "starting model upload");

URI uri = new URI(repository).resolve(packagedModelId + ModelLoaderUtils.MODEL_FILE_EXTENSION);
URI uri = ModelLoaderUtils.resolvePackageLocation(repository, packagedModelId + ModelLoaderUtils.MODEL_FILE_EXTENSION);

// Uploading other artefacts of the model first, that way the model is last and a simple search can be used to check if the
// download is complete
if (Strings.isNullOrEmpty(modelPackageConfig.getVocabularyFile()) == false) {
Tuple<List<String>, List<String>> vocabularyAndMerges = ModelLoaderUtils.loadVocabulary(
new URI(repository).resolve(modelPackageConfig.getVocabularyFile())
ModelLoaderUtils.resolvePackageLocation(repository, modelPackageConfig.getVocabularyFile())
);

PutTrainedModelVocabularyAction.Request r2 = new PutTrainedModelVocabularyAction.Request(
Expand Down