fix: disable dltb priors for gf3 water workflow

This commit is contained in:
2026-06-15 12:42:10 +08:00
parent f726367cbb
commit 21f4bbe500
4 changed files with 19 additions and 8 deletions
+2 -1
View File
@@ -119,7 +119,8 @@ IDL_DINSAR_DEM_BASE_FILE=D:\SRTM30m\SRTMDEM_RSP_SARscape
SRTM_DEM_DIR=D:\SRTM30m
GF3_GEO_DEM_PATH=D:\DEM\gf3_dem.jp2
WATER_RESULTS_DIR=D:\WaterResult
GF3_WATER_DLTB_CACHE_DIR=D:\production_assets\gf3_water\priors\dltb_cache\heilongjiang
GF3_WATER_USE_DLTB=false
GF3_WATER_DLTB_CACHE_DIR=
GF3_WATER_DEM_PATH=
GF3_WATER_DEFAULT_CARTOGRAPHIC=true
GF3_WATER_DEFAULT_OUT_VECTOR=true
+1
View File
@@ -215,6 +215,7 @@ class Settings(BaseSettings):
RADAR_PREVIEW_BUILD_ON_DEMAND: bool = True
WATER_RESULTS_DIR: str = ""
GF3_WATER_USE_DLTB: bool = False
GF3_WATER_DLTB_CACHE_DIR: str = ""
GF3_WATER_DEM_PATH: str = ""
GF3_WATER_DEFAULT_CARTOGRAPHIC: bool = True
@@ -134,10 +134,15 @@ def run_gf3_hh_hv_water_extraction(
hh = _existing_path(hh_path, label="HH input")
hv = _existing_path(hv_path, label="HV input")
dltb_cache_dir = _optional_existing_path(
use_dltb = _as_bool(params.get("use_dltb"), bool(settings.GF3_WATER_USE_DLTB))
dltb_cache_dir = (
_optional_existing_path(
params.get("dltb_cache_dir") or settings.GF3_WATER_DLTB_CACHE_DIR,
label="GF3_WATER_DLTB_CACHE_DIR",
)
if use_dltb
else None
)
dem = _optional_existing_path(
params.get("dem") or params.get("dem_path") or settings.GF3_WATER_DEM_PATH,
label="GF3_WATER_DEM_PATH",
@@ -224,6 +229,7 @@ def run_gf3_hh_hv_water_extraction(
"dltb_cache_dir": str(dltb_cache_dir) if dltb_cache_dir else None,
},
"runtime": {
"dltb_enabled": use_dltb and dltb_cache_dir is not None,
"vector_requested": out_vector,
"vector_runtime_available": vector_runtime_available,
"vector_output_enabled": vector_output_enabled,
@@ -86,12 +86,14 @@ System integration should be written around existing services:
Do not store runtime data in Git.
Required/valuable runtime assets:
Current integration does not use DLTB priors. The GF-3 HH/HV processor runs from SAR backscatter, morphology and optional vector/DEM inputs only.
Optional future runtime assets:
- `D:\Code\Water\data\priors\dltb_cache\heilongjiang`
- Current size observed: 25 files, about 8.5 GB.
- Transfer to a managed runtime asset path, for example `D:\production_assets\gf3_water\priors\dltb_cache\heilongjiang`.
- Configure by `GF3_WATER_DLTB_CACHE_DIR`.
- Do not transfer for the current workflow.
- If DLTB is re-enabled later, transfer to a managed runtime asset path, for example `D:\production_assets\gf3_water\priors\dltb_cache\heilongjiang`, then set `GF3_WATER_USE_DLTB=true` and `GF3_WATER_DLTB_CACHE_DIR`.
Optional runtime assets:
@@ -116,6 +118,7 @@ These are large model artifacts and should stay outside the application until a
Add configuration keys:
- `GF3_WATER_USE_DLTB=false`
- `GF3_WATER_DLTB_CACHE_DIR`
- `GF3_WATER_DEM_PATH`
- `GF3_WATER_DEFAULT_CARTOGRAPHIC=true`
@@ -153,5 +156,5 @@ flowchart TD
## Open Decisions
- Whether runtime execution should be in-process Python API first or always subprocess CLI. Initial integration should use in-process API because it fits the existing worker model and keeps job accounting simple.
- Whether to transfer the 8.5 GB DLTB cache automatically. This should be a deployment operation, not a Git operation.
- DLTB priors are disabled for the current workflow. Re-enabling them later should be a deployment decision because the cache is about 8.5 GB.
- Whether legacy AI4G U-Net should be supported later. It should not block the current HH/HV production chain.