A simple Dash web app to enter MongoDB credentials and list Sacred experiments (from the runs collection). Now with a pretty Bootstrap UI, a hideable connection panel, and saved credentials across refresh/sessions.
- Python 3.9+ recommended
- Pip
- Create and activate a virtual environment (recommended).
- Windows (PowerShell):
python -m venv .venv .\.venv\Scripts\Activate.ps1 - macOS/Linux:
python3 -m venv .venv source .venv/bin/activate
- Windows (PowerShell):
- Install dependencies:
pip install -r requirements.txt
python app.pyOpen your browser to http://127.0.0.1:8050/.
You can either:
- Paste a full MongoDB URI (e.g.
mongodb+srv://user:pass@cluster/yourdb?authSource=admin), or - Fill the individual fields: host, port, username/password (optional), and
authSourceif needed.
Specify the database name (defaults to sacred). Click Connect to see a list of experiment names detected in the runs collection under experiment.name.
If your Sacred data is not in runs or uses a different structure, update the query logic in app.py (fetch_sacred_experiment_names).
- The top Navbar has a “Connection” toggle to show/hide the connection form.
- Check “Save credentials locally” to persist connection settings in your browser (localStorage). They will survive refresh and future visits.
- Optionally check “Include password” to also store the password in the browser. Only enable this on trusted, personal devices.
- Use “Clear saved” to remove stored credentials at any time.
- Set
SACRED_DB_NAMEenvironment variable to change the default DB name:$env:SACRED_DB_NAME="my_sacred_db" # PowerShell export SACRED_DB_NAME="my_sacred_db" # bash/zsh