gabeorlanski commited on
Commit
506dd90
·
unverified ·
1 Parent(s): 4879dbb

Updated Info

Browse files
Files changed (1) hide show
  1. README.md +0 -6
README.md CHANGED
@@ -33,19 +33,15 @@ import evaluate
33
  from datasets import load_dataset
34
  import os
35
  os.environ["HF_ALLOW_CODE_EVAL"] = "1"
36
-
37
  predictions = []
38
  languages = []
39
  question_infos = []
40
  ds = load_dataset("gabeorlanski/bc-humaneval", split="test")
41
-
42
  for row in ds:
43
  languages.append(row['language'])
44
  question_infos.append(row['question_info'])
45
-
46
  # Replace this with however you generate and postprocess predictions.
47
  predictions.append(model.generate(row['signature_with_docstring']))
48
-
49
  metric = evaluate.load("bc_eval")
50
  metrics, results = metric.compute(
51
  predictions=predictions, languages=languages, question_dicts=question_infos, k=[1]
@@ -108,7 +104,6 @@ predictions = [["""def has_close_elements(numbers: List[float], threshold: float
108
  distance = abs(elem - elem2)
109
  if distance < threshold:
110
  return True
111
-
112
  return False"""
113
  ]]
114
  metrics, results = metric.compute(
@@ -146,7 +141,6 @@ predictions = [["""def has_close_elements(numbers: List[float], threshold: float
146
  distance = elem - elem2
147
  if distance < threshold:
148
  return True
149
-
150
  return False"""
151
  ]]
152
  metrics, results = metric.compute(
 
33
  from datasets import load_dataset
34
  import os
35
  os.environ["HF_ALLOW_CODE_EVAL"] = "1"
 
36
  predictions = []
37
  languages = []
38
  question_infos = []
39
  ds = load_dataset("gabeorlanski/bc-humaneval", split="test")
 
40
  for row in ds:
41
  languages.append(row['language'])
42
  question_infos.append(row['question_info'])
 
43
  # Replace this with however you generate and postprocess predictions.
44
  predictions.append(model.generate(row['signature_with_docstring']))
 
45
  metric = evaluate.load("bc_eval")
46
  metrics, results = metric.compute(
47
  predictions=predictions, languages=languages, question_dicts=question_infos, k=[1]
 
104
  distance = abs(elem - elem2)
105
  if distance < threshold:
106
  return True
 
107
  return False"""
108
  ]]
109
  metrics, results = metric.compute(
 
141
  distance = elem - elem2
142
  if distance < threshold:
143
  return True
 
144
  return False"""
145
  ]]
146
  metrics, results = metric.compute(