Skip to content

Commit

Permalink
Add URL substitution to registered uploaded files when reporting an e…
Browse files Browse the repository at this point in the history
…vent
  • Loading branch information
allegroai committed May 4, 2024
1 parent f267466 commit 81c02db
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions clearml/backend_interface/metrics/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ def update_and_get_file_entry(ev):
kwargs = {}
if entry:
key, url = ev.get_target_full_upload_uri(storage_uri, self.storage_key_prefix, quote_uri=False)

orig_url = url
try:
storage = self._get_storage(url)
if storage:
url = storage._apply_url_substitutions(url)
except Exception as err:
self._get_logger().warning("Failed applying URL substitutions on {} ({})".format(orig_url, err))

kwargs[entry.key_prop] = key
kwargs[entry.url_prop] = url
if not entry.stream:
Expand Down

0 comments on commit 81c02db

Please sign in to comment.