Skip to content

Commit

Permalink
add polymer ratio & polymer chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Naplessss committed Mar 11, 2024
1 parent c254bfc commit 4fb5cef
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion evals/elsuite/rag_match_fuzzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def eval_sample(self, sample: Any, *_):
sampled = result.get_completions()[0]

try:
pattern = re.compile(r'\w\)\s\d+\s?[°]?[CK]?')
pattern = re.compile(r'\w\)\s\d+(?:\.\d+)?(?:\s?:\s?\d+(?:\.\d+)?)?\s?[°]?[CK]?')
sampled0 = pattern.findall(sampled)[0]
if sampled0 is None or sampled0==[]:
pass
Expand Down
3 changes: 3 additions & 0 deletions evals/registry/data/00_polymer_chart/samples.jsonl
Git LFS file not shown
3 changes: 3 additions & 0 deletions evals/registry/data/00_polymer_ratio/samples.jsonl
Git LFS file not shown
8 changes: 8 additions & 0 deletions evals/registry/evals/00_polymer_chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
polymer_chart:
id: polymer_chart.dev.v0
metrics: [accuracy]

polymer_chart.dev.v0:
class: evals.elsuite.rag_match_fuzzy:RAGMatch
args:
samples_jsonl: 00_polymer_chart/samples.jsonl
8 changes: 8 additions & 0 deletions evals/registry/evals/00_polymer_ratio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
polymer_ratio:
id: polymer_ratio.dev.v0
metrics: [accuracy]

polymer_ratio.dev.v0:
class: evals.elsuite.rag_match_fuzzy:RAGMatch
args:
samples_jsonl: 00_polymer_ratio/samples.jsonl

0 comments on commit 4fb5cef

Please sign in to comment.