diff --git a/relik/common/utils.py b/relik/common/utils.py index b0a9463..9be7012 100644 --- a/relik/common/utils.py +++ b/relik/common/utils.py @@ -339,7 +339,7 @@ def download_from_hf( downloaded_paths.append(downloaded_path) except OSError: if ignore_failure: - logger.error( + logger.warn( f"Couldn't download {filename} from {path_or_repo_id}, ignoring" ) else: diff --git a/relik/inference/annotator.py b/relik/inference/annotator.py index 6fc51fd..44db8b0 100644 --- a/relik/inference/annotator.py +++ b/relik/inference/annotator.py @@ -551,8 +551,6 @@ def __call__( windows = windows + blank_windows windows.sort(key=lambda x: (x.doc_id, x.offset)) - print(windows) - # if there is no reader, just return the windows if self.reader is None: # normalize window candidates to be a list of lists, like when the reader is used @@ -563,7 +561,6 @@ def __call__( merged_windows = self.window_manager.merge_windows(windows) # transform predictions into RelikOutput objects - print(merged_windows) output = [] for w in merged_windows: span_labels = [] diff --git a/relik/retriever/indexers/base.py b/relik/retriever/indexers/base.py index e48e707..ff7a621 100644 --- a/relik/retriever/indexers/base.py +++ b/relik/retriever/indexers/base.py @@ -445,7 +445,7 @@ def from_pretrained( config = OmegaConf.load(config_path) # add the actual cls class to the config in place of the _target_ if cls is not BaseDocumentIndex - target = config.pop("_target_", None) + target = config.get("_target_", None) if cls.__name__ != "BaseDocumentIndex" and target is None: kwargs["_target_"] = f"{cls.__module__}.{cls.__name__}" @@ -483,7 +483,6 @@ def from_pretrained( # boolean variables to check if the index and embeddings exist index_exists = index_path.exists() embeddings_exists = embedding_path.exists() - # use_faiss = "FaissDocumentIndex" in cls.__name__ if use_faiss: if index_exists: diff --git a/requirements.txt b/requirements.txt index 004bc31..7ac7f93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ torch==2.3.1 transformers[sentencepiece]>=4.41,<4.42 rich>=13.0.0,<14.0.0 -scikit-learn>=1.3,<1.4 +scikit-learn>=1.5,<1.6 overrides>=7.4,<7.9 art==6.2 pprintpp==0.4.0 @@ -28,12 +28,12 @@ faiss-cpu==1.8.0 # needed by: faiss # serve fastapi>=0.112,<0.113 # needed by: serve, ray uvicorn[standard]==0.23.2 # needed by: serve, ray -gunicorn==21.2.0 # needed by: serve, ray +gunicorn==22.0.0 # needed by: serve, ray streamlit>=1.28,<1.29 # needed by: serve, ray streamlit_extras>=0.3,<0.4 # needed by: serve, ray gradio>=4.37,<4.38 # needed by: serve, ray pyvis # needed by: serve, ray -ray[serve]>=2.7,<=2.8 # needed by: ray +ray[serve]>=2.34,<=2.35 # needed by: ray # dev pre-commit # needed by: dev