MCPcopy Create free account

hub / github.com/23japhone/HALO / functions

Functions79 in github.com/23japhone/HALO

↓ 31 callersFunctionadd_response
(role: str, prompt: str, chat_history: list, image: list
utils/api.py:23
↓ 28 callersFunctionwrite_json
(file_path: str, input_data: dict | list, json_type: str = "dict")
utils/basic_operation.py:32
↓ 22 callersFunctionread_json
(file_path: str)
utils/basic_operation.py:25
↓ 14 callersFunctioninference_chat
(chat_history: list, model: str, endpoints: str, a
utils/api.py:77
↓ 13 callersFunctionextract_json_format_string
(text: str)
utils/basic_operation.py:144
↓ 10 callersMethodforword
(self, user_init_query: str, match_signal: Optional[str] = None,
utils/agents.py:919
↓ 10 callersFunctionsetup_logger
(log_path: str, log_name: str = 'my_logger')
utils/basic_operation.py:186
↓ 3 callersFunction_strip_string
(string: str)
utils/basic_operation.py:445
↓ 3 callersFunctionextract_MATH_json_files
(file_dir: str, csv_filename: str = "math_dataset_summary.csv")
utils/basic_operation.py:613
↓ 3 callersFunctionget_MATH_prompt
Args: line: one row of dataframe, containing columns "problem" and "solution" Returns: prompt: the question string tr
utils/basic_operation.py:594
↓ 3 callersFunctionget_MATH_question_type
Args: total_count: total number of samples for the overall test set (because rounding might be slightly less)
utils/basic_operation.py:558
↓ 3 callersFunctionget_MMLU_qa
Return true label and prompt of MMMLU each line
utils/basic_operation.py:357
↓ 3 callersFunctionget_human_eval_qa
()
utils/basic_operation.py:233
↓ 3 callersFunctionget_subjects
Randomly return ratio of the subjects(57 in total) and corresponding prompt words used for testing and dev prompts
utils/basic_operation.py:268
↓ 2 callersMethod__str__
(self)
utils/basic_operation.py:68
↓ 2 callersMethodadd_path_agent_response
(self, current_agent: ExecSubtaskAgent, path:
utils/agents.py:604
↓ 2 callersMethodeval_ans_score
(self, model: str, endpoints: str, api_ke
utils/agents.py:526
↓ 2 callersFunctionfind_math_answer
(solution_string: str)
utils/basic_operation.py:515
↓ 2 callersMethodjudge_ans
(self, model: str, endpoints: str, api_key: str,
utils/agents.py:535
↓ 2 callersMethodoptimize_prompt
(self, demand_type: str, info: list[str],
utils/agents.py:775
↓ 2 callersMethodparse_answer
(self, model: str, endpoints: str, api_key: str
utils/agents.py:227
↓ 2 callersMethodsearch
(self, untried_actions: list, task_type: str, core_intent: str,
utils/agents.py:719
↓ 2 callersMethodset_parent
(self, agent: 'ExecSubtaskAgent')
utils/agents.py:551
↓ 2 callersMethodsolve_task
(self, model: str, endpoints: str, api_key: str,
utils/agents.py:563
↓ 2 callersMethoducb1
(self, exploration_weight: float = 1.4)
utils/agents.py:544
↓ 1 callersMethod__init__
(self, key: str, cause: Optional[str] = None)
utils/basic_operation.py:61
↓ 1 callersFunction_fix_a_slash_b
(string: str)
utils/basic_operation.py:396
↓ 1 callersFunction_fix_fracs
(string: str)
utils/basic_operation.py:411
↓ 1 callersFunction_fix_sqrt
(string: str)
utils/basic_operation.py:381
↓ 1 callersFunction_remove_right_units
(string: str)
utils/basic_operation.py:371
↓ 1 callersMethodadd_other_agent_response
(self, agent_role: str, agent_response: str)
utils/agents.py:555
↓ 1 callersMethodbackpropagate
(self, path: list[tuple[int, ExecSubtaskAgent]], success: bool,
utils/agents.py:699
↓ 1 callersFunctionencode_image
(image_path: str)
utils/basic_operation.py:53
↓ 1 callersMethodeval_score
(self, model: str, endpoints: str, api_key: str,
utils/agents.py:420
↓ 1 callersMethodexpand
(self, path: list[tuple[int, ExecSubtaskAgent]], leaf: ExecSubtaskAgent,
utils/agents.py:623
↓ 1 callersFunctionextract_function_body
(code: str, function_name: str)
utils/basic_operation.py:250
↓ 1 callersFunctionextract_python_code_block
(text: str)
utils/basic_operation.py:242
↓ 1 callersFunctionfix_common_json_issues
(json_str: str)
utils/basic_operation.py:121
↓ 1 callersFunctionformat_example
format the subject example from a df into prompt, which conclude question, choices and correct choices
utils/basic_operation.py:304
↓ 1 callersFunctionformat_subject
format the subject strings
utils/basic_operation.py:290
↓ 1 callersFunctiongen_prompt
generate the prompt for few-shot learning
utils/basic_operation.py:327
↓ 1 callersMethodgenerate_agent_for_subtask
(self, task_type: str, core_intent: str,
utils/agents.py:799
↓ 1 callersMethodgenerate_prompt
(self, model: str, endpoints: str, api
utils/agents.py:58
↓ 1 callersMethodgenerate_role
(self, model: str, endpoints: str, api_key:
utils/agents.py:373
↓ 1 callersMethodgenerate_subtask
(self, model: str, endpoints: str,
utils/agents.py:315
↓ 1 callersMethodimplement
(self, task_type: str, core_intent: str, key_details:
utils/agents.py:858
↓ 1 callersMethodjudge
(self, model: str, endpoints: str, api_key: str, consu
utils/agents.py:468
↓ 1 callersFunctionmain
()
run.py:21
↓ 1 callersFunctionmain
()
experiment/MATH/run.py:31
↓ 1 callersFunctionmain
()
experiment/ablation_study/run_humaneval_w_o_prompt.py:27
↓ 1 callersFunctionmain
()
experiment/ablation_study/run_humaneval_w_o_task.py:27
↓ 1 callersFunctionmain
()
experiment/ablation_study/run_math_w_o_prompt.py:31
↓ 1 callersFunctionmain
()
experiment/ablation_study/run_mmlu_w_o_task.py:29
↓ 1 callersFunctionmain
()
experiment/ablation_study/run_math_w_o_task.py:31
↓ 1 callersFunctionmain
()
experiment/ablation_study/run_mmlu_w_o_prompt.py:29
↓ 1 callersFunctionmain
()
experiment/MMLU/run.py:29
↓ 1 callersFunctionmain
()
experiment/human_eval/run.py:27
↓ 1 callersFunctionmost_frequent
(agent_ans_list: list, cmp_func: Callable)
utils/basic_operation.py:210
↓ 1 callersMethodparse_answer
(self, text: str, match_signal: Optional[str] = None)
utils/agents.py:809
↓ 1 callersFunctionread_MMLU_line
(line: pd.DataFrame)
utils/basic_operation.py:343
↓ 1 callersMethodselect
(self, root: ExecSubtaskAgent)
utils/agents.py:612
↓ 1 callersMethodset_root_agent
(self, agent_role: str, untried_actions: list)
utils/agents.py:599
↓ 1 callersMethodsimulate
(self, leaf: ExecSubtaskAgent, current_depth: int, path: l
utils/agents.py:648
↓ 1 callersMethodtask_decompose
(self, task_type: str, core_intent: str,
utils/agents.py:789
↓ 1 callersFunctiontrack_usage
(res_json: dict)
utils/basic_operation.py:92
Method__init__
(self, key: str, cause: Optional[str] = None)
utils/basic_operation.py:78
Method__init__
(self, logger: logging.Logger, demand_type: str, info: list
utils/agents.py:48
Method__init__
(self, logger: logging.Logger, answer: str)
utils/agents.py:221
Method__init__
(self, logger: logging.Logger, answer: str)
utils/agents.py:264
Method__init__
(self, logger: logging.Logger, task_type: str, core_intent:
utils/agents.py:301
Method__init__
(self, logger: logging.Logger, task_type: str, core_intent:
utils/agents.py:359
Method__init__
(self, logger: logging.Logger, task_type: str, core_intent:
utils/agents.py:400
Method__init__
(self, logger: logging.Logger, task_type: str, core_intent:
utils/agents.py:449
Method__init__
(self, logger: logging.Logger, agent_role: str, untried_act
utils/agents.py:495
Method__init__
(self, logger: logging.Logger, model: str, endpoints: str,
utils/agents.py:585
Method__init__
(self, logger: logging.Logger, model: str, endpoints: str,
utils/agents.py:750
Method__str__
(self)
utils/basic_operation.py:85
Functionis_equiv
(str1: str, str2: str, verbose: bool = False)
utils/basic_operation.py:539
Methodparse_answer
(self, model: str, endpoints: str, api_key: str
utils/agents.py:270