loubnabnl HF staff commited on
Commit
0771f4d
1 Parent(s): 02ca56d

Update example_script.py

Browse files
Files changed (1) hide show
  1. 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
- >>> 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 tools.utils import compute_metrics
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"]