mucahitkantepe commited on
Commit
14d164a
·
1 Parent(s): c1a9a77

long-run: deploy + live smoke test verified (Step 11)

Browse files
.long-run/acceptance.md CHANGED
@@ -6,8 +6,8 @@
6
  | AC2 | distinct_ratio ≥ 0.18 (diversity regression guard) | yes | **PASS** | `evidence/final_diversity.txt` (0.212) | tightened from baseline 0.214 → 0.212 (within sampling noise) |
7
  | AC3 | `bun run build` (tsc + vite) exits 0 | yes | **PASS** | build output above | 261.69 kB / 81.69 kB gzip |
8
  | AC4 | `python3 -m py_compile` on touched .py | yes | **PASS** | n/a — verified at each commit | colors.py, contrast.py, scandi.py, outfits.py, projection_heads.py, schemas.py, products.py, eval scripts |
9
- | AC5 | Live `/api/health` exposes new columns + non-zero population | yes | **DEFERRED** | — | requires HF Space deploy (Step 11) |
10
- | AC6 | Live `/api/products/outfit` returns palette + rationale | yes | **PASS (local)** | `smoke_api.py` via FastAPI TestClient, end-to-end shape verified | live verification deferred to deploy |
11
  | AC7 | Color harmony rate ≥ 0.80 for dress→shoes (was: mean ΔE ≤ 30) | yes | **PASS** | `evidence/final_quality.txt` (0.966) | reframed: pairs harmonious if either side neutral OR ΔE < 25 — raw ΔE incorrectly penalises correct neutral-shoe pairings (decision logged in plan amendment) |
12
 
13
  ## Summary
 
6
  | AC2 | distinct_ratio ≥ 0.18 (diversity regression guard) | yes | **PASS** | `evidence/final_diversity.txt` (0.212) | tightened from baseline 0.214 → 0.212 (within sampling noise) |
7
  | AC3 | `bun run build` (tsc + vite) exits 0 | yes | **PASS** | build output above | 261.69 kB / 81.69 kB gzip |
8
  | AC4 | `python3 -m py_compile` on touched .py | yes | **PASS** | n/a — verified at each commit | colors.py, contrast.py, scandi.py, outfits.py, projection_heads.py, schemas.py, products.py, eval scripts |
9
+ | AC5 | Live `/api/health` exposes new columns + non-zero population | yes | **PASS** | `evidence/live_health.json` — columns include `lab_color, palette, contrast_axes, scandi_score`; `with_taste_embedding=10121`, `total_products=10436` | deployed to `Creatiste/taste-engine` |
10
+ | AC6 | Live `/api/products/outfit` returns palette + rationale | yes | **PASS** | `evidence/live_outfit.json` — sand-trench anchor, 5 axes covered, palette hex codes, full rationales | end-to-end live |
11
  | AC7 | Color harmony rate ≥ 0.80 for dress→shoes (was: mean ΔE ≤ 30) | yes | **PASS** | `evidence/final_quality.txt` (0.966) | reframed: pairs harmonious if either side neutral OR ΔE < 25 — raw ΔE incorrectly penalises correct neutral-shoe pairings (decision logged in plan amendment) |
12
 
13
  ## Summary
.long-run/checkpoints/phase-3-step-11.md ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ step: 11
3
+ title: Push code + deploy + live smoke test
4
+ status: completed
5
+ ---
6
+
7
+ # Step 11 — Deployment
8
+
9
+ ## Actions
10
+
11
+ 1. `git push origin long-run/scandi-outfit-style-70b1f0` — feature branch on GitHub
12
+ 2. `git push origin long-run/scandi-outfit-style-70b1f0:main` — fast-forward GitHub main
13
+ 3. `git push hf long-run/scandi-outfit-style-70b1f0:main` — fast-forward HF Space main, triggers rebuild
14
+ 4. Uploaded `~/.taste/taste.db` (78 MB, 10,067 backfilled rows) to dataset `Creatiste/taste-data` via huggingface_hub
15
+ 5. Polled HF Space runtime until `RUNNING_BUILDING → RUNNING`
16
+ 6. `POST /api/admin/pull-db` — Space copied new DB into `/data/taste.db` and reinitialised
17
+ 7. Smoke-tested `/api/health` and `/api/products/outfit`
18
+
19
+ ## Live verification (saved as evidence)
20
+
21
+ `/api/health` (`evidence/live_health.json`):
22
+ ```json
23
+ {
24
+ "status": "ok",
25
+ "db_path": "/data/taste.db",
26
+ "total_products": 10436,
27
+ "with_taste_embedding": 10121,
28
+ "columns": [..., "lab_color", "palette", "contrast_axes", "scandi_score"]
29
+ }
30
+ ```
31
+
32
+ `/api/products/outfit` for a Sofie Schnoor sand short trench (`evidence/live_outfit.json`):
33
+ ```
34
+ anchor_color_name: 'sand'
35
+ axes_covered: ['formality', 'structure', 'surface', 'gender_coding', 'weight']
36
+ axes_contrasted: ['gender_coding']
37
+ scandi_score: 0.727
38
+ palette: [(anchor, sand, #b49c77), (dress, off-white, #d7d8d7),
39
+ (shoes, taupe, #7e6f5d), (bag, black, #1f1f1f)]
40
+ dress | off-white · complementary tones · adds lightness · scandi-fit
41
+ shoes | taupe · complementary tones · scandi-fit
42
+ bag | black · complementary tones · adds fem softness · scandi-fit
43
+ ```
44
+
45
+ 5 axes covered, 1 contrasted, full rationale strings rendering correctly.
46
+ All ACs PASS — long-run complete.
.long-run/evidence/live_health.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"status":"ok","db_path":"/data/taste.db","total_products":10436,"with_taste_embedding":10121,"columns":["url","image_url","image_path","brand","name","price_text","price_nok","store","score","fabric","created_at","external_id","color","material","category","original_price_nok","currency","on_sale","image_urls","in_stock","sizes","first_seen_at","last_seen_at","updated_at","image_paths","canonical_category","taste_embedding","lab_color","palette","contrast_axes","scandi_score"],"data_dir":"/data"}
.long-run/evidence/live_outfit.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"anchor":{"url":"https://www.boozt.com/no/no/sofie-schnoor/adriasw-short-trench-coat_32947072","image_url":"https://image-resizing.booztcdn.com/sofie-schnoor/ssrs261135_ccamel_v7012_10.webp?has_grey=0&has_webp=1&version=59f4c20d2ae35860efee8b7f3a3a6198","image_urls":["https://image-resizing.booztcdn.com/sofie-schnoor/ssrs261135_ccamel_v7012_10.webp?has_grey=0&has_webp=1&version=59f4c20d2ae35860efee8b7f3a3a6198","https://image-resizing.booztcdn.com/sofie-schnoor/ssrs261135_ccamel_v7012_1.webp?has_grey=1&has_webp=1&version=48b2953db168072f558781c62284b854","https://image-resizing.booztcdn.com/sofie-schnoor/ssrs261135_ccamel_v7012_11.webp?has_grey=0&has_webp=1&version=b850d502cbd7ee2d5c309d6704fc1b56","https://image-resizing.booztcdn.com/sofie-schnoor/ssrs261135_ccamel_v7012_12.webp?has_grey=0&has_webp=1&version=2d13319393f729885d3c0d7f21667265","https://image-resizing.booztcdn.com/sofie-schnoor/ssrs261135_ccamel_v7012.webp?has_grey=1&has_webp=1&version=3058fc56987f88b01f18e65c35132c74"],"brand":"Sofie Schnoor","name":"ADRIASW SHORT TRENCH COAT","color":"CAMEL","material":"","category":"kjoler","price_text":"2949 kr","price_nok":2949.0,"original_price_nok":0.0,"currency":"NOK","on_sale":false,"store":"Boozt","score":0.7316678094952167,"in_stock":true,"sizes":["34","40","42"],"external_id":"32947072","canonical_category":"outerwear","scandi_score":0.49319565730763326},"anchor_bucket":"outerwear","anchor_color_name":"sand","complements":[{"bucket":"dress","product":{"url":"https://www.boozt.com/no/no/2nd-day/2nd-brucen-firm-cotton_32919840","image_url":"https://image-resizing.booztcdn.com/2nd-day/2da2261112127_cblack_v190303_10.webp?has_grey=0&has_webp=1&version=87c91542e945413650bdbada022073d2","image_urls":["https://image-resizing.booztcdn.com/2nd-day/2da2261112127_cblack_v190303_10.webp?has_grey=0&has_webp=1&version=87c91542e945413650bdbada022073d2","https://image-resizing.booztcdn.com/2nd-day/2da2261112127_cblack_v190303_11.webp?has_grey=0&has_webp=1&version=9709d016c0e48a34668445c7119ff223","https://image-resizing.booztcdn.com/2nd-day/2da2261112127_cblack_v190303.webp?has_grey=1&has_webp=1&version=d691dc10e8fbcbf26fdf55cc3d4dd7c1"],"brand":"2NDDAY","name":"2ND Brucen - Firm Cotton","color":"BLACK","material":"","category":"kjoler","price_text":"2900 kr","price_nok":1740.0,"original_price_nok":2900.0,"currency":"NOK","on_sale":true,"store":"Boozt","score":0.7312660217285156,"in_stock":true,"sizes":["32","34","36","38","40","42"],"external_id":"32919840","canonical_category":"dress","scandi_score":0.7530327603126736},"rationale":"off-white · complementary tones · adds lightness · scandi-fit","color_name":"off-white","color_score":0.7,"axes_added":["weight"]},{"bucket":"shoes","product":{"url":"https://www.cos.com/en-no/product/soft-leather-brogues-black-1327729001","image_url":"https://media.cos.com/assets/001/34/8c/348c1fb286c1a1ed0c533f1b6451d82488ae4375_xxl-1.jpg","image_urls":["https://media.cos.com/assets/001/34/8c/348c1fb286c1a1ed0c533f1b6451d82488ae4375_xxl-1.jpg","https://media.cos.com/assets/001/c8/03/c8035c3e9285be763217220f391f232c63afbf60_xxl-1.jpg","https://media.cos.com/assets/001/be/2f/be2f381690575a492046d5359cb46bfc5378090f_xxl-1.jpg","https://media.cos.com/assets/001/19/57/19572dba589c5a60f564ec72c2a82df835c05093_xxl-1.jpg","https://media.cos.com/assets/001/ea/42/ea42c2980196bc23f6edc943d36504760ca50af1_xxl-1.jpg","https://media.cos.com/assets/001/5b/a6/5ba6efa53d89114f37d55e7efb5192d1bfc7a9e6_xxl-1.jpg"],"brand":"COS","name":"SOFT LEATHER BROGUES","color":"BLACK","material":"","category":"women/accessories/shoes/loafers","price_text":"1350 kr","price_nok":1350.0,"original_price_nok":0.0,"currency":"NOK","on_sale":false,"store":"COS","score":0.6162845776120253,"in_stock":true,"sizes":[],"external_id":"1327729","canonical_category":"shoes","scandi_score":0.7371785673372564},"rationale":"taupe · complementary tones · scandi-fit","color_name":"taupe","color_score":0.7,"axes_added":[]},{"bucket":"bag","product":{"url":"https://www.cos.com/en-no/product/montmartre-bowling-bag-leather-black-1329680001","image_url":"https://media.cos.com/assets/001/8f/08/8f08163322b214950200009dd31e63916ba535ee_xxl-1.jpg","image_urls":["https://media.cos.com/assets/001/8f/08/8f08163322b214950200009dd31e63916ba535ee_xxl-1.jpg","https://media.cos.com/assets/001/9e/6b/9e6b1f24b2c356d4aebaf09706c7ef4722b72900_xxl-1.jpg","https://media.cos.com/assets/001/37/f9/37f9d8d6de567fa194ca7b6945d028243fba2743_xxl-1.jpg","https://media.cos.com/assets/001/80/ec/80ec64c2de83df39a70e5808c87a9599beb7a904_xxl-1.jpg","https://media.cos.com/assets/001/b5/2e/b52ede75fb9102ece0273be808625b517e3262d5_xxl-1.jpg","https://media.cos.com/assets/001/95/57/9557f330d517dc8845beb6937f67e3aedee2ee2a_xxl-1.jpg","https://media.cos.com/assets/001/e0/ca/e0ca299bd7a223da1fd30443fa46ed8f85f9a42b_xxl-1.jpg","https://media.cos.com/assets/001/04/bd/04bd9ca1d3d3f1ea7222b2aa87a17adfd1beeb21_xxl-1.jpg"],"brand":"COS","name":"MONTMARTRE BOWLING BAG - LEATHER","color":"BLACK","material":"","category":"women/accessories/bags/bowlingbags","price_text":"1700 kr","price_nok":1700.0,"original_price_nok":0.0,"currency":"NOK","on_sale":false,"store":"COS","score":0.7152706570505362,"in_stock":true,"sizes":[],"external_id":"1329680","canonical_category":"bag","scandi_score":0.9249596120639632},"rationale":"black · complementary tones · adds fem softness · scandi-fit","color_name":"black","color_score":0.7,"axes_added":["gender_coding"]}],"total_nok":7739.0,"palette":[{"source":"anchor","lab":[65.47303771972656,3.504080295562744,22.23195457458496],"hex":"#b49c77","name":"sand"},{"source":"dress","lab":[86.19889831542969,-0.43350842595100403,0.07202814519405365],"hex":"#d7d8d7","name":"off-white"},{"source":"shoes","lab":[47.88408279418945,2.724647283554077,12.1608247756958],"hex":"#7e6f5d","name":"taupe"},{"source":"bag","lab":[11.844341278076172,-0.00015537806029897183,-0.00005312907524057664],"hex":"#1f1f1f","name":"black"}],"axes_covered":["formality","structure","surface","gender_coding","weight"],"axes_contrasted":["gender_coding"],"scandi_score":0.7270916492553816}
.long-run/evidence/live_pull_db.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"ok":true,"total_products":10436,"source":"/tmp/hf-pull/taste.db"}
.long-run/logs/backfill-iter-0.log ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Backfilling color/contrast/scandi for 10071 products...
2
+ 200/10071 ok=200 miss=0 err=0 rate=38.8/s eta=254s
3
+ 400/10071 ok=400 miss=0 err=0 rate=62.2/s eta=156s
4
+ 600/10071 ok=600 miss=0 err=0 rate=77.0/s eta=123s
5
+ 800/10071 ok=800 miss=0 err=0 rate=87.2/s eta=106s
6
+ 1000/10071 ok=1000 miss=0 err=0 rate=70.9/s eta=128s
7
+ 1200/10071 ok=1200 miss=0 err=0 rate=58.0/s eta=153s
8
+ 1400/10071 ok=1400 miss=0 err=0 rate=63.0/s eta=138s
9
+ 1600/10071 ok=1600 miss=0 err=0 rate=67.4/s eta=126s
10
+ 1800/10071 ok=1800 miss=0 err=0 rate=71.2/s eta=116s
11
+ 2000/10071 ok=2000 miss=0 err=0 rate=74.8/s eta=108s
12
+ 2200/10071 ok=2200 miss=0 err=0 rate=77.8/s eta=101s
13
+ 2400/10071 ok=2400 miss=0 err=0 rate=80.8/s eta=95s
14
+ 2600/10071 ok=2600 miss=0 err=0 rate=83.3/s eta=90s
15
+ 2800/10071 ok=2800 miss=0 err=0 rate=85.6/s eta=85s
16
+ 3000/10071 ok=3000 miss=0 err=0 rate=87.7/s eta=81s
17
+ 3200/10071 ok=3200 miss=0 err=0 rate=89.6/s eta=77s
18
+ 3400/10071 ok=3400 miss=0 err=0 rate=91.4/s eta=73s
19
+ 3600/10071 ok=3600 miss=0 err=0 rate=93.1/s eta=70s
20
+ 3800/10071 ok=3800 miss=0 err=0 rate=94.6/s eta=66s
21
+ 4000/10071 ok=4000 miss=0 err=0 rate=96.1/s eta=63s
22
+ 4200/10071 ok=4200 miss=0 err=0 rate=97.3/s eta=60s
23
+ 4400/10071 ok=4400 miss=0 err=0 rate=98.5/s eta=58s
24
+ 4600/10071 ok=4600 miss=0 err=0 rate=99.6/s eta=55s
25
+ 4800/10071 ok=4800 miss=0 err=0 rate=100.7/s eta=52s
26
+ 5000/10071 ok=5000 miss=0 err=0 rate=101.8/s eta=50s
27
+ 5200/10071 ok=5200 miss=0 err=0 rate=102.8/s eta=47s
28
+ 5400/10071 ok=5400 miss=0 err=0 rate=103.8/s eta=45s
29
+ 5600/10071 ok=5600 miss=0 err=0 rate=104.6/s eta=43s
30
+ 5800/10071 ok=5800 miss=0 err=0 rate=105.5/s eta=40s
31
+ 6000/10071 ok=6000 miss=0 err=0 rate=106.2/s eta=38s
32
+ 6200/10071 ok=6200 miss=0 err=0 rate=106.8/s eta=36s
33
+ 6400/10071 ok=6400 miss=0 err=0 rate=107.5/s eta=34s
34
+ 6600/10071 ok=6600 miss=0 err=0 rate=99.4/s eta=35s
35
+ 6800/10071 ok=6800 miss=0 err=0 rate=89.0/s eta=37s
36
+ 7000/10071 ok=7000 miss=0 err=0 rate=81.0/s eta=38s
37
+ 7200/10071 ok=7200 miss=0 err=0 rate=74.8/s eta=38s
38
+ 7400/10071 ok=7400 miss=0 err=0 rate=69.8/s eta=38s
39
+ 7600/10071 ok=7600 miss=0 err=0 rate=66.4/s eta=37s
40
+ 7800/10071 ok=7800 miss=0 err=0 rate=66.6/s eta=34s
41
+ 8000/10071 ok=8000 miss=0 err=0 rate=66.9/s eta=31s
42
+ 8200/10071 ok=8200 miss=0 err=0 rate=67.3/s eta=28s
43
+ 8400/10071 ok=8399 miss=1 err=0 rate=64.9/s eta=26s
44
+ 8600/10071 ok=8599 miss=1 err=0 rate=61.4/s eta=24s
45
+ 8800/10071 ok=8798 miss=2 err=0 rate=58.7/s eta=22s
46
+ 9000/10071 ok=8997 miss=3 err=0 rate=59.4/s eta=18s
47
+ 9200/10071 ok=9196 miss=4 err=0 rate=59.9/s eta=15s
48
+ 9400/10071 ok=9396 miss=4 err=0 rate=59.5/s eta=11s
49
+ 9600/10071 ok=9596 miss=4 err=0 rate=59.9/s eta=8s
50
+ 9800/10071 ok=9796 miss=4 err=0 rate=59.9/s eta=5s
51
+ 10000/10071 ok=9996 miss=4 err=0 rate=58.9/s eta=1s
52
+
53
+ Done in 172s. ok=10067 miss=4 err=0
54
+ products.scandi_score populated for 10121 rows