1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 11:10:20 +01:00

Fix breaking change from minio update (#469)

`ResponseError` replaced by `S3Error` in new minio version
This commit is contained in:
Guy Jacob
2020-12-15 10:02:16 +02:00
committed by GitHub
parent 59e08034c6
commit f52ff1784d

View File

@@ -18,7 +18,7 @@
from rl_coach.data_stores.data_store import DataStoreParameters
from rl_coach.data_stores.checkpoint_data_store import CheckpointDataStore
from minio import Minio
from minio.error import ResponseError
from minio.error import S3Error
from configparser import ConfigParser, Error
from rl_coach.checkpoint import CheckpointStateFile
from rl_coach.data_stores.data_store import SyncFiles
@@ -134,7 +134,7 @@ class S3DataStore(CheckpointDataStore):
for filename in os.listdir(os.path.join(self.params.expt_dir, 'gifs')):
self.mc.fput_object(self.params.bucket_name, filename, os.path.join(self.params.expt_dir, 'gifs', filename))
except ResponseError as e:
except S3Error as e:
print("Got exception: %s\n while saving to S3", e)
def load_from_store(self):
@@ -190,7 +190,7 @@ class S3DataStore(CheckpointDataStore):
if not os.path.exists(filename):
self.mc.fget_object(obj.bucket_name, obj.object_name, filename)
except ResponseError as e:
except S3Error as e:
print("Got exception: %s\n while loading from S3", e)
def setup_checkpoint_dir(self, crd=None):