-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
115 lines (108 loc) · 4.63 KB
/
Copy pathpyproject.toml
File metadata and controls
115 lines (108 loc) · 4.63 KB
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
[project]
name = "varunanet"
version = "0.1.0"
description = "SAR-based flood detection and situational awareness system"
requires-python = ">=3.10"
# Real dependencies get added phase by phase, as the code that actually
# needs them gets written -- not all at once up front. numpy is here first
# because the data contract module operates on numpy arrays; rasterio reads
# the GeoTIFF chips the Sen1Floods11 dataset ships as.
dependencies = [
"numpy",
"rasterio",
"pysheds",
"affine",
"matplotlib",
"scikit-image",
"scikit-learn",
# Phase 3 (primary CNN): torch/torchvision are the training backbone,
# and segmentation_models_pytorch supplies ready-made encoder/decoder
# architectures (U-Net, U-Net++, DeepLabV3+) with ImageNet-pretrained
# weights, so the project spends effort on the experimental design
# instead of re-deriving U-Net from scratch.
"torch",
"torchvision",
"segmentation-models-pytorch",
# Phase 4 (architecture study, spec section 4.3): SegFormer is the
# transformer comparison against the CNN family above -- HuggingFace
# ships it pretrained, segmentation-models-pytorch doesn't.
"transformers",
# Config-driven training loop (spec section 8). omegaconf comes in as
# hydra-core's own dependency, not listed separately.
"hydra-core",
# Experiment tracking, offline mode by default -- SLURM compute nodes
# are often air-gapped (spec section 8).
"wandb",
# Gradient-boosted tree baselines (benchmarks/ml_ensemble.py), alongside
# the Random Forest already covered by scikit-learn above. On macOS these
# need the OpenMP runtime, which isn't a Python dependency: `brew install
# libomp` (see infra/Dockerfile.train for the Linux equivalent).
"xgboost",
"lightgbm",
# Phase 5 (serving pipeline, spec section 5): the trained model is
# exported to ONNX and served through ONNX Runtime so the inference
# service never needs torch. That is the whole point of the split
# between infra/Dockerfile.train (CUDA, heavy) and Dockerfile.serve
# (slim) -- onnxruntime is a ~50MB wheel against torch's ~2GB tree.
# onnxscript is not optional: torch's current exporter imports it, and
# without it torch.onnx.export fails with ModuleNotFoundError rather
# than anything that points at the real cause.
"onnx",
"onnxruntime",
"onnxscript",
# Vectorizing the flood mask to polygons for PostGIS
# (inference/vectorize.py). shapely does the geometry; pyproj computes
# true ellipsoidal areas, which is not optional -- Sen1Floods11 chips
# are EPSG:4326, so a planar area on them is in square degrees and a
# fully flooded scene reports zero hectares. pyproj arrives as a
# rasterio dependency but is listed explicitly because this project
# imports it directly.
"shapely",
"pyproj",
# The inference service itself (inference/service.py). uvicorn is the
# ASGI server the container runs; httpx backs fastapi's TestClient, so
# the HTTP surface can be tested without binding a port.
"fastapi",
"uvicorn[standard]",
"httpx",
# Real Assam Sentinel-1 ingestion (spec section 15.4, Track B Step 3):
# data/fetch_assam_scene.py and data/build_assam_demo.py pull real
# scenes via Google Earth Engine and download them over plain HTTP.
"earthengine-api",
"requests",
]
[project.optional-dependencies]
# Tools for local development only; not needed to run the project itself.
dev = [
"ruff",
"black",
"pytest",
"jupyter",
"nbconvert",
"ipykernel",
]
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
# Only these folders contain importable Python code. Without this list,
# setuptools would also try to package non-Python folders like frontend/.
packages = ["data", "models", "training", "benchmarks", "inference"]
[tool.black]
line-length = 100
target-version = ["py310"]
[tool.ruff]
line-length = 100
# training/kaggle_train.ipynb runs on Kaggle, not in this repo's own test
# suite (see VarunaNet_Spec.md's environment notes: black already skips
# .ipynb files the same way, since black[jupyter] isn't installed) --
# lines like a real "!pip install ..." cell or an f-string printing several
# metrics at once read better long and un-wrapped than split just to satisfy
# a line-length rule meant for this project's actual source files.
extend-exclude = ["training/kaggle_train.ipynb"]
[tool.ruff.lint]
# Default rule set plus import-sorting, so `ruff check` also catches
# unsorted/unused imports instead of needing a separate isort run.
select = ["E", "F", "I"]
[tool.pytest.ini_options]
testpaths = ["tests"]