--- title: Calibration Benchmark emoji: 🚀 colorFrom: red colorTo: red sdk: docker app_port: 8501 tags: - streamlit pinned: false short_description: Streamlit template space --- # 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](https://docs.streamlit.io) and [community forums](https://discuss.streamlit.io). ## 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.txt ``` As the data is just a pointer to the repository, install, and pull the large files ``` sudo apt install git-lfs git lfs pull ``` then run the streamlit app ``` streamlit run src/streamlit_app.py ``` ## Via docker (untested) install docker ``` sudo snap install docker docker build -t calibration-benchmark . docker run -p 8501:8501 calibration-benchmark ``` Open ``` http://localhost:8501 ``` ## Adding 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 install ``` **Step 2 — Copy the file into `data/`** ``` cp /path/to/your_results.nc data/your_results.nc ``` Sub-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 results for " ``` 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.nc ``` **Step 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): ```python DATASET_FILES = { "L96": [ "existing_file.nc", "your_results.nc", # <-- add here ], ... } ``` Paths are relative to the `data/` directory. **Step 5 — Push** ``` git push ``` LFS 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// cd ``` **Step 2 — Create and work on a local branch** ``` git checkout -b ``` Make your changes, then commit them: ``` git add 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 : ``` Replace `` with the branch name shown on the HF PR page (often `refs/pr/N`). The PR page will update automatically once the push lands.