fix: disable dltb priors for gf3 water workflow
This commit is contained in:
+2
-1
@@ -119,7 +119,8 @@ IDL_DINSAR_DEM_BASE_FILE=D:\SRTM30m\SRTMDEM_RSP_SARscape
|
|||||||
SRTM_DEM_DIR=D:\SRTM30m
|
SRTM_DEM_DIR=D:\SRTM30m
|
||||||
GF3_GEO_DEM_PATH=D:\DEM\gf3_dem.jp2
|
GF3_GEO_DEM_PATH=D:\DEM\gf3_dem.jp2
|
||||||
WATER_RESULTS_DIR=D:\WaterResult
|
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_DEM_PATH=
|
||||||
GF3_WATER_DEFAULT_CARTOGRAPHIC=true
|
GF3_WATER_DEFAULT_CARTOGRAPHIC=true
|
||||||
GF3_WATER_DEFAULT_OUT_VECTOR=true
|
GF3_WATER_DEFAULT_OUT_VECTOR=true
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ class Settings(BaseSettings):
|
|||||||
RADAR_PREVIEW_BUILD_ON_DEMAND: bool = True
|
RADAR_PREVIEW_BUILD_ON_DEMAND: bool = True
|
||||||
|
|
||||||
WATER_RESULTS_DIR: str = ""
|
WATER_RESULTS_DIR: str = ""
|
||||||
|
GF3_WATER_USE_DLTB: bool = False
|
||||||
GF3_WATER_DLTB_CACHE_DIR: str = ""
|
GF3_WATER_DLTB_CACHE_DIR: str = ""
|
||||||
GF3_WATER_DEM_PATH: str = ""
|
GF3_WATER_DEM_PATH: str = ""
|
||||||
GF3_WATER_DEFAULT_CARTOGRAPHIC: bool = True
|
GF3_WATER_DEFAULT_CARTOGRAPHIC: bool = True
|
||||||
|
|||||||
@@ -134,9 +134,14 @@ def run_gf3_hh_hv_water_extraction(
|
|||||||
|
|
||||||
hh = _existing_path(hh_path, label="HH input")
|
hh = _existing_path(hh_path, label="HH input")
|
||||||
hv = _existing_path(hv_path, label="HV 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))
|
||||||
params.get("dltb_cache_dir") or settings.GF3_WATER_DLTB_CACHE_DIR,
|
dltb_cache_dir = (
|
||||||
label="GF3_WATER_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(
|
dem = _optional_existing_path(
|
||||||
params.get("dem") or params.get("dem_path") or settings.GF3_WATER_DEM_PATH,
|
params.get("dem") or params.get("dem_path") or settings.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,
|
"dltb_cache_dir": str(dltb_cache_dir) if dltb_cache_dir else None,
|
||||||
},
|
},
|
||||||
"runtime": {
|
"runtime": {
|
||||||
|
"dltb_enabled": use_dltb and dltb_cache_dir is not None,
|
||||||
"vector_requested": out_vector,
|
"vector_requested": out_vector,
|
||||||
"vector_runtime_available": vector_runtime_available,
|
"vector_runtime_available": vector_runtime_available,
|
||||||
"vector_output_enabled": vector_output_enabled,
|
"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.
|
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`
|
- `D:\Code\Water\data\priors\dltb_cache\heilongjiang`
|
||||||
- Current size observed: 25 files, about 8.5 GB.
|
- 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`.
|
- Do not transfer for the current workflow.
|
||||||
- Configure by `GF3_WATER_DLTB_CACHE_DIR`.
|
- 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:
|
Optional runtime assets:
|
||||||
|
|
||||||
@@ -116,6 +118,7 @@ These are large model artifacts and should stay outside the application until a
|
|||||||
|
|
||||||
Add configuration keys:
|
Add configuration keys:
|
||||||
|
|
||||||
|
- `GF3_WATER_USE_DLTB=false`
|
||||||
- `GF3_WATER_DLTB_CACHE_DIR`
|
- `GF3_WATER_DLTB_CACHE_DIR`
|
||||||
- `GF3_WATER_DEM_PATH`
|
- `GF3_WATER_DEM_PATH`
|
||||||
- `GF3_WATER_DEFAULT_CARTOGRAPHIC=true`
|
- `GF3_WATER_DEFAULT_CARTOGRAPHIC=true`
|
||||||
@@ -153,5 +156,5 @@ flowchart TD
|
|||||||
## Open Decisions
|
## 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 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.
|
- Whether legacy AI4G U-Net should be supported later. It should not block the current HH/HV production chain.
|
||||||
|
|||||||
Reference in New Issue
Block a user