diff --git a/src/index/vespa_.py b/src/index/vespa_.py index 13db119..b2fcea5 100644 --- a/src/index/vespa_.py +++ b/src/index/vespa_.py @@ -336,7 +336,6 @@ def populate_vespa( if len(to_process[DOCUMENT_PASSAGE_SCHEMA]) >= config.VESPA_DOCUMENT_BATCH_SIZE: _batch_ingest(vespa, to_process) - _LOGGER.info(f"Clearing batch with length: {len(to_process[DOCUMENT_PASSAGE_SCHEMA])}") to_process.clear() _LOGGER.info("Final ingest batch") diff --git a/src/utils.py b/src/utils.py index e060862..9c526b4 100644 --- a/src/utils.py +++ b/src/utils.py @@ -73,5 +73,4 @@ def filter_on_block_type( def read_npy_file(file_path: Path) -> Any: """Read an npy file.""" - with open(file_path, "rb") as task_array_file_like: - return np.load(BytesIO(task_array_file_like.read())) + return np.load(BytesIO(file_path.read_bytes()))