mirror of
https://github.com/clearml/clearml
synced 2025-01-31 00:56:57 +00:00
Black formatting
This commit is contained in:
parent
0f8484bd60
commit
80c19165b0
@ -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:
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user