Skip to content

Commit 482db1f

Browse files
authored
Merge pull request #8 from ihmeuw/feature/rmbarber/updated-v7.1-full
include additional years found in 7.1 update; drop experiment 101 ref…
2 parents 51b1985 + f39d9e3 commit 482db1f

File tree

6 files changed

+136
-19
lines changed

6 files changed

+136
-19
lines changed

poetry.lock

Lines changed: 126 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ dependencies = [
2525
"scikit-image>=0.25.1",
2626
"pypdf>=3.9.0",
2727
"contextily>=1.6.2",
28-
28+
"xarray>=2025.7.0",
29+
"netCDF4>=1.7.2",
2930
]
3031

3132
[project.urls]

src/rra_population_model/constants.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def to_list(cls) -> list[str]:
2727

2828
class BuiltVersion(BaseModel):
2929
provider: Literal["ghsl", "microsoft"]
30-
version: Literal["v6", "v7", "v7_1", "v7_e101", "r2023a"]
30+
version: Literal["v6", "v7", "v7_1", "r2023a"]
3131
time_points: list[str]
3232
measures: list[str]
3333

@@ -83,16 +83,9 @@ def time_points_float(self) -> list[float]:
8383
"microsoft_v7_1": BuiltVersion(
8484
provider="microsoft",
8585
version="v7_1",
86-
time_points=['2020q2', '2024q2'],
87-
measures=[
88-
"density",
89-
"height",
90-
],
91-
),
92-
"microsoft_v7_e101": BuiltVersion(
93-
provider="microsoft",
94-
version="v7_e101",
95-
time_points=['2023q4'],
86+
time_points=[
87+
f"{y}q{q}" for y, q in itertools.product(range(2020, 2025), range(1, 5))
88+
][1:-2],
9689
measures=[
9790
"density",
9891
"height",

src/rra_population_model/model/inference/runner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def inference(
130130
pm_data = PopulationModelData(output_dir)
131131
feature_time_points = pm_data.list_feature_time_points(resolution)
132132
time_points = clio.convert_choice(time_point, feature_time_points)
133+
time_points = sorted([time_point for time_point in time_points if time_point.startswith('202')])
133134
print(f"Running inference for {len(time_points)} time points.")
134135

135136
jobmon.run_parallel(

src/rra_population_model/model_prep/features/runner.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717

1818
# GHSL first, as we need the residential mask for msft
1919
BUILT_VERSIONS = [
20-
# pmc.BUILT_VERSIONS["ghsl_r2023a"],
21-
# pmc.BUILT_VERSIONS["microsoft_v6"],
22-
# pmc.BUILT_VERSIONS["microsoft_v7"],
20+
pmc.BUILT_VERSIONS["ghsl_r2023a"],
21+
pmc.BUILT_VERSIONS["microsoft_v6"],
22+
pmc.BUILT_VERSIONS["microsoft_v7"],
2323
pmc.BUILT_VERSIONS["microsoft_v7_1"],
24-
pmc.BUILT_VERSIONS["microsoft_v7_e101"],
2524
]
2625

2726

src/rra_population_model/postprocess/rake/runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ def rake(
105105
rf_time_points = pm_data.list_raking_factor_time_points(resolution, version)
106106

107107
time_points = clio.convert_choice(time_point, rf_time_points)
108-
# time_points = sorted([time_point for time_point in time_points if time_point.startswith('202')])
109108

110109
model_frame = pm_data.load_modeling_frame(resolution)
111110
block_keys = model_frame.block_key.unique().tolist()

0 commit comments

Comments
 (0)