Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lxning committed Mar 16, 2022
1 parent 67e214b commit a513eaf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ public static ModelArchive downloadModel(
}

if (new File(url).isDirectory()) {
// handle the case that the input url is a directory.
// the input of url is "/xxx/model_store/modelXXX" or
// "xxxx/yyyyy/modelXXX".
return load(url, new File(url), false);
} else if (modelLocation.exists()) {
// handle the case that "/xxx/model_store/modelXXX" is directory
// handle the case that "/xxx/model_store/modelXXX" is directory.
// the input of url is modelXXX when torchserve is started
// with snapshot or with parameter --models modelXXX
return load(url, modelLocation, false);
Expand Down

0 comments on commit a513eaf

Please sign in to comment.