Spaces:
Running
Download evaluation/cache_validation_README.md from Ypeng12/visual-product-matching: direct link, hf CLI and curl.
- Browser
- Download file 2.88 kB
-
https://huggingface.co/spaces/Ypeng12/visual-product-matching/resolve/main/evaluation/cache_validation_README.md
- Command line
-
hf download hf://spaces/Ypeng12/visual-product-matching/evaluation/cache_validation_README.md
-
curl -L -o cache_validation_README.md https://huggingface.co/spaces/Ypeng12/visual-product-matching/resolve/main/evaluation/cache_validation_README.md
A newer version of the Gradio SDK is available: 6.32.0
Cache and UI regression evidence
All comparisons ran through the deployed Gradio API. No local matcher execution was used.
- cache_validation_baseline.json: three repository example pairs captured before deployment, revision
eced47593d5607a11d58a10129f14198d576ed40. - cache_validation_after.json: 36/36 checks passed on cache-enabled revision
ad7798fec0de9df90088f7304d207b64ac439d82. - UI report: 19/19 checks passed on the same revision, with four screenshots.
The image pairs were identical bag, bag/alternate bag, and bag/sneaker. Every component score, decision, setting and original feature diagnostic remained exactly equal before/after deployment, on repeat calls, and after cache eviction. Both visualization outputs were decoded into RGB and hashed as raw pixel bytes; their hashes and dimensions matched exactly. Encoded PNG bytes were not used because encoding metadata can vary.
The first identical-image request had a cache miss for image A and a hit for image B, because both inputs share the same normalized image. Repeat requests had two hits. Eviction exercised 35 distinct calibration positive pairs with 70 distinct input paths through two API clients; the observed cache reached 64 entries and never exceeded that bound. Rechecking the initial bag then produced an A miss, demonstrating eviction. Dataset images were used as private local evaluation inputs; the reports contain their pair IDs and diagnostics without reproducing image files.
The browser verified that Apply evaluated SOP settings applies threshold 30 and weights [0.3, 0.5, 0.1, 0.1], including the actual subsequent comparison request. Reset original settings restores threshold 75 and weights [0.3, 0.3, 0.2, 0.2]. Radar colors remained unchanged; desktop keypoint/heatmap panels stayed side by side. Viewports 1440, 390 and 360 pixels had no document overflow, and no JavaScript exceptions were recorded.
Reproduction from the repository root:
python3 hf_spaces/evaluation/vision/cache_validation.py --phase baseline
# Deploy the candidate only after preserving the baseline artifact.
python3 hf_spaces/evaluation/vision/cache_validation.py --phase after --expected-sha <candidate SHA>
python3 hf_spaces/evaluation/vision/ui_validation.py --expected-sha <candidate SHA>
Cache-validation scripts refuse to overwrite existing artifacts; preserve or relocate earlier reports before a new campaign. The after phase should run before other clients access the three example assets if the cold-cache assertion is required. Browser screenshots and report paths are relative to this evaluation directory. These checks verify output preservation and cache behavior; latency estimates belong to the separate repeated-image benchmark.