Skip to content

Commit 45ce60e

Browse files
committed
[CLN] Simplify Hecho example by removing serialization logic and enhancing validation
Removed redundant save/load and serialization validation in the Hecho example. Adjusted section grid to ensure consistent tuple formatting and enabled `validate_serialization` in model computation.
1 parent ca90825 commit 45ce60e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

examples/examples/real/Hecho.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
gp.set_section_grid(
128128
grid=geo_model.grid,
129129
section_dict={
130-
'section': ([0, 0], [16, 0], [321, 91])
130+
'section': ((0., 0.), (16., 0.), (321, 91))
131131
},
132132
)
133133

@@ -218,10 +218,6 @@
218218
# Setting verbose and condition number options for debugging
219219
geo_model.interpolation_options.kernel_options.compute_condition_number = True
220220

221-
gp.save_model(geo_model, 'Hecho.gempy')
222-
model_deserialized = gp.load_model('Hecho.gempy')
223-
224-
_validate_serialization(geo_model, model_deserialized)
225221

226222
# %%
227223
gp.compute_model(
@@ -230,7 +226,7 @@
230226
backend=gp.data.AvailableBackends.PYTORCH,
231227
dtype='float64'
232228
),
233-
validate_serialization=False
229+
validate_serialization=True
234230
)
235231

236232
# %%

0 commit comments

Comments
 (0)