diff --git a/clearml/config/cache.py b/clearml/config/cache.py index fd52c1b7..ac2e36eb 100644 --- a/clearml/config/cache.py +++ b/clearml/config/cache.py @@ -21,7 +21,7 @@ class SessionCache(object): def _load_cache(cls): # noinspection PyBroadException try: - flag = 'rb' if six.PY2 else 'rt' + flag = "rb" if six.PY2 else "rt" with (Path(expanduser(cls.SESSION_CACHE_FOLDER)) / SESSION_CACHE_FILE).open(flag) as fp: return json.load(fp) except Exception: @@ -32,7 +32,7 @@ class SessionCache(object): # noinspection PyBroadException try: Path(expanduser(cls.SESSION_CACHE_FOLDER)).mkdir(parents=True, exist_ok=True) - flag = 'wb' if six.PY2 else 'wt' + flag = "wb" if six.PY2 else "wt" with (Path(expanduser(cls.SESSION_CACHE_FOLDER)) / SESSION_CACHE_FILE).open(flag) as fp: json.dump(cache, fp) except Exception: diff --git a/clearml/config/defs.py b/clearml/config/defs.py index 7e632fb1..926df011 100644 --- a/clearml/config/defs.py +++ b/clearml/config/defs.py @@ -24,7 +24,9 @@ TASK_SET_ITERATION_OFFSET = EnvEntry("CLEARML_SET_ITERATION_OFFSET", type=int) LOG_LEVEL_ENV_VAR = EnvEntry("CLEARML_LOG_LEVEL", "TRAINS_LOG_LEVEL", converter=or_(int, str)) -SUPPRESS_UPDATE_MESSAGE_ENV_VAR = EnvEntry("CLEARML_SUPPRESS_UPDATE_MESSAGE", "TRAINS_SUPPRESS_UPDATE_MESSAGE", type=bool) +SUPPRESS_UPDATE_MESSAGE_ENV_VAR = EnvEntry( + "CLEARML_SUPPRESS_UPDATE_MESSAGE", "TRAINS_SUPPRESS_UPDATE_MESSAGE", type=bool +) MAX_SERIES_PER_METRIC = EnvEntry("CLEARML_MAX_SERIES_PER_METRIC", default=100, type=int) diff --git a/clearml/config/remote.py b/clearml/config/remote.py index c0d6ec48..ec903f03 100644 --- a/clearml/config/remote.py +++ b/clearml/config/remote.py @@ -17,4 +17,5 @@ def override_current_task_id(task_id): running_remotely_task_id = task_id # make sure we change the cached value as well. import clearml + clearml.config._running_remotely_task_id = task_id