Cache Remap Helper

GitHub Link to Code.

Helper for remapping cache-backed runtime bindings after archive load.

When loading from a sharable archive, cache files are extracted into a fresh runtime cache scope. This helper updates the loaded object graph so memmap and zarr-backed attributes point to that new runtime scope instead of stale original paths.

class mdxplain.pipeline.helper.cache_remap_helper.CacheRemapHelper

Pipeline-local helper for remapping known cache-backed bindings.

Notes

This helper is intentionally software-specific: it only remaps paths and bindings used by mdxplain pipeline state.

static remap_pipeline_memmaps(pipeline_data: PipelineData, runtime_cache_dir: str) None

Remap all known memmap bindings in loaded pipeline data.

Parameters

pipeline_dataPipelineData

Loaded pipeline state whose cache-backed paths/memmaps should be rebound to the current runtime cache scope.

runtime_cache_dirstr

Absolute or relative runtime cache directory used by the current pipeline instance.

Returns

None

Updates objects in-place.