mirror of
https://github.com/clearml/clearml
synced 2025-06-04 03:47:57 +00:00
Fix package identification for scikit-image
This commit is contained in:
parent
14351e9f93
commit
813777a4cc
@ -277,15 +277,11 @@ class Session(TokenManager):
|
||||
|
||||
return list(retry_codes)
|
||||
|
||||
def _load_vaults(self):
|
||||
# () -> Optional[bool]
|
||||
def _read_vaults(self):
|
||||
# () -> Optional[dict]
|
||||
if not self.check_min_api_version("2.15") or self.feature_set == "basic":
|
||||
return
|
||||
|
||||
if ENV_DISABLE_VAULT_SUPPORT.get():
|
||||
# (self._logger or get_logger()).debug("Vault support is disabled")
|
||||
return
|
||||
|
||||
def parse(vault):
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
@ -306,13 +302,23 @@ class Session(TokenManager):
|
||||
vaults = res.json().get("data", {}).get("vaults", [])
|
||||
data = list(filter(None, map(parse, vaults)))
|
||||
if data:
|
||||
self.config.set_overrides(*data)
|
||||
return True
|
||||
return data
|
||||
elif res.status_code != 404:
|
||||
raise Exception(res.json().get("meta", {}).get("result_msg", res.text))
|
||||
except Exception as ex:
|
||||
(self._logger or get_logger()).warning("Failed getting vaults: {}".format(ex))
|
||||
|
||||
def _load_vaults(self):
|
||||
# () -> Optional[bool]
|
||||
if ENV_DISABLE_VAULT_SUPPORT.get():
|
||||
# (self._logger or get_logger()).debug("Vault support is disabled")
|
||||
return
|
||||
|
||||
data = self._read_vaults()
|
||||
if data:
|
||||
self.config.set_overrides(*data)
|
||||
return True
|
||||
|
||||
def _apply_config_sections(self, local_logger):
|
||||
# type: (_LocalLogger) -> None # noqa: F821
|
||||
default = self.config.get("sdk.apply_environment", False)
|
||||
|
@ -91,6 +91,12 @@ class ScriptRequirements(object):
|
||||
for fname, lines in sklearn.items():
|
||||
modules.add('scikit_learn', fname, lines)
|
||||
|
||||
# bugfix, replace sklearn with scikit-learn name
|
||||
if 'skimage' in modules:
|
||||
skimage = modules.pop('skimage', {})
|
||||
for fname, lines in skimage.items():
|
||||
modules.add('scikit_image', fname, lines)
|
||||
|
||||
# if we have torch and it supports tensorboard, we should add that as well
|
||||
# (because it will not be detected automatically)
|
||||
if 'torch' in modules and 'tensorboard' not in modules and 'tensorboardX' not in modules:
|
||||
|
Loading…
Reference in New Issue
Block a user