Skip to content

Commit

Permalink
Use stratified sampling for JCoLA
Browse files Browse the repository at this point in the history
  • Loading branch information
mrorii committed Oct 20, 2023
1 parent 6ab2dd7 commit 2f25eda
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lm_eval/tasks/ja/jcola.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


class JCoLA(CoLA):
VERSION = 0.1
VERSION = 0.2
PROMPT_VERSION = 0.0
DATASET_PATH = "shunk031/JGLUE"
DATASET_NAME = "JCoLA"
Expand All @@ -43,6 +43,10 @@ def construct_requests(self, doc, ctx):
ll_false, _ = rf.loglikelihood(ctx, " %s" % self.CHOICES[0])
return ll_true, ll_false

def fewshot_context(self, doc, num_fewshot, provide_description=None, rnd=None, description=None, stratified=False):
# Use stratified sampling
return super().fewshot_context(doc, num_fewshot, provide_description, rnd, description, stratified=True)


class JCoLAWithJAAlpacaPrompt(JCoLA):
"""
Expand Down

0 comments on commit 2f25eda

Please sign in to comment.