From f99ffa349be379c8348353429a086569110d1ae9 Mon Sep 17 00:00:00 2001 From: David Eliahu Date: Thu, 25 Jun 2020 11:29:12 -0700 Subject: [PATCH 1/2] Update local model downloading new lines --- cli/local/model_cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/local/model_cache.go b/cli/local/model_cache.go index 9886def709..d219f02c77 100644 --- a/cli/local/model_cache.go +++ b/cli/local/model_cache.go @@ -54,6 +54,8 @@ func CacheModels(apiSpec *spec.API, awsClient *aws.Client) ([]*spec.LocalModelCa localModelCaches[i].TargetPath = apiSpec.Predictor.Models[i].Name } + fmt.Println("") // Newline to group all of the model information + return localModelCaches, nil } @@ -128,8 +130,6 @@ func CacheModel(modelPath string, awsClient *aws.Client) (*spec.LocalModelCache, return nil, err } - fmt.Println("") // Newline to group all of the model information - localModelCache.HostPath = modelDir return &localModelCache, nil From a2326b3b6f677af8ce8934625b7111440473126f Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Thu, 25 Jun 2020 22:58:39 +0300 Subject: [PATCH 2/2] Print newline when there are models to be printed --- cli/local/model_cache.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/local/model_cache.go b/cli/local/model_cache.go index d219f02c77..59bf7289b8 100644 --- a/cli/local/model_cache.go +++ b/cli/local/model_cache.go @@ -54,7 +54,9 @@ func CacheModels(apiSpec *spec.API, awsClient *aws.Client) ([]*spec.LocalModelCa localModelCaches[i].TargetPath = apiSpec.Predictor.Models[i].Name } - fmt.Println("") // Newline to group all of the model information + if len(localModelCaches) > 0 { + fmt.Println("") // Newline to group all of the model information + } return localModelCaches, nil }