OasisLMF Changelog - 2.5.6
- #2048 - Add linear interpolation lookup for correlation functions
- #2051 - enhance/supported_oed_versions
- #2052 - enhance/pytools converters dtypes
- #2054 - upgrade cibuildwheels
- #2056 - fix(il): IL outputs non-deterministic when account rows are reordered (#2040)
- #2057 - Extent api client CLI options
- #2061 - Add py3.14 to binary package builds
- #2071 - Fixes for small issues
- #2072 - split get_il_input_items
- #2074 - Switch CI to using UV, replacement for pip-tools
OasisLMF Notes
enhance/supported_oed_versions - (PR #2051)
Delegate supported_oed_versions conversion to OedExposure
Removes the to_version call from GenerateKeys.run() and forwards supported_oed_versions (from model_settings.data_settings) and disable_oed_version_update through get_exposure_data_config() on all computation step entry points. Conversion now happens inside OedExposure.__init__() (ODS_Tools #286), covering all construction paths uniformly.
Updated 3 tests to assert on config forwarding rather than to_version mock calls.
closes OasisLMF/ODS_Tools#230
Support configurable (environment-driven) dtypes across pytools converters
Summary
The pytools binary/CSV converters and event-stream writers previously hard-coded int32/float32 for stream fields (event_id, item_id, sidx, loss, etc.). This branch propagates the configurable dtypes (oasis_int, oasis_float, areaperil_int, driven by the OASIS_INT / OASIS_FLOAT / OASIS_AREAPERIL_TYPE environment variables) through the entire conversion path, so round-trips stay correct when non-default types are configured.
Main changes
Core type handling (common/data.py, common/event_stream.py)
- Add
def_to_type_and_size()helper to resolve a field definition to its(np.dtype, itemsize). - Derive
loss_pair_dtype,item_header_dtype, andsummary_stream_index_dtypefrom the configurable field definitions instead of fixed types. - Split the numba stream writers (
mv_write_item_header,mv_write_sidx_loss) into public wrappers +*_cachedimplementations that take type/size info as arguments, so numba caching stays valid when dtypes change. - Fix an incorrect
section_idheader name (was mislabelledscale2).
Converters (csvtobin & bintocsv )
- Replace hard-coded
int32/float32reads/writes and chunk-size math with dtype-derived sizes and the shared write helpers. - Fix GUL/FM cache-write and delimiter handling,
fmcsvtobin, thebintocsvfm.pyread buffer, and abstract the vulnerability header size.
getmodel & fm (getmodel/common.py, footprint.py, manager.py, vulnerability.py, fm/compare.py, footprintconv.py)
- Use numpy dtypes for
FootprintHeader, fix a circular import, correct footprint/vulnerability type usage, and fix the loss type infm/compare.py.
Tests
- New
test_converters_env.py: runs conversions in a subprocess under adjusted dtype environments and verifies both output equivalence and the serialized dtypes. - Add
envdtypetest assets (items, vulnerability, weights, fm_profile, gul/ils, coverages, damagebin) and refactor the existing converter tests to run as class methods.
upgrades cibuildwheels - (PR #2054)
- upgrades
buildCI to use latest version ofcibuildwheels - fixes #2053
New subcommands
oasislmf api post
Upload files to the platform.
--portfolio-id/--portfolio-name+--oed-location-csv/--oed-accounts-csv/--oed-info-csv/--oed-scope-csv/--currency-conversion-json/--reporting-currency— uploads to a portfolio; omitting--portfolio-idcreates a new one.--analyses-id+--analyses-settings-json— uploads analysis settings (requires--analyses-id).--model-id+--model-settings-json— uploads model settings (requires--model-id).- Errors if nothing is given to upload.
oasislmf api validate
Validate a portfolio's OED exposure files.
--portfolio-id(required).- Default behaviour: triggers a new validation run and polls until it completes, then returns the detailed result.
--get-status— skip triggering/polling, just return the current status snapshot.--poll-interval(default5s).
oasislmf api exposure-run
Runs oasislmf exposure run server-side against a portfolio (mirrors oasislmf exposure run -h flags: -a/--kernel-alloc-rule-il, -A/--kernel-alloc-rule-ri, --model-perils-covered, -l/--loss-factor, --supported-oed-coverage-types, --extra-summary-cols, --fmpy-low-memory, --fmpy-sort-output, --check-oed, --do-disaggregation).
--portfolio-id(required),-o/--output-dirfor the downloaded result.- Default: triggers a run, polls to completion, downloads the result file.
--fetch— skip triggering, just download the last result.--poll-interval(default5s).
oasislmf api exposure-transform
Converts a portfolio's exposure data between OED and AIR.
--portfolio-id,--file-type(location/accounts/ri_info/ri_scope),--mapping-file,--transform-file(all required).- Triggers the transform and polls until complete, then returns the updated portfolio object.
--poll-interval(default5s).
oasislmf api combine
Combines the ORD output of multiple RUN_COMPLETED analyses.
--analysis-ids(required, list),--combine-settings-json(required),--combine-name(defaultcombine-analysis).- Fire-and-forget — returns the immediate API response, no polling.
oasislmf api cancel
Cancels an in-flight analysis (input generation or run, whichever is active).
--analysis-id(required).
oasislmf api sub-tasks
Lists the sub-tasks of an analysis run.
--analysis-id(required).
oasislmf api reconnect
Reconnect to an in-progress analysis and resume polling for status
--analysis-id(required).
oasislmf api plot
Plot a Gantt chart of an analysis's sub-tasks, with a status summary
Changes to existing subcommands
oasislmf api list
- Added
-t/--subtask <id...>— print task-status details fing-m/--models,-p/--portfolios,-a/--analyses).
oasislmf api get
- Added
--subtask-output-log,--subtask-error-log,--subtask-retry-log <id...>— download task-status logs, following the same<id...>list pattern as the existing model/portfolio/analyses download fl
Add py3.14 to binary package builds - (PR #2061)
- Build binary packages for Py3.14
Switch CI to using UV, replacement for pip-tools - (PR #2074)
Swtich to https://github.com/astral-sh/uv instead of pip-tools due to #2070 uv seems faster and shouldn't have dependency issues.