Skip to content

Commit

Permalink
Fix typo in CHEAT tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Torrey <[email protected]>
  • Loading branch information
ranok committed Jun 9, 2023
1 parent 50f7c85 commit 2760f1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test_roberta_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_chatgptnews_jsonl(i, record_property):

@pytest.mark.parametrize('i', ch_samples[0:NUM_JSONL_SAMPLES])
def test_cheat_human_jsonl(i, record_property):
(classification, score) = run_on_text_chunked(i.get('abstract', ''), fuzziness=FUZZINESS, prelude_ratio=PRELUDE_RATIO)
(classification, score) = run_on_text_chunked(i.get('abstract', ''))
record_property("score", str(score))
assert classification == 'Human', CHEAT_HUMAN_JSONL_FILE + ':' + str(i.get('id')) + ' [' + str(len(i.get('abstract', ''))) + '] (title: ' + i.get('title', "").replace('\n', ' ')[:15] + ') is a human-generated sample, misclassified as AI-generated with confidence ' + str(round(score, 8))

Expand All @@ -122,7 +122,7 @@ def test_cheat_human_jsonl(i, record_property):

@pytest.mark.parametrize('i', cg_samples[0:NUM_JSONL_SAMPLES])
def test_cheat_generation_jsonl(i, record_property):
(classification, score) = run_on_text_chunked(i.get('abstract', ''), fuzziness=FUZZINESS, prelude_ratio=PRELUDE_RATIO)
(classification, score) = run_on_text_chunked(i.get('abstract', ''))
record_property("score", str(score))
assert classification == 'AI', CHEAT_GEN_JSONL_FILE + ':' + str(i.get('id')) + ' (title: ' + i.get('title', "").replace('\n', ' ')[:50] + ') is an LLM-generated sample, misclassified as human-generated with confidence ' + str(round(score, 8))

Expand All @@ -135,6 +135,6 @@ def test_cheat_generation_jsonl(i, record_property):

@pytest.mark.parametrize('i', cp_samples[0:NUM_JSONL_SAMPLES])
def test_cheat_polish_jsonl(i, record_property):
(classification, score) = run_on_text_chunked(i.get('abstract', ''), fuzziness=FUZZINESS, prelude_ratio=PRELUDE_RATIO)
(classification, score) = run_on_text_chunked(i.get('abstract', ''))
record_property("score", str(score))
assert classification == 'AI', CHEAT_POLISH_JSONL_FILE + ':' + str(i.get('id')) + ' (title: ' + i.get('title', "").replace('\n', ' ')[:50] + ') is an LLM-generated sample, misclassified as human-generated with confidence ' + str(round(score, 8))

0 comments on commit 2760f1b

Please sign in to comment.