calibrationcomp/calibration_benchmark
Welcome to Streamlit!
Edit /src/streamlit_app.py to customize this app to your heart's desire. :heart:
If you have any questions, checkout our documentation and community forums.
Path to running the app locally (without docker)
Install the huggingface authentication (via hf) add security key
Use python (e.g., 3.11)
Then call
python3.11 -m venv .venv
pip install -r requirements.txtAs the data is just a pointer to the repository, install, and pull the large files
sudo apt install git-lfs
git lfs pullthen run the streamlit app
streamlit run src/streamlit_app.pyVia docker (untested)
install docker
sudo snap install docker
docker build -t calibration-benchmark .
docker run -p 8501:8501 calibration-benchmarkOpen
http://localhost:8501Adding new data files (git LFS)
All *.nc files in data/ are tracked via git LFS (configured in .gitattributes). To add a new result file:
Step 1 — Ensure git LFS is installed and initialised
sudo apt install git-lfs # or: brew install git-lfs
git lfs installStep 2 — Copy the file into `data/`
cp /path/to/your_results.nc data/your_results.ncSub-directories are fine (data/UKI_results/, data/bayesian/, etc.).
Step 3 — Stage and commit — LFS handles the rest
git add data/your_results.nc
git commit -m "Add <method> results for <benchmark>"Git LFS intercepts the add automatically because .gitattributes already contains *.nc filter=lfs diff=lfs merge=lfs -text. You can verify the file is tracked with:
git lfs ls-files | grep your_results.ncStep 4 — Register the file in the app
Open src/data_store.py and add the path to DATASET_FILES (optimization) or UQ_DATASET_FILES (UQ leaderboard):
DATASET_FILES = {
"L96": [
"existing_file.nc",
"your_results.nc", # <-- add here
],
...
}Paths are relative to the data/ directory.
Step 5 — Push
git pushLFS objects are pushed to the LFS store automatically alongside the pointer commit. Collaborators get the data with git lfs pull after cloning or fetching.
Contributing via a Hugging Face pull request
Hugging Face Spaces uses a non-standard PR workflow: you create the PR online first, then push to the branch it creates.
Step 1 — Clone the repo (if you haven't already)
git clone https://huggingface.co/spaces/<owner>/<space-name>
cd <space-name>Step 2 — Create and work on a local branch
git checkout -b <local-branch-name>Make your changes, then commit them:
git add <changed-files>
git commit -m "Your commit message"Step 3 — Open the pull request online
Go to the Space on huggingface.co → Community tab → New Pull Request. Fill in the title and description and submit. Hugging Face will create a remote PR branch (shown on the PR page, e.g. refs/pr/1 or a named branch).
Step 4 — Push your local branch to the PR branch
git push --set-upstream origin <local-branch-name>:<pr-branch-name>Replace <pr-branch-name> with the branch name shown on the HF PR page (often refs/pr/N).
The PR page will update automatically once the push lands.
