Skip to content

Commit e681f3c

Browse files
committed
chore: launch checklist and flood smoke-test model artifacts
1 parent d7a41c7 commit e681f3c

8 files changed

Lines changed: 272 additions & 0 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.onnx filter=lfs diff=lfs merge=lfs -text

LAUNCH_CHECKLIST.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# ClimateVision — Go-Live Checklist (climatevision.green)
2+
3+
Work top to bottom. Anything in **🔴 Blocker** must be done before the site is
4+
publicly announced. **🟠 Important** should be done launch day. **🟢 Nice-to-have**
5+
can follow.
6+
7+
---
8+
9+
## 🔴 Blockers — do these first
10+
11+
- [ ] **Rotate the leaked GEE key.** The `climatevision-gee@kinos-473422`
12+
service-account private key was shared in plaintext. In Google Cloud
13+
Console → IAM → Service Accounts → Keys: delete that key, create a new one.
14+
- [ ] **Set secrets as runtime env vars, never in the repo.** Run
15+
`./scripts/setup_render_secrets.sh` (Render) or `./scripts/setup_fly_secrets.sh`
16+
(Fly). Confirm none of these appear in any committed file:
17+
`GEE_SERVICE_ACCOUNT`, `GEE_SERVICE_ACCOUNT_KEY_JSON`, `GEE_PROJECT_ID`,
18+
`ANTHROPIC_API_KEY`, `API_SECRET_KEY`.
19+
- [ ] **Confirm `CLIMATEVISION_ALLOW_DEV_KEY=0` in production.** It is set in
20+
`render.yaml`; verify it on Fly too. A live dev key bypasses API-key auth.
21+
- [ ] **Decide the truth-in-labeling posture.** Until trained weights are
22+
deployed, predictions come from untrained/synthetic models. Either:
23+
(a) label the product a **technical preview** in the UI and API responses, or
24+
(b) deploy trained weights first (see `notebooks/TRAINING_PIPELINE.md`).
25+
Do **not** ship unlabeled demo output to NGOs/agencies as real monitoring.
26+
- [ ] **Rotate the teammate Personal Access Tokens** stored in `.git/config`
27+
(franchaise, olufemi, and previously hopelyn). They were printed in plaintext.
28+
29+
---
30+
31+
## 🟠 Important — launch day
32+
33+
- [ ] **CORS matches the domain.** `render.yaml` sets
34+
`CLIMATEVISION_CORS_ORIGINS=https://climatevision.green,https://www.climatevision.green`.
35+
Confirm the deployed env has it and that the frontend is built with the
36+
right `VITE_API_BASE_URL` (empty = same-origin, which is correct here).
37+
- [ ] **DNS → host.** Point `climatevision.green` (and `www`) at Render/Fly and
38+
verify HTTPS (`force_https = true` is set in `fly.toml`).
39+
- [ ] **Persistent storage is mounted.** `fly.toml` mounts `climatevision_data`
40+
at `/app/outputs` and `DATABASE_URL=sqlite:///app/outputs/...`. Confirm the
41+
volume exists so run history + the NGO/alerts DB survive restarts.
42+
(On Render free tier, confirm the disk is attached — otherwise SQLite is
43+
ephemeral and you lose registrations on redeploy.)
44+
- [ ] **Health checks green.** Hit `/api/health` and `/api/health/models` on the
45+
live URL. `/api/health/models` will tell you whether real weights loaded.
46+
- [ ] **Smoke test the core flow.** One `POST /api/predict` and one dashboard
47+
load against the live site. Confirm `/docs` renders.
48+
- [ ] **Merge the flood-detection PR** (committed under your name) so the live
49+
build includes it.
50+
51+
---
52+
53+
## 🟢 Nice-to-have — this week
54+
55+
- [ ] Deploy real trained weights for flooding first (best dataset fit:
56+
Sen1Floods11), then deforestation and ice. Follow `TRAINING_PIPELINE.md`.
57+
- [ ] Fill in the README benchmark table (IoU / F1) once a run passes the
58+
governance gate — replaces the "in progress" placeholders.
59+
- [ ] Add a status/uptime check and basic error monitoring.
60+
- [ ] Record dataset `provenance.json` + model cards for each deployed model
61+
(credibility for government adoption).
62+
- [ ] Push the 21 unpushed `main` commits and confirm CI is green on `main`.
63+
64+
---
65+
66+
## Quick verification commands (run after deploy)
67+
68+
```bash
69+
curl -s https://climatevision.green/api/health | jq
70+
curl -s https://climatevision.green/api/health/models | jq # are real weights loaded?
71+
curl -s https://climatevision.green/api/analysis-types | jq
72+
```
73+
74+
If `/api/health/models` shows untrained/demo, you are still in preview mode —
75+
which is fine, as long as the UI says so.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
analysis:
2+
type: flooding
3+
data:
4+
batch_size: 2
5+
dir: data/processed/flood
6+
image_size: 128
7+
num_workers: 4
8+
pin_memory: true
9+
use_weighted_sampler: true
10+
loss:
11+
focal_alpha: 0.25
12+
focal_gamma: 2.0
13+
focal_weight: 0.5
14+
type: combined
15+
use_class_weights: true
16+
model:
17+
architecture: attention_unet
18+
bilinear: true
19+
in_channels: 4
20+
num_classes: 2
21+
normalizer_stats: ''
22+
optimizer:
23+
learning_rate: 0.0001
24+
min_lr: 1.0e-06
25+
weight_decay: 0.0001
26+
output:
27+
run_name: ''
28+
save_dir: models
29+
schedule:
30+
checkpoint_interval: 10
31+
epochs: 2
32+
warmup_epochs: 5
33+
training:
34+
early_stopping_patience: 15
35+
ema_decay: 0.99
36+
grad_clip: 1.0
37+
mixed_precision: true
38+
use_ema: true
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
analysis:
2+
type: flooding
3+
data:
4+
batch_size: 4
5+
dir: data/processed/flood
6+
image_size: 128
7+
num_workers: 4
8+
pin_memory: true
9+
use_weighted_sampler: true
10+
loss:
11+
focal_alpha: 0.25
12+
focal_gamma: 2.0
13+
focal_weight: 0.5
14+
type: combined
15+
use_class_weights: true
16+
model:
17+
architecture: attention_unet
18+
bilinear: true
19+
in_channels: 4
20+
num_classes: 2
21+
normalizer_stats: ''
22+
optimizer:
23+
learning_rate: 0.0001
24+
min_lr: 1.0e-06
25+
weight_decay: 0.0001
26+
output:
27+
run_name: ''
28+
save_dir: models
29+
schedule:
30+
checkpoint_interval: 10
31+
epochs: 1
32+
warmup_epochs: 5
33+
training:
34+
early_stopping_patience: 15
35+
ema_decay: 0.99
36+
grad_clip: 1.0
37+
mixed_precision: true
38+
use_ema: true
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
analysis:
2+
type: flooding
3+
data:
4+
batch_size: 4
5+
dir: data/processed/flood
6+
image_size: 128
7+
num_workers: 4
8+
pin_memory: true
9+
use_weighted_sampler: true
10+
loss:
11+
focal_alpha: 0.25
12+
focal_gamma: 2.0
13+
focal_weight: 0.5
14+
type: combined
15+
use_class_weights: true
16+
model:
17+
architecture: attention_unet
18+
bilinear: true
19+
encoder: efficientnet-b7
20+
in_channels: 4
21+
num_classes: 2
22+
normalizer_stats: ''
23+
optimizer:
24+
learning_rate: 0.0001
25+
min_lr: 1.0e-06
26+
weight_decay: 0.0001
27+
output:
28+
run_name: ''
29+
save_dir: models
30+
schedule:
31+
checkpoint_interval: 10
32+
epochs: 1
33+
warmup_epochs: 5
34+
training:
35+
early_stopping_patience: 15
36+
ema_decay: 0.99
37+
grad_clip: 1.0
38+
mixed_precision: true
39+
use_ema: true
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
analysis:
2+
type: flooding
3+
data:
4+
batch_size: 4
5+
dir: data/processed/flood
6+
image_size: 128
7+
num_workers: 4
8+
pin_memory: true
9+
use_weighted_sampler: true
10+
loss:
11+
focal_alpha: 0.25
12+
focal_gamma: 2.0
13+
focal_weight: 0.5
14+
type: combined
15+
use_class_weights: true
16+
model:
17+
architecture: flood_unet
18+
bilinear: true
19+
encoder: efficientnet-b7
20+
in_channels: 3
21+
num_classes: 3
22+
normalizer_stats: ''
23+
optimizer:
24+
learning_rate: 0.0001
25+
min_lr: 1.0e-06
26+
weight_decay: 0.0001
27+
output:
28+
run_name: ''
29+
save_dir: models
30+
schedule:
31+
checkpoint_interval: 10
32+
epochs: 1
33+
warmup_epochs: 5
34+
training:
35+
early_stopping_patience: 15
36+
ema_decay: 0.99
37+
grad_clip: 1.0
38+
mixed_precision: true
39+
use_ema: true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:fc36b1b461971634baad91ccdccd8c6b2bcb7086d5a48817d0636a73854af06d
3+
size 265923354
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
analysis:
2+
type: flooding
3+
data:
4+
batch_size: 2
5+
dir: data/processed/flood
6+
image_size: 256
7+
num_workers: 4
8+
pin_memory: true
9+
use_weighted_sampler: true
10+
loss:
11+
focal_alpha: 0.25
12+
focal_gamma: 2.0
13+
focal_weight: 0.5
14+
type: combined
15+
use_class_weights: true
16+
model:
17+
architecture: flood_unet_s2only
18+
bilinear: true
19+
encoder: efficientnet-b7
20+
in_channels: 3
21+
num_classes: 3
22+
normalizer_stats: ''
23+
optimizer:
24+
learning_rate: 0.0001
25+
min_lr: 1.0e-06
26+
weight_decay: 0.0001
27+
output:
28+
run_name: flood_synthetic_test
29+
save_dir: models
30+
schedule:
31+
checkpoint_interval: 5
32+
epochs: 5
33+
warmup_epochs: 3
34+
training:
35+
early_stopping_patience: 10
36+
ema_decay: 0.99
37+
grad_clip: 1.0
38+
mixed_precision: false
39+
use_ema: true

0 commit comments

Comments
 (0)