Skip to content

Commit b638c60

Browse files
authored
Update torchserve.py
1 parent 1ccc481 commit b638c60

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/sagemaker_pytorch_serving_container/torchserve.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,8 @@ def _adapt_to_ts_format(handler_service):
114114
extra_files = []
115115
extra_files.append(os.path.join(environment.model_dir, DEFAULT_TS_CODE_DIR, environment.Environment().module_name + ".py"))
116116
extra_files+= [os.path.join(environment.model_dir, file) for file
117-
in os.listdir(environment.model_dir)
118-
if os.path.isfile(os.path.join(environment.model_dir, file))]
119-
extra_files.remove(os.path.join(environment.model_dir, DEFAULT_TS_MODEL_SERIALIZED_FILE))
120-
logger.info(extra_files)
117+
in os.listdir(environment.model_dir)
118+
if os.path.isfile(os.path.join(environment.model_dir, file)) and file != DEFAULT_TS_MODEL_SERIALIZED_FILE ]
121119

122120
model_archiver_cmd = [
123121
"torch-model-archiver",

0 commit comments

Comments
 (0)