diff --git a/clearml/backend_interface/metrics/events.py b/clearml/backend_interface/metrics/events.py index c6b262a7..947c4db5 100644 --- a/clearml/backend_interface/metrics/events.py +++ b/clearml/backend_interface/metrics/events.py @@ -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 diff --git a/clearml/binding/artifacts.py b/clearml/binding/artifacts.py index 5cdbc943..76ce86e2 100644 --- a/clearml/binding/artifacts.py +++ b/clearml/binding/artifacts.py @@ -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.