Image-to-Text
PyTorch
Safetensors
PEFT
English
remote-sensing
satellite-imagery
earth-observation
change-detection
visual-grounding
image-captioning
visual-question-answering
optical-sar-fusion
sar
multimodal
lora
Instructions to use thundercode/SatQuery with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use thundercode/SatQuery with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
File size: 6,140 Bytes
ddc0680 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | # Reproducibility
**Status tags:** `IMPLEMENTED` · `VERIFIED` · `MEASURED` · `NOT RUN` · `BLOCKED`.
This document states exactly what a third party can reproduce, with what, and what they cannot.
---
## 1. The reproducibility contract
| Guarantee | How it is enforced |
|---|---|
| **Frozen configuration** | All tunables live in `configs/base.yaml`; no magic numbers in Python. The loader validates invariants and computes a hash. |
| **Frozen config hash** | `78f1e3700da15aa1`. Every artifact records the hash it was produced against. |
| **Pinned backbones** | Every backbone is pinned by revision in `configs/base.yaml`; the Hub resolves the exact commit. |
| **Seed** | `project.seed: 42`. |
| **Immutable public test** | `evaluation.immutable_public_test: true`; `hidden_data_access: false`. |
| **Byte-verified artifacts** | Every released artifact ships with a sha256 in `models/checksums.sha256`. |
| **Verified metrics** | Every quoted number is checked against its artifact by `tools/verify_readme_metrics.py`. |
### 1.1 Invariants the loader enforces
Editing `configs/base.yaml` moves the hash and **invalidates every artifact keyed to it**. Two
invariants exist because their violation is a *silent* error:
```
fusion.input_dim == 3 * croma.encoder_dim + croma.optical_channels + croma.sar_channels # 2318
grounding_head.feature_dim == 4 * grounding.encoder_projected_dim # 2048
```
The second is especially load-bearing: a mismatch is a silent shape error that torch only raises at
the similarity step, after patch features are already cached. It is therefore rejected at load time.
## 2. Reproduce the metric verification (cheap, no GPU)
```bash
python release/tools/verify_readme_metrics.py
```
- **Reads** the artifacts under `artifacts/`.
- **Compares** each of the 20 quoted metrics at the precision printed in the README.
- **Also asserts** statuses (VLM headline contains `ACCEPTANCE-REJECTED`; router `corpus_limited` /
`n_val`; calibration temperature and `ece_improvement`).
- **Exits 0** and prints `ALL CLAIMS VERIFIED` only when everything matches.
Committed output: `release/tools/readme_metrics_report.txt`.
## 3. Reproduce the environment (local run)
```bash
git clone https://github.com/Anish-lab-blip/SatQuery-AI
cd SatQuery-AI
python -m venv .venv
source .venv/Scripts/activate # Windows git-bash; .venv/bin/activate on Linux/macOS
pip install -r requirements.txt
```
Python 3.11+ and a CPU are sufficient. Device is selected via `SATQUERY_DEVICE`; all placement is
`.to(device)`, never `.cuda()`. Backbones are fetched from the Hugging Face Hub on first use, pinned
by revision.
## 4. Reproduce the tests
| Suite | Command | Expected |
|---|---|---|
| Frontend live-wiring | `pytest tests/unit/test_frontend_live_wiring.py` | **106 passed** |
| Doc/frontend suite | `pytest` on the 5 doc/frontend files | **183 passed** |
| Full unit suite | `pytest tests/unit` | 5–6 **environmental** failures (sandbox delete guard × 4, 1 ordering flake, 1 stale adapter test) — see [`EVALUATION.md`](EVALUATION.md) §4 |
> **Environment note.** In the authoring sandbox the full suite trips a **bulk-delete guard** and
> pytest is only installed in the repository virtualenv. Neither affects a normal user environment.
## 5. Reproduce a live run
The deployed stack is reachable:
```bash
curl --noproxy '*' https://satquery-backend-m4yv.onrender.com/api/health
curl --noproxy '*' https://satquery-backend-m4yv.onrender.com/api/capabilities
```
`/api/capabilities` returns six tasks, all `available: true`. A live run requires the tunnel agent to
be connected (`agent_connected:true`); if the Codespace is stopped, the request parks until the
tunnel timeout. See [`DEPLOYMENT.md`](DEPLOYMENT.md) §5–6.
## 6. Reproduce the trained artifacts
Backbones are public and pinned; the **trained modules** are released on the Hugging Face Hub under
`thundercode/SatQuery`, each with its backbone dependency and checksum. To reproduce training:
| Artifact | Where it trains | Guide |
|---|---|---|
| router adapter | local CPU | `configs/base.yaml` §router.training |
| grounding head | local | `configs/base.yaml` §grounding_training |
| change head | local | `configs/base.yaml` §change |
| optical_sar fusion head | local, seed sweep | `docs/PHASE14_OPTICAL_SAR_DECISIONS.md` |
| change_vqa head | **external GPU (Kaggle)** | `docs/R02_KAGGLE_TRAINING_GUIDE.md` |
| vlm LoRA adapter | **external GPU** | `configs/base.yaml` §training |
### 6.1 What "reproduce" means for externally-trained artifacts
The change-VQA and VLM artifacts were trained **outside this repository**. Reproducing them requires
the external GPU environment described in their guides. The repository reproduces:
- the **promotion gate** (byte-identity, sha256, zero non-finite tensors);
- the **evaluation**;
- the **serving wiring**.
It does **not** ship a one-command retrain for those two artifacts. This is stated rather than
implied.
## 7. What is NOT reproducible from this release
| Item | Reason |
|---|---|
| The private deployment repos | They are private; the deployed sources are not in this release. |
| System-level end-to-end benchmark | **No such benchmark exists.** |
| Router test-split number | **Not run.** |
| CDVQA / SECOND imagery | Public but large; the release documents the acquisition + name-verification procedure, not the data. |
| BigEarthNet full corpus | **Not downloaded** (only a 28k S2 subset was used). |
| The historical ZeroGPU/Gradio deploy target | Frozen paperwork only; no runtime exists in code. |
## 8. Environment traps recorded for reproducibility
- **Dead proxy in the authoring sandbox** — outbound calls need `--noproxy '*'` (curl) or
`ProxyHandler({})` (Python).
- **pytest only in the repo virtualenv** (`.venv/Scripts/python.exe`).
- **Full-suite pytest trips a bulk-delete guard** in the sandbox.
- **Cloudflare 308-redirects `X.html` → `/X`.**
- **Chrome drops synthetic CDP key events when the window lacks OS focus** — relevant to any
browser-driven reproduction of the live validation.
|