diff --git a/nxontology_ml/gpt_tagger/_cache.py b/nxontology_ml/gpt_tagger/_cache.py index 85d70a5..f635e9f 100644 --- a/nxontology_ml/gpt_tagger/_cache.py +++ b/nxontology_ml/gpt_tagger/_cache.py @@ -100,6 +100,7 @@ def __init__(self, filename: str, **kwargs: ParamSpecKwargs): def __open_db(self) -> None: if not self._lsm: + Path(self._filename).parent.mkdir(parents=True, exist_ok=True) self._lsm = LSM(filename=self._filename, **self._lsm_kwargs) def __setitem__(self, __k: str, __v: bytes) -> None: