$srun --pty --nodes=1 --ntasks-per-node=1 -p shared -t 00:10:00 -A csb175 /bin/bash srun: job 15089436 queued and waiting for resources srun: job 15089436 has been allocated resources [tyang@exp-1-05 python]$ python Python 3.6.13 |Anaconda, Inc.| (default, Jun 4 2021, 14:25:59) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from pyserini.search import SimpleSearcher >>> searcher = SimpleSearcher.from_prebuilt_index('robust04') Attempting to initialize pre-built index robust04. Downloading index at https://rgw.cs.uwaterloo.ca/JIMMYLIN-bucket0/pyserini-indexes/index-robust04-20191213.tar.gz... index-robust04-20191213.tar.gz: 1.70GB [00:44, 40.7MB/s] Extracting /home/tyang/.cache/pyserini/indexes/index-robust04-20191213.tar.gz into /home/tyang/.cache/pyserini/indexes/index-robust04-20191213.15f3d001489c97849a010b0a4734d018... Initializing robust04... SimpleSearcher class has been deprecated, please use LuceneSearcher from pyserini.search.lucene instead >>> hits = searcher.search('hubble space telescope') >>> >>> for i in range(0, 10): print(f'{i+1:2} {hits[i].docid:15} {hits[i].score:.5f}') ... 1 LA071090-0047 16.85690 2 FT934-5418 16.75630 3 FT921-7107 16.68290 4 LA052890-0021 16.37390 5 LA070990-0052 16.36460 6 LA062990-0180 16.19260 7 LA070890-0154 16.15610 8 FT934-2516 16.08950 9 LA041090-0148 16.08810 10 FT944-128 16.01920 >>> >>>quit() [tyang@exp-1-05 python]$ exit