mirror of
https://github.com/clearml/clearml
synced 2025-03-13 23:28:29 +00:00
Fix valid model URL might be overridden by an invalid one in case the upload failed
This commit is contained in:
parent
a9819416fd
commit
0086785372
@ -378,10 +378,13 @@ class Model(IdObjectBase, AsyncManagerMixin, _StorageUriMixin):
|
||||
if uploaded_uri is None:
|
||||
return
|
||||
|
||||
# If not successful, mark model as failed_uploading
|
||||
# If not successful, mark model as failed_uploading,
|
||||
# but dont override valid urls
|
||||
if uploaded_uri is False:
|
||||
uploaded_uri = "{}/failed_uploading".format(
|
||||
self._upload_storage_uri
|
||||
uploaded_uri = (
|
||||
self.data.uri
|
||||
if self.data.uri != "{}/uploading_file".format(self._upload_storage_uri or "file://")
|
||||
else "{}/failed_uploading".format(self._upload_storage_uri or "file://")
|
||||
)
|
||||
|
||||
Model._local_model_to_id_uri[str(model_file)] = (
|
||||
|
Loading…
Reference in New Issue
Block a user