From 21f7cbb7af4ca7603b8deb03ee4acac541bee7f5 Mon Sep 17 00:00:00 2001 From: Christian Steinmeyer Date: Fri, 30 Dec 2022 19:15:21 +0100 Subject: [PATCH] make mongo client configurable (#83) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make mongo client configurable * name properly Co-authored-by: RĂ¼diger Busche * Update incense/experiment_loader.py Co-authored-by: RĂ¼diger Busche --- incense/experiment_loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/incense/experiment_loader.py b/incense/experiment_loader.py index d70c907..5aa0105 100755 --- a/incense/experiment_loader.py +++ b/incense/experiment_loader.py @@ -17,8 +17,8 @@ class ExperimentLoader: """Loads artifacts related to experiments.""" - def __init__(self, mongo_uri=None, db_name="sacred", unpickle: bool = True): - client: MongoClient = MongoClient(mongo_uri) + def __init__(self, mongo_uri=None, db_name="sacred", unpickle: bool = True, **mongo_client_kwargs): + client: MongoClient = MongoClient(mongo_uri, **mongo_client_kwargs) self._database = client[db_name] self._runs = self._database.runs self._grid_filesystem = gridfs.GridFS(self._database)