From 88894f814613561ebf8bc7161e994a41037dbe93 Mon Sep 17 00:00:00 2001 From: Callum Tilbury Date: Tue, 12 Mar 2024 15:54:08 +0200 Subject: [PATCH] chore: improved clarity, after chats with Edan --- flashbax/vault/vault.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/flashbax/vault/vault.py b/flashbax/vault/vault.py index f2d75fe..921a05b 100644 --- a/flashbax/vault/vault.py +++ b/flashbax/vault/vault.py @@ -115,6 +115,11 @@ def __init__( # noqa: CCR001 print(f"Loading vault found at {self._base_path}") + if compression is not None: + print( + "Requested compression settings will be ignored as the vault already exists." + ) + elif experience_structure is not None: # Create the necessary dirs for the vault os.makedirs(self._base_path) @@ -230,7 +235,6 @@ def _get_base_spec(self, name: str) -> dict: "base": f"{DRIVER}{self._base_path}", "path": name, }, - "metadata": {}, } def _init_leaf( @@ -259,9 +263,11 @@ def _init_leaf( *shape[2:], # Experience dim(s) ) leaf_dtype = dtype - spec["metadata"]["compressor"] = ( - COMPRESSION_DEFAULT if self._compression is None else self._compression - ) + spec["metadata"] = { + "compressor": COMPRESSION_DEFAULT + if self._compression is None + else self._compression + } leaf_ds = ts.open( spec,