nirs4all.pipeline.storage.artifacts.artifact_loader module
Artifact Loader V3 - Chain-based artifact loading for prediction replay.
This module provides the ArtifactLoader class which loads artifacts using the V3 chain-based identification system. It supports:
Loading by V3 artifact ID (pipeline$hash:fold)
Loading by operator chain path
Loading by step/branch/source/fold context
Transitive dependency resolution for stacking
Per-fold model loading for CV averaging
LRU caching for efficient reuse
V3 Key Features: - Chain path indexing for deterministic artifact lookup - Source index tracking for multi-source pipelines - Unified handling of branching, stacking, and bundles
The loader works with centralized storage at workspace/binaries/<dataset>/ and reads artifact metadata from V3 manifests.
- class nirs4all.pipeline.storage.artifacts.artifact_loader.LRUCache(max_size: int = 100)[source]
Bases:
objectSimple LRU cache with configurable max size.
Uses OrderedDict for O(1) access and LRU eviction.
- get(key: str) Any | None[source]
Get item from cache, moving to end (most recently used).
- Parameters:
key – Cache key
- Returns:
Cached value or None if not found