Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create temporary directory using uuid #2868

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion model-archiver/model_archiver/model_packaging_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import sys
import tarfile
import tempfile
import uuid
import zipfile
from io import BytesIO
from pathlib import Path
Expand Down Expand Up @@ -153,7 +154,7 @@ def copy_artifacts(model_name, runtime, **kwargs):
:param kwargs: key value pair of files to be copied in archive
:return:
"""
model_path = os.path.join(tempfile.gettempdir(), model_name)
model_path = os.path.join(tempfile.gettempdir(), model_name, uuid.uuid4().hex)
if os.path.exists(model_path):
shutil.rmtree(model_path)
ModelExportUtils.make_dir(model_path)
Expand Down
Loading