Fix delete artifacts after upload

This commit is contained in:
allegroai 2022-01-10 00:00:56 +02:00
parent 51c8c84bc4
commit 149d55442d
2 changed files with 4 additions and 1 deletions

View File

@ -339,7 +339,9 @@ class UploadEvent(MetricsEventAdapter):
# noinspection PyBroadException
try:
output = pathlib2.Path(self._local_image_path)
if not output.is_file():
if output.is_file():
local_file = output
else:
output = None
except Exception:
output = None

View File

@ -328,6 +328,7 @@ class Artifacts(object):
artifact_object = LazyEvalWrapper._load_object(artifact_object)
pathlib_types = (Path, pathlib_Path,) if pathlib_Path is not None else (Path,)
local_filename = None
# try to convert string Path object (it might reference a file/folder)
# dont not try to serialize long texts.