From a80802ba6e7be58834552c0fd8f4cdcf5574ed02 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sun, 10 Jan 2021 12:59:03 +0200 Subject: [PATCH] Fix model upload --- clearml/model.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clearml/model.py b/clearml/model.py index 667ed0d9..c3eb46c1 100644 --- a/clearml/model.py +++ b/clearml/model.py @@ -538,8 +538,8 @@ class InputModel(Model): # convert local to file to remote one weights_url = CacheManager.get_remote_url(weights_url) - extra = {'system_tags': ["-" + cls.archived_tag]} \ - if Session.check_min_api_version('2.3') else {'tags': ["-" + cls.archived_tag]} + extra = {'system_tags': ["-" + cls._archived_tag]} \ + if Session.check_min_api_version('2.3') else {'tags': ["-" + cls._archived_tag]} # noinspection PyProtectedMember result = _Model._get_default_session().send(models.GetAllRequest( uri=[weights_url], @@ -1437,6 +1437,8 @@ class OutputModel(BaseModel): return True def _get_last_uploaded_filename(self): + if not self._last_uploaded_url and not self.url: + return None return Path(self._last_uploaded_url or self.url).name