Fix set artifacts storage destination with output_uri

This commit is contained in:
allegroai
2019-09-14 13:55:17 +03:00
parent 648a972199
commit 2ba372560e
5 changed files with 10 additions and 5 deletions

View File

@@ -286,6 +286,9 @@ class UploadEvent(MetricsEventAdapter):
storage_key_prefix = self._override_storage_key_prefix
key = '/'.join(x for x in (storage_key_prefix, self.metric, self.variant, filename.strip('/')) if x)
url = '/'.join(x.strip('/') for x in (e_storage_uri, key))
# make sure we preserve local path root
if e_storage_uri.startswith('/'):
url = '/'+url
return key, url