From 32a71d00255af626ee5cef4a799db869e73735af Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Wed, 13 Apr 2022 14:36:09 +0300 Subject: [PATCH] Support custom configuration in `StorageHelper.get()` --- clearml/storage/helper.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clearml/storage/helper.py b/clearml/storage/helper.py index a7d1c6ae..319bd770 100644 --- a/clearml/storage/helper.py +++ b/clearml/storage/helper.py @@ -237,6 +237,13 @@ class StorageHelper(object): base_url = cls._resolve_base_url(url) instance_key = '%s_%s' % (base_url, threading.current_thread().ident or 0) + # noinspection PyBroadException + try: + configs = kwargs.get("configs") + if configs: + instance_key += "_{}".format(configs.cache_name) + except Exception: + pass force_create = kwargs.pop('__force_create', False) if (instance_key in cls._helpers) and (not force_create):