Add automation support including hyper-parameters optimization

This commit is contained in:
allegroai
2020-05-22 12:00:07 +03:00
parent b457b9aaad
commit 95105cbe6a
16 changed files with 1921 additions and 94 deletions

View File

@@ -27,11 +27,17 @@ class CacheManager(object):
def get_local_copy(self, remote_url):
helper = StorageHelper.get(remote_url)
if not helper:
raise ValueError("Remote storage not supported: {}".format(remote_url))
raise ValueError("Storage access failed: {}".format(remote_url))
# check if we need to cache the file
direct_access = helper._driver.get_direct_access(remote_url)
try:
direct_access = helper._driver.get_direct_access(remote_url)
except (OSError, ValueError):
LoggerRoot.get_base_logger().warning("Failed accessing local file: {}".format(remote_url))
return None
if direct_access:
return direct_access
# check if we already have the file in our cache
cached_file, cached_size = self._get_cache_file(remote_url)
if cached_size is not None: