Skip to content

Commit

Permalink
Removed unused prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccorl committed Aug 2, 2024
1 parent b29df2a commit 6f7a306
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion relik/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions relik/inference/annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = []
Expand Down
3 changes: 1 addition & 2 deletions relik/retriever/indexers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__}"

Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6f7a306

Please sign in to comment.