Skip to content

Commit

Permalink
make mongo client configurable (#83)
Browse files Browse the repository at this point in the history
* make mongo client configurable

* name properly

Co-authored-by: Rüdiger Busche <rudiger.busche@gmail.com>

* Update incense/experiment_loader.py

Co-authored-by: Rüdiger Busche <rudiger.busche@gmail.com>
  • Loading branch information
christian-steinmeyer and JarnoRFB committed Dec 30, 2022
1 parent 7c9f229 commit 21f7cbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions incense/experiment_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 21f7cbb

Please sign in to comment.