diff --git a/PyExpUtils/collection/Collector.py b/PyExpUtils/collection/Collector.py index 510d336..e124b30 100644 --- a/PyExpUtils/collection/Collector.py +++ b/PyExpUtils/collection/Collector.py @@ -64,6 +64,10 @@ def __init__(self, config: Dict[str, Sampler | Ignore] = {}, idx: int | None = N self._idxs = set[int]() self._keys = set[str]() + # if an idx is provided add it to the cache + if idx is not None: + self._idxs.add(idx) + # ------------- # -- Context -- # -------------