Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring documentation for some dense models #2003

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Conversation

lintool
Copy link
Member

@lintool lintool commented Oct 3, 2024

  • Fixed the following: ance, sbert, bpr, distillbert-tasb, distillbert-kd, dkrr
  • At numpy 1.26.4, fixed following issue:
Traceback (most recent call last):
  File "/home/jimmylin/.conda/envs/pyserini-dev7/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/jimmylin/.conda/envs/pyserini-dev7/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tuna1/scratch/jimmylin/pyserini/pyserini/search/faiss/__main__.py", line 296, in <module>
    results = searcher.batch_search(batch_topics, batch_topic_ids, args.hits, threads=args.threads,
  File "/tuna1/scratch/jimmylin/pyserini/pyserini/search/faiss/_searcher.py", line 723, in batch_search
    D, I = self.binary_dense_search(k, binary_k, rerank, dense_q_embs, sparse_q_embs)
  File "/tuna1/scratch/jimmylin/pyserini/pyserini/search/faiss/_searcher.py", line 749, in binary_dense_search
    indexes = np.array([self.index.id_map.at(int(id_)) for id_ in indexes.reshape(-1)], dtype=np.int)
  File "/home/jimmylin/.conda/envs/pyserini-dev7/lib/python3.10/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations.

@lintool lintool requested a review from MXueguang October 3, 2024 19:16
@lintool lintool merged commit 33ab20b into master Oct 3, 2024
@lintool lintool deleted the doc-refactoring branch October 3, 2024 22:24
lintool added a commit that referenced this pull request Oct 4, 2024
Follow up to #2003 - finished refactoring docs for dpr, tct1, and tct2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants