Spaces:
Paused
Download backend/adaptation/README.md from Sahil-nith/SatQuery-api: direct link, hf CLI and curl.
- Browser
- Download file 4.28 kB
-
https://huggingface.co/spaces/Sahil-nith/SatQuery-api/resolve/main/backend/adaptation/README.md
- Command line
-
hf download hf://spaces/Sahil-nith/SatQuery-api/backend/adaptation/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Sahil-nith/SatQuery-api/resolve/main/backend/adaptation/README.md
Remote-sensing adaptation pipeline (Phase 5)
Satisfies the PS-mandatory requirement: "At least one visual or vision-language component must be fine-tuned or otherwise adapted using BigEarthNet.txt or the any open source training data."
Pipeline
BigEarthNet.txt manifest βββΆ prepare_bigearthnet.py βββΆ *_vqa_train.jsonl
β
βΌ
train_lora_vqa.py
β
βΌ
backend/models/checkpoints/vqa_lora_bigearthnet/
β
βΌ
backend/models/vqa.py loads it
automatically on next restart
Status: scripts are real and runnable β no adapter is checked in
backend/models/checkpoints/vqa_lora_bigearthnet/ is empty in this
repo. Until someone actually runs train_lora_vqa.py, the backend
correctly reports adapted: false in every VQA response and uses base
Salesforce/blip-vqa-base weights. This is the honest state, not a
bug β do not check in a fabricated/untrained adapter directory just to
flip that flag.
Before running this for real
- Get the actual PS-linked dataset (arxiv.org/abs/2603.29630) and
inspect its real manifest format.
prepare_bigearthnet.py's expected CSV/JSONL columns (captionorlabels/label_1..n) are a reasonable guess based on the PS description, not a verified schema β update the parsing in that file to match what you actually download before trusting its output. - Decide compute: LoRA fine-tuning of BLIP-VQA-base is realistic on a
single consumer GPU in well under a day for a few thousand examples;
CPU-only will be much slower β cap
--limitaccordingly inprepare_bigearthnet.py. - Install training-only deps (
pip install peft accelerate datasets) β these are deliberately NOT inbackend/requirements.txtsince the running API doesn't needdatasets/accelerate, onlypeftat inference time to load the resulting adapter.
Phase 12 β what was actually verified this session (and what wasn't)
Attempted, in the sandbox used to build Phase 12: install torch/transformers/peft
and actually run this pipeline end-to-end. Result, stated plainly:
prepare_bigearthnet.pywas smoke-tested for real against a small hand-built, clearly-synthetic manifest (5 rows, random-noise PNGs, invented captions/labels β nothing from the actual BigEarthNet.txt dataset). It ran cleanly and produced a correctly-shapedvqa_train.jsonl. This proves the CSV/JSONL parsing logic and the templated-question generation work as written β it does not proveprepare_bigearthnet.py's column-name assumptions (caption/labels/label_1..n) match the real PS-linked dataset's actual schema, because that dataset was never fetched (see below). Verify that for real before trusting this script's output on the real data.train_lora_vqa.pywas NOT run, even on the synthetic data above, and could not be in this environment: (1) the dataset host (arxiv.org and whatever hosts the actual BigEarthNet.txt files) is not reachable from the sandbox this Phase was built in, and (2)huggingface.coβ needed to download the baseSalesforce/blip-vqa-baseweights β is also not reachable from it. Both are infrastructure constraints of that particular build environment, not a flaw in the script.backend/models/checkpoints/vqa_lora_bigearthnet/remains empty;adapted: falseremains the honest, correct state.
Bottom line, unchanged from every prior phase: running this for real β with the actual PS-linked dataset and a machine that can reach huggingface.co β is still an execution task for whoever has that access, not something that can be faked here. Do not check in a checkpoint that wasn't actually produced by a real training run.