Repository navigation
Conversation
…sions PiWindPreAnalysis/model_data had no event set (events_p.bin, occurrence_lt.bin, ...), so no test of this model could run. Copied from PiWindPostcode, whose other model and keys data files are identical. *.bin is gitignored, so these are force-added as in PiWindPostcode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproduces OasisLMF/ODS_Tools#324.
Important
Do not merge until OasisLMF/ODS_Tools#324 is fixed. This test fails on purpose with current ods-tools (5.0.6 and later), so CI is expected to be red on this PR until the fix is released and picked up.
What it adds
PiWindPreAnalysis/tests/test_2runs PiWind (first 20 locations) with:"oed_backend_dtype": "pa_dtype";src/exposure_modification/exposure_pre_analysis_tiv.py(BuildingTIV x2);src/pre_loss/pre_loss_check_exposure.py, that reloads the exposure saved in the run'sinput/folder.oasislmf saves the pre-analysis output as parquet. With
pa_dtype, ods-tools (#277) dictionary-encodes low-cardinality string columns aspd.ArrowDtype(pa.dictionary(...)), and pandas can't read those back from parquet:Within one
oasislmf model runthe exposure is passed between steps in memory, so the saved files are never read back. The Oasis platform runs the steps as separate tasks and does read them back. The pre-loss hook reloads them from disk to cover that case.test_2/README.mdhas the details and the CLI repro.expected_results/comes from the same run with--oed-backend-dtype pd_dtype. In a PiWind comparison, thepd_dtypeandpa_dtypeloss outputs were byte-for-byte identical.Other changes
tests/test_model_runs.py: the skip now names onlyPiWindPreAnalysis/test_1(it needs the Precisely geocoding API), not the whole model, sotest_2runs.PiWindPreAnalysis/model_data: added the missing event data (events_p.bin,occurrence_lt.bin,damage_bin_dict.bin,quantile.bin,returnperiods.bin,vulnerability.bin). Without it no test of this model could run. The files are copied from PiWindPostcode, whose other model and keys data files are identical. They are force-added past the*.bingitignore, as PiWindPostcode does.Testing
test_2coreoasis/model_worker:2.5.9)test_1skipped--oed-backend-dtype pd_dtypeexpected_results/🤖 Generated with Claude Code