feat: harden governed PyTorch training programme
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-26 17:18:42 +02:00
parent 2be72fac58
commit 36aa3177e7
8 changed files with 156 additions and 10 deletions
@@ -75,6 +75,9 @@ def test_operator_yolo_tile_dataset_export_help_does_not_require_gis_dependencie
assert "--background-negative-repeat" in result.stdout
assert "--drop-low-variance-negatives" in result.stdout
assert "--blank-range-threshold" in result.stdout
assert "--class-name" in result.stdout
assert "--reference-source" in result.stdout
assert "--reference-layer" in result.stdout
def test_default_validation_split_is_explicit_and_rejects_holdout_leakage() -> None:
@@ -305,7 +308,11 @@ def test_export_can_skip_low_variance_negative_tiles(tmp_path: Path, monkeypatch
monkeypatch.setattr(module, "rasterio", FakeRasterio)
monkeypatch.setattr(module, "Image", FakeImage)
monkeypatch.setattr(module, "load_reference_pixel_boxes", lambda reference_path, dataset, min_label_px: [])
monkeypatch.setattr(
module,
"load_reference_pixel_boxes",
lambda reference_path, dataset, min_label_px, **kwargs: [],
)
monkeypatch.setattr(module, "image_array_from_raster_window", fake_image_array_from_raster_window)
records = module.export_sample_tiles(
@@ -327,6 +334,8 @@ def test_export_can_skip_low_variance_negative_tiles(tmp_path: Path, monkeypatch
background_negative_repeat=1,
drop_low_variance_negatives=True,
blank_range_threshold=3,
reference_source="grb",
reference_layer="buildings",
)
skipped = [record for record in records if not record["kept"]]