Spaces:
Running
Running
Update example_script.py
Browse files- example_script.py +3 -3
example_script.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
"""This is an example script to evaluate a code generation model on APPS, you can also use the APPS solutions as code generations
|
2 |
-
|
3 |
-
|
4 |
|
5 |
import json
|
6 |
import pprint
|
7 |
from tqdm import tqdm
|
8 |
from datasets import load_dataset
|
9 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed
|
10 |
-
from
|
11 |
|
12 |
def generate_prompt(sample):
|
13 |
starter_code = None if len(sample["starter_code"]) == 0 else sample["starter_code"]
|
|
|
1 |
"""This is an example script to evaluate a code generation model on APPS, you can also use the APPS solutions as code generations
|
2 |
+
> python example_script.py --model_ckpt MODEL_NAME --num_tasks 10 --difficulty introductory --n_samples 1
|
3 |
+
> python example_script.py --use_solutions True --num_tasks 10 --difficulty introductory --n_samples 1"""
|
4 |
|
5 |
import json
|
6 |
import pprint
|
7 |
from tqdm import tqdm
|
8 |
from datasets import load_dataset
|
9 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed
|
10 |
+
from .utils import compute_metrics
|
11 |
|
12 |
def generate_prompt(sample):
|
13 |
starter_code = None if len(sample["starter_code"]) == 0 else sample["starter_code"]
|