From f8c04bdce1fea95a2984ca5bd31bdb7349559c75 Mon Sep 17 00:00:00 2001 From: vishal Date: Sun, 3 May 2020 12:15:36 -0400 Subject: [PATCH 1/2] Update model_cache.go --- cli/local/model_cache.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/local/model_cache.go b/cli/local/model_cache.go index 2ebb53ec2f..d4e916d84d 100644 --- a/cli/local/model_cache.go +++ b/cli/local/model_cache.go @@ -77,6 +77,11 @@ func CacheModel(modelPath string, awsClient *aws.Client) (*spec.LocalModelCache, if err != nil { return nil, err } + } else if strings.HasSuffix(modelPath, ".onnx") { + err := files.CopyFileOverwrite(modelPath, filepath.Join(modelDir, filepath.Base(modelPath))) + if err != nil { + return nil, err + } } else { fmt.Println(fmt.Sprintf("caching model %s ...", modelPath)) err := files.CopyDirOverwrite(strings.TrimSuffix(modelPath, "/"), s.EnsureSuffix(modelDir, "/")) From b575d0d168333b9ea44247bb6622f5e39e25e6af Mon Sep 17 00:00:00 2001 From: vishal Date: Sun, 3 May 2020 12:19:51 -0400 Subject: [PATCH 2/2] Update model_cache.go --- cli/local/model_cache.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/local/model_cache.go b/cli/local/model_cache.go index d4e916d84d..92e355be5a 100644 --- a/cli/local/model_cache.go +++ b/cli/local/model_cache.go @@ -78,6 +78,7 @@ func CacheModel(modelPath string, awsClient *aws.Client) (*spec.LocalModelCache, return nil, err } } else if strings.HasSuffix(modelPath, ".onnx") { + fmt.Println(fmt.Sprintf("caching model %s ...", modelPath)) err := files.CopyFileOverwrite(modelPath, filepath.Join(modelDir, filepath.Base(modelPath))) if err != nil { return nil, err