SYMBOL INDEX (81 symbols across 8 files) FILE: oreal/datasets/prompt.py function load_hf_datasets (line 13) | def load_hf_datasets(repo, split="train"): function load_jsonl_datasets (line 31) | def load_jsonl_datasets(file_path): function balance_difficulty_with_cfg (line 51) | def balance_difficulty_with_cfg(dataset, difficulty_balance_cfg): class OrealPromptDataset (line 65) | class OrealPromptDataset(Dataset): method __init__ (line 66) | def __init__(self, path, tokenizer, difficulty_balance_cfg=None): method __len__ (line 80) | def __len__(self): method __getitem__ (line 83) | def __getitem__(self, idx): class PromptCollator (line 94) | class PromptCollator: method __init__ (line 96) | def __init__(self, pad_token_id=0, ignore_id=-100, pack_batch=False): method __call__ (line 101) | def __call__(self, instances): FILE: oreal/datasets/trajectory.py class InferDataset (line 13) | class InferDataset(torch.utils.data.Dataset): method __init__ (line 15) | def __init__(self, prompts_input_ids, responses_ids, message_data, met... method __len__ (line 29) | def __len__(self): method __getitem__ (line 32) | def __getitem__(self, item): class TrajectoryDataset (line 50) | class TrajectoryDataset(torch.utils.data.Dataset): method __init__ (line 52) | def __init__(self): method num_action_tokens (line 59) | def num_action_tokens(self): method num_total_tokens (line 63) | def num_total_tokens(self): method update (line 66) | def update(self, trajectories): method dump_jsonl (line 79) | def dump_jsonl(self, path, tokenizer, debug=False): method dump_log (line 101) | def dump_log(self, path, tokenizer, debug=False): method __len__ (line 111) | def __len__(self): method __getitem__ (line 114) | def __getitem__(self, item): class TrajectoryDatasetWithFilter (line 119) | class TrajectoryDatasetWithFilter(TrajectoryDataset): method __init__ (line 120) | def __init__(self, repeat_k=1, only_keep_1_pair=True): method update (line 125) | def update(self, trajectories): class TrajectoryCollator (line 157) | class TrajectoryCollator(SftCollator): method __call__ (line 159) | def __call__(self, instances): FILE: oreal/judgers/base_judger.py class JudgeStatus (line 22) | class JudgeStatus(Generic[T]): class BaseJudger (line 28) | class BaseJudger(ABC): method __init__ (line 29) | def __init__(self): method on_data_received (line 33) | def on_data_received( method on_reward_required (line 42) | def on_reward_required( function register_judger (line 53) | def register_judger(name: str): FILE: oreal/judgers/math_judger.py class MathJudger (line 14) | class MathJudger(BaseJudger): method __init__ (line 50) | def __init__( method on_data_received (line 71) | def on_data_received( method on_reward_required (line 131) | def on_reward_required( method _evaluate_answer_with_llm (line 140) | def _evaluate_answer_with_llm( method _verify_from_string (line 184) | def _verify_from_string(self, verification: str): method _extract_and_verify_with_logic (line 193) | def _extract_and_verify_with_logic( FILE: oreal/judgers/router.py class InputData (line 38) | class InputData(TypedDict): class GenericTask (line 48) | class GenericTask(Generic[T]): class SubprocessConfig (line 56) | class SubprocessConfig: class ParallelRouter (line 61) | class ParallelRouter: method __init__ (line 62) | def __init__( method submit (line 167) | def submit(self, data_batch: List[InputData]): method query (line 232) | def query( method _safe_process_worker (line 264) | def _safe_process_worker( method _process_worker (line 287) | def _process_worker( method _build_judger (line 427) | def _build_judger(judger_name: str, judger_conf: dict): method _try_catch_subprocess_exceptions (line 442) | def _try_catch_subprocess_exceptions(self): method shutdown (line 463) | def shutdown(self, timeout: float = 2.0): FILE: oreal/judgers/utils.py function extract_answer (line 15) | def extract_answer(pred_str: str, execute: bool = False) -> str: function _fix_fracs (line 81) | def _fix_fracs(string): function _fix_a_slash_b (line 113) | def _fix_a_slash_b(string): function _fix_sqrt (line 130) | def _fix_sqrt(string): function strip_string (line 135) | def strip_string(string): function last_boxed_only_string (line 236) | def last_boxed_only_string(string): function extract_answer (line 264) | def extract_answer(pred_str: str, execute: bool = False) -> str: function is_digit (line 310) | def is_digit(s): function math_equal (line 318) | def math_equal( function math_equal_process (line 411) | def math_equal_process(param): function math_equal_process_v2 (line 415) | def math_equal_process_v2(param): function symbolic_equal (line 421) | def symbolic_equal(a, b): function symbolic_equal_process (line 448) | def symbolic_equal_process(a, b, output_queue): function call_with_timeout (line 453) | def call_with_timeout(func, *args, timeout=1, **kwargs): function math_majority_vote (line 468) | def math_majority_vote(answers: list, majority: Optional[int] = None): FILE: oreal/utils.py class ConfigDict (line 6) | class ConfigDict(dict): method __getattr__ (line 8) | def __getattr__(self, item): method __setattr__ (line 13) | def __setattr__(self, key, value): class Config (line 17) | class Config: method fromfile (line 20) | def fromfile(file_path): FILE: train_oreal.py class RLParallelSampler (line 55) | class RLParallelSampler(ParallelSampler): method __iter__ (line 56) | def __iter__(self): function log_format (line 81) | def log_format(rank, debug=False): function is_interval (line 95) | def is_interval(step, total_steps, interval): function reduce_mean (line 99) | def reduce_mean(data, group): function threshold_rescale (line 105) | def threshold_rescale(prob, threshold=0.5): function topk_rescale (line 112) | def topk_rescale(prob, topk_ratio=0.5): function train_oreal (line 124) | def train_oreal(cfg_path, **kwargs):