jtlevine commited on
Commit
901698f
·
1 Parent(s): 55176eb

Fix FEATURES_PATH resolution for Docker (COPY to /app) vs local

Browse files
Files changed (1) hide show
  1. src/downscaling/uhi_lst_model.py +3 -1
src/downscaling/uhi_lst_model.py CHANGED
@@ -36,8 +36,10 @@ from src.downscaling.uhi_model import (
36
  )
37
 
38
  LST_TO_AIR_SCALE = 0.5
 
 
39
  FEATURES_PATH = (
40
- Path.home() / "climate-risk-engine" / "data" / "landsat_lst" / "zone_features.json"
41
  )
42
 
43
 
 
36
  )
37
 
38
  LST_TO_AIR_SCALE = 0.5
39
+ # Repo-root-relative so Docker (COPY to /app) and local (~/climate-risk-engine)
40
+ # both resolve: src/downscaling/uhi_lst_model.py → parents[2] is the repo root.
41
  FEATURES_PATH = (
42
+ Path(__file__).resolve().parents[2] / "data" / "landsat_lst" / "zone_features.json"
43
  )
44
 
45