SYMBOL INDEX (75 symbols across 11 files) FILE: data_loader.py function load_data (line 8) | def load_data(data_name, split, data_dir='./data'): FILE: evaluate.py function evaluate (line 14) | def evaluate(data_name, prompt_type, samples: list=None, file_path: str=... function parse_args (line 113) | def parse_args(): FILE: grader.py function parse_digits (line 20) | def parse_digits(num): function is_digit (line 35) | def is_digit(num): function str_to_pmatrix (line 40) | def str_to_pmatrix(input_str): function math_equal (line 53) | def math_equal(prediction: Union[bool, float, str], function math_equal_process (line 170) | def math_equal_process(param): function numeric_equal (line 174) | def numeric_equal(prediction: float, reference: float): function symbolic_equal (line 184) | def symbolic_equal(a, b): function symbolic_equal_process (line 241) | def symbolic_equal_process(a, b, output_queue): function call_with_timeout (line 246) | def call_with_timeout(func, *args, timeout=1, **kwargs): function _test_math_equal (line 261) | def _test_math_equal(): FILE: math_eval.py function parse_args (line 21) | def parse_args(): function prepare_data (line 47) | def prepare_data(data_name, args): function setup (line 86) | def setup(args): function main (line 118) | def main(llm, tokenizer, data_name, args): FILE: model_utils.py class KeywordsStoppingCriteria (line 9) | class KeywordsStoppingCriteria(StoppingCriteria): method __init__ (line 10) | def __init__(self, keywords_str, tokenizer): method __call__ (line 15) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class KeyWordsCriteriaTrunc (line 34) | class KeyWordsCriteriaTrunc(StoppingCriteria): method __init__ (line 35) | def __init__(self, stop_id_sequences, prompt_length): method __call__ (line 40) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class KeyWordsCriteria (line 60) | class KeyWordsCriteria(StoppingCriteria): method __init__ (line 61) | def __init__(self, stop_id_sequences): method __call__ (line 65) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... function generate_completions (line 78) | def generate_completions(model, tokenizer, prompts, batch_size=1, stop_i... function load_hf_lm_and_tokenizer (line 140) | def load_hf_lm_and_tokenizer( function _test_generate_completions (line 203) | def _test_generate_completions(): FILE: parser.py function _fix_fracs (line 9) | def _fix_fracs(string): function _fix_a_slash_b (line 41) | def _fix_a_slash_b(string): function _fix_sqrt (line 58) | def _fix_sqrt(string): function convert_word_number (line 63) | def convert_word_number(text:str) -> str: function strip_string (line 92) | def strip_string(string): function extract_multi_choice_answer (line 219) | def extract_multi_choice_answer(pred_str): function extract_answer (line 230) | def extract_answer(pred_str, data_name): function parse_ground_truth (line 285) | def parse_ground_truth(example: Dict[str, Any], data_name): function parse_question (line 341) | def parse_question(example, data_name): function run_execute (line 402) | def run_execute(executor, result, prompt_type, data_name, execute=False): function _test_extract_answer (line 419) | def _test_extract_answer(): FILE: python_executor.py class GenericRuntime (line 20) | class GenericRuntime: method __init__ (line 24) | def __init__(self): method exec_code (line 31) | def exec_code(self, code_piece: str) -> None: method eval_code (line 48) | def eval_code(self, expr: str) -> Any: method inject (line 51) | def inject(self, var_dict: Dict[str, Any]) -> None: method answer (line 56) | def answer(self): class DateRuntime (line 59) | class DateRuntime(GenericRuntime): class CustomDict (line 67) | class CustomDict(dict): method __iter__ (line 68) | def __iter__(self): class ColorObjectRuntime (line 71) | class ColorObjectRuntime(GenericRuntime): class PythonExecutor (line 75) | class PythonExecutor: method __init__ (line 76) | def __init__( method process_generation_to_code (line 91) | def process_generation_to_code(self, gens: str): method execute (line 95) | def execute( method apply (line 127) | def apply(self, code): method truncate (line 131) | def truncate(s, max_length=400): method batch_apply (line 137) | def batch_apply(self, batch_code): function _test (line 187) | def _test(): FILE: scripts/run_eval_multi_gpus.py function parse_args (line 13) | def parse_args(): function run_process (line 101) | def run_process(cmd): FILE: scripts/summarize_results.py function main (line 6) | def main(): function summarize_results (line 15) | def summarize_results(result_dir, data_names, split): FILE: trajectory.py function text_to_trajectory (line 13) | def text_to_trajectory(traj_str: str) -> None: function trajectory_to_text (line 51) | def trajectory_to_text(trajectory: list) -> str: function is_execution_success (line 63) | def is_execution_success(output): function extract_program (line 69) | def extract_program(text:str=None, trajectory:list=None, last_only=False... function extract_program_output (line 109) | def extract_program_output(pred_str, last_only=True): function _test_str_to_trajectory (line 120) | def _test_str_to_trajectory(): FILE: utils.py function set_seed (line 11) | def set_seed(seed: int = 42) -> None: function load_jsonl (line 18) | def load_jsonl(file: Union[str, Path]) -> Iterable[Any]: function save_jsonl (line 28) | def save_jsonl(samples, save_path): function lower_keys (line 39) | def lower_keys(example): function load_prompt (line 50) | def load_prompt(data_name, prompt_type): function construct_prompt (line 76) | def construct_prompt(example, data_name, args): function show_sample (line 128) | def show_sample(sample, print_all_preds=False):