Skip to content

Commit c42bf38

Browse files
committed
fixing model package
1 parent 49a7f09 commit c42bf38

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

makani/convert_checkpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def consolidate_checkpoints(input_path, output_path, checkpoint_version=0):
100100
print(checkpoint_paths)
101101

102102
# load the static data necessary for instantiating the preprocessor (required due to the way the registry works)
103-
LocalPackage._load_static_data(input_path, params)
103+
LocalPackage._load_static_data(LocalPackage(input_path), params)
104104

105105
# get the model
106106
multistep = params.n_future > 0

makani/models/model_package.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
class LocalPackage:
4040
"""
41-
Implements the earth2mip/modulus Package interface.
41+
Implements the modulus Package interface.
4242
"""
4343

4444
# These define the model package in terms of where makani expects the files to be located
@@ -49,7 +49,7 @@ class LocalPackage:
4949
MEANS_FILE = "global_means.npy"
5050
STDS_FILE = "global_stds.npy"
5151
OROGRAPHY_FILE = "orography.nc"
52-
LANDMASK_FILE = "land_mask.nc"
52+
LANDMASK_FILE = "land_sea_mask.nc"
5353
SOILTYPE_FILE = "soil_type.nc"
5454

5555
def __init__(self, root):
@@ -148,11 +148,11 @@ def timestep(self):
148148
def update_state(self, replace_state=True):
149149
self.model.preprocessor.update_internal_state(replace_state=replace_state)
150150
return
151-
151+
152152
def set_rng(self, reset=True, seed=333):
153153
self.model.preprocessor.set_rng(reset=reset, seed=seed)
154154
return
155-
155+
156156
def forward(self, x, time, normalized_data=True, replace_state=None):
157157
if not normalized_data:
158158
x = (x - self.in_bias) / self.in_scale

0 commit comments

Comments
 (0)