Skip to content

Commit

Permalink
Updated regression log, fixed unit tests (#1562)
Browse files Browse the repository at this point in the history
+ Updated regression docs to record overhaul of regressions for MS MARCO {passage, doc} and DL {19, 20}.
+ Turned back on assert in e2e unit test that was previously commented out accidentally.
  • Loading branch information
lintool committed Jun 15, 2021
1 parent bc00a5c commit 5e8743f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
10 changes: 10 additions & 0 deletions docs/regressions-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
The following change log details commits to regression tests that alter effectiveness and the addition of new regression tests.
This documentation is useful for figuring why results may have changed over time.

### June 14, 2021

+ commit [`b58c85`](https://github.com/castorini/anserini/commit/b58c8559b4fc473e857b9ce5ca73523d8d017b41) (06/14/2021)

Overhauled regressions for MS MARCO {passage, doc} and DL {19, 20}:
+ MS MARCO passage + {doc2query, docTTTTTquery}
+ MS MARCO doc {per-doc, per-passage} x {doc2query, docTTTTTquery}
+ {DL19, DL20} passage + {doc2query, docTTTTTquery}
+ {DL19, DL20} doc {per-doc, per passage} x {doc2query, docTTTTTquery}

### April 13, 2021

+ commit [`868afe`](https://github.com/castorini/anserini/commit/868afe9ec07fa477ce817d7a43dd5723cb4c8a86) (04/13/2021)
Expand Down
4 changes: 2 additions & 2 deletions docs/regressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ nohup python src/main/python/run_regression.py --collection dl19-doc-docTTTTTque
nohup python src/main/python/run_regression.py --collection dl19-doc-docTTTTTquery-per-passage >& logs/log.dl19-doc-docTTTTTquery-per-passage &
nohup python src/main/python/run_regression.py --collection dl20-passage >& logs/log.dl20-passage &
nohup python src/main/python/run_regression.py --collection dl20-passage-docTTTTTquery >& logs/dl20-passage-docTTTTTquery &
nohup python src/main/python/run_regression.py --collection dl20-passage-docTTTTTquery >& logs/log.dl20-passage-docTTTTTquery &
nohup python src/main/python/run_regression.py --collection dl20-doc >& logs/log.dl20-doc &
nohup python src/main/python/run_regression.py --collection dl20-doc-per-passage >& logs/log.dl20-doc-per-passage &
nohup python src/main/python/run_regression.py --collection dl20-doc-docTTTTTquery-per-doc >& logs/log.dl20-doc-docTTTTTquery-per-doc &
Expand Down Expand Up @@ -128,7 +128,7 @@ nohup python src/main/python/run_regression.py --index --collection dl19-doc-doc
nohup python src/main/python/run_regression.py --index --collection dl19-doc-docTTTTTquery-per-passage >& logs/log.dl19-doc-docTTTTTquery-per-passage &
nohup python src/main/python/run_regression.py --index --collection dl20-passage >& logs/log.dl20-passage &
nohup python src/main/python/run_regression.py --index --collection dl20-passage-docTTTTTquery >& logs/dl20-passage-docTTTTTquery &
nohup python src/main/python/run_regression.py --index --collection dl20-passage-docTTTTTquery >& logs/log.dl20-passage-docTTTTTquery &
nohup python src/main/python/run_regression.py --index --collection dl20-doc >& logs/log.dl20-doc &
nohup python src/main/python/run_regression.py --index --collection dl20-doc-per-passage >& logs/log.dl20-doc-per-passage &
nohup python src/main/python/run_regression.py --index --collection dl20-doc-docTTTTTquery-per-doc >& logs/log.dl20-doc-docTTTTTquery-per-doc &
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/anserini/collection/JsonCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public JsonCollection(Path path){
this.allowedFileSuffix = new HashSet<>(Arrays.asList(".json", ".jsonl"));
}

@SuppressWarnings("unchecked")
@Override
public FileSegment<JsonCollection.Document> createFileSegment(Path p) throws IOException {
return new Segment(p);
Expand All @@ -99,6 +100,7 @@ public Segment(Path path) throws IOException {
}
}

@SuppressWarnings("unchecked")
@Override
public void readNext() throws NoSuchElementException {
if (node == null) {
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/io/anserini/integration/EndToEndTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ protected void checkRankingResults(String key, String output) throws IOException
int cnt = 0;
String s;
while ((s = br.readLine()) != null) {
//assertEquals(ref[cnt], s);
System.out.println(s);
assertEquals(ref[cnt], s);
cnt++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ protected void setSearchGroundTruth() {
queryTokens.get("3").add("f4");

referenceRunOutput.put("impact", new String[]{
"1 Q0 doc2 1 0.613600 Anserini",
"2 Q0 doc1 1 0.393100 Anserini",
"3 Q0 doc1 1 0.153100 Anserini",
"3 Q0 doc2 2 0.135500 Anserini"});
"1 Q0 doc2 1 8.000000 Anserini",
"2 Q0 doc1 1 1.000000 Anserini",
"3 Q0 doc1 1 4.000000 Anserini",
"3 Q0 doc2 2 3.000000 Anserini"});
}

}

0 comments on commit 5e8743f

Please sign in to comment.