mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +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:
|
if uploaded_uri is None:
|
||||||
return
|
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:
|
if uploaded_uri is False:
|
||||||
uploaded_uri = "{}/failed_uploading".format(
|
uploaded_uri = (
|
||||||
self._upload_storage_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)] = (
|
Model._local_model_to_id_uri[str(model_file)] = (
|
||||||
|
Loading…
Reference in New Issue
Block a user