mirror of
https://github.com/clearml/clearml
synced 2025-06-09 16:15:44 +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)
|
return list(retry_codes)
|
||||||
|
|
||||||
def _load_vaults(self):
|
def _read_vaults(self):
|
||||||
# () -> Optional[bool]
|
# () -> Optional[dict]
|
||||||
if not self.check_min_api_version("2.15") or self.feature_set == "basic":
|
if not self.check_min_api_version("2.15") or self.feature_set == "basic":
|
||||||
return
|
return
|
||||||
|
|
||||||
if ENV_DISABLE_VAULT_SUPPORT.get():
|
|
||||||
# (self._logger or get_logger()).debug("Vault support is disabled")
|
|
||||||
return
|
|
||||||
|
|
||||||
def parse(vault):
|
def parse(vault):
|
||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
try:
|
try:
|
||||||
@ -306,13 +302,23 @@ class Session(TokenManager):
|
|||||||
vaults = res.json().get("data", {}).get("vaults", [])
|
vaults = res.json().get("data", {}).get("vaults", [])
|
||||||
data = list(filter(None, map(parse, vaults)))
|
data = list(filter(None, map(parse, vaults)))
|
||||||
if data:
|
if data:
|
||||||
self.config.set_overrides(*data)
|
return data
|
||||||
return True
|
|
||||||
elif res.status_code != 404:
|
elif res.status_code != 404:
|
||||||
raise Exception(res.json().get("meta", {}).get("result_msg", res.text))
|
raise Exception(res.json().get("meta", {}).get("result_msg", res.text))
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
(self._logger or get_logger()).warning("Failed getting vaults: {}".format(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):
|
def _apply_config_sections(self, local_logger):
|
||||||
# type: (_LocalLogger) -> None # noqa: F821
|
# type: (_LocalLogger) -> None # noqa: F821
|
||||||
default = self.config.get("sdk.apply_environment", False)
|
default = self.config.get("sdk.apply_environment", False)
|
||||||
|
@ -91,6 +91,12 @@ class ScriptRequirements(object):
|
|||||||
for fname, lines in sklearn.items():
|
for fname, lines in sklearn.items():
|
||||||
modules.add('scikit_learn', fname, lines)
|
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
|
# if we have torch and it supports tensorboard, we should add that as well
|
||||||
# (because it will not be detected automatically)
|
# (because it will not be detected automatically)
|
||||||
if 'torch' in modules and 'tensorboard' not in modules and 'tensorboardX' not in modules:
|
if 'torch' in modules and 'tensorboard' not in modules and 'tensorboardX' not in modules:
|
||||||
|
Loading…
Reference in New Issue
Block a user