Black formatting

This commit is contained in:
clearml 2024-10-19 23:08:42 +03:00
parent 0f8484bd60
commit 80c19165b0
3 changed files with 6 additions and 3 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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