MCPcopy Create free account

hub / github.com/Mercury7353/PyBench / functions

Functions207 in github.com/Mercury7353/PyBench

↓ 7 callersFunctionload_and_validate_pkl
(file_path)
data/unit_test/tests.py:441
↓ 5 callersFunctionare_two_images_same
比较两张图片的相似程度是否超过给定阈值。 参数: img1: PIL.Image.Image - 第一张图片 img2: PIL.Image.Image - 第二张图片 threshold: float - 相似度阈值,默认是0.9(即90%)
data/unit_test/tests.py:71
↓ 4 callersFunctioncalculate_sharpness
(image_path)
data/unit_test/tests.py:146
↓ 4 callersMethodupdate
(self, usage: Dict[str, int])
llms/api_key_pool.py:146
↓ 3 callersMethod__init__
(self, client_args: ClientArgs)
llms/api_key_pool.py:165
↓ 2 callersMethod_remove_cur_arg
(self)
llms/api_key_pool.py:199
↓ 2 callersFunctioncalculate_dbfs
(audio_array)
data/unit_test/tests.py:1413
↓ 2 callersFunctionfc2dict
(sequence: str, spliter="<|tool_call|>")
utils/output_parser.py:97
↓ 2 callersFunctionfind_fuzzy_file
(file_name, row_idx)
utils/extract_raw_data.py:6
↓ 2 callersFunctiongenerate_notebook
(cells)
utils/save_notebook.py:4
↓ 2 callersFunctionget_mp3_duration
(file_path)
data/unit_test/tests.py:1465
↓ 2 callersFunctionidentify_numeric_columns
(df)
data/unit_test/tests.py:135
↓ 2 callersFunctionis_proportionally_similar
比较两张图片的尺寸比例是否在允许的误差范围内。
data/unit_test/tests.py:114
↓ 2 callersFunctionjudge_quota_exceeded
(message: str)
llms/api_key_pool.py:301
↓ 2 callersFunctionread_jsonl
(filename)
utils/calculate_avg_step.py:35
↓ 2 callersFunctionread_mp3_file
(file_path)
data/unit_test/tests.py:1446
↓ 2 callersFunctionread_wave_file
(file_path)
data/unit_test/tests.py:1396
↓ 2 callersFunctionsave_as_ipynb
(cells, filename)
utils/save_notebook.py:36
↓ 1 callersMethod__lt__
Compare two resources based on request rate, token usage and price Args: other (Resource): The other resource to compare with
llms/api_key_pool.py:110
↓ 1 callersMethod_enforce_trailing_slash
(self, url: str)
llms/api_key_pool.py:141
↓ 1 callersMethod_post_request
(self, kwargs: Dict[str, Any])
llms/openai_api.py:53
↓ 1 callersFunctionbuild_llm
build llm from config Args: llm_type (str): llm type, only support openai config (Dict[str, Any]): the dict of llm config R
llms/__init__.py:9
↓ 1 callersMethodchat
(self,messages)
utils/LlamaCompletions.py:19
↓ 1 callersFunctioncheck_content
根据task_id匹配并运行相应的单元测试函数。
data/unit_test/enter_point.py:7
↓ 1 callersFunctioncount_elements_in_intervals
(elements)
utils/calculate_avg_step.py:47
↓ 1 callersFunctionexecute_code
(code_str: str, Kernel, nb)
inference.py:24
↓ 1 callersFunctionextract_code
extract code from assistant content Args: rsp (str): the response content from assistant code_start_token (str, optional): the to
utils/output_parser.py:40
↓ 1 callersMethodformat_message
(self,messages)
utils/LlamaCompletions.py:42
↓ 1 callersMethodgenerate
接受用户传入的messages和tools[可选],返回新的message和debug_info Args: messages: chatml messages tools = openai tools description
llms/base_llm.py:14
↓ 1 callersFunctiongenerate_notebook_one_cell
(role, text=None, code=None, result=None)
utils/save_notebook.py:17
↓ 1 callersMethodget_client_args
(self)
llms/openai_api.py:22
↓ 1 callersFunctionis_grayscale
检查图像是否是灰度图。
data/unit_test/tests.py:1144
↓ 1 callersFunctionmessage2dict
( message: Message, )
llms/utils.py:47
↓ 1 callersFunctionparse_code_action
parse output from code interpreter Args: output (str): the output from code interpreter mode: the mode of the output, could be pr
utils/output_parser.py:7
↓ 1 callersFunctionproperty2dict
把传入的ToolProperty转换为OpenAI接口需要的dict格式 Args: property (ToolProperty): ToolProperty对话 Returns: Dict: 参数的dict形式描述
llms/utils.py:6
↓ 1 callersFunctionread_lines
(lines)
utils/calculate_avg_step.py:13
↓ 1 callersFunctionstatistic_info
(compare_path, solution_path)
utils/calculate_avg_step.py:69
↓ 1 callersFunctiontool2dict
(tool: Tool)
llms/utils.py:31
Method__enter__
Get a client from the pool and return it as a context manager.
llms/api_key_pool.py:190
Method__enter__
Get a client from the pool and return it as a context manager.
llms/api_key_pool.py:213
Method__enter__
Get a client from the pool and return it as a context manager.
llms/api_key_pool.py:246
Method__enter__
Get a client from the pool and return it as a context manager.
llms/api_key_pool.py:275
Method__exit__
Put the resource back in the pool.
llms/api_key_pool.py:195
Method__exit__
Put the resource back in the pool.
llms/api_key_pool.py:223
Method__exit__
Put the resource back in the pool.
llms/api_key_pool.py:255
Method__exit__
Put the resource back in the pool.
llms/api_key_pool.py:283
Method__gt__
Compare two resources based on request rate and token usage Args: other (Resource): The other resource to compare with Ret
llms/api_key_pool.py:131
Method__init__
(self)
utils/LlamaCompletions.py:6
Method__init__
(self, llm_config: LLMConfig)
llms/base_llm.py:10
Method__init__
( self, api_key: str, base_url: str, organization: Optional[str] = None,
llms/api_key_pool.py:83
Method__init__
(self, client_args: ClientArgs)
llms/api_key_pool.py:207
Method__init__
(self, client_args: ClientArgs)
llms/api_key_pool.py:241
Method__init__
(self, client_args: ClientArgs)
llms/api_key_pool.py:271
Method__init__
(self, config: LLMConfig)
llms/openai_api.py:18
Method__len__
(self)
llms/api_key_pool.py:186
Functionare_images_similar
判断两张图片是否相似,使用ORB特征匹配。 :param image_path1: 第一张图片的文件路径 :param image_path2: 第二张图片的文件路径 :param threshold: 匹配特征点的阈值,默认为0.75 :return:
data/unit_test/tests.py:26
Functioncheck_file
根据task_id,判断是否需要输出文件, 如果需要,则检测输出文件是否在output文件夹内,模糊匹配,返回匹配的文件名称 如果没有输出文件,则直接failed 如果不需要,这一环节直接pass 好像不是很必要
data/unit_test/tests.py:3
Functionconvert_function_call_to_json
(string)
utils/output_parser.py:74
Functioncount_tokens
(text)
utils/calculate_avg_step.py:26
Functionextract_code_from_arguments
(arguments_str)
utils/output_parser.py:90
Methodgenerate
( self, messages: List[Union[Message, Dict]], tools: Optional[List[Union[Tool, Dict]]]
llms/openai_api.py:25
Functionmain
(config_path: str, task_path: str, output_path: str)
inference.py:166
Functionprocess_task
(task, config, llm, system_prompt_template, max_turns, output_path, processed_ids)
inference.py:73
Functionsave_jsonl
(data, filename)
utils/calculate_avg_step.py:42
Functiontest_task_10
(trajectory)
data/unit_test/tests.py:247
Functiontest_task_100
(trajectory)
data/unit_test/tests.py:1151
Functiontest_task_101
(trajectory)
data/unit_test/tests.py:1162
Functiontest_task_102
(trajectory)
data/unit_test/tests.py:1190
Functiontest_task_103
(trajectory)
data/unit_test/tests.py:1219
Functiontest_task_105
(trajectory)
data/unit_test/tests.py:1223
Functiontest_task_107
(trajectory)
data/unit_test/tests.py:1227
Functiontest_task_109
(trajectory)
data/unit_test/tests.py:1232
Functiontest_task_11
(trajectory)
data/unit_test/tests.py:252
Functiontest_task_110
(trajectory)
data/unit_test/tests.py:1237
Functiontest_task_111
(trajectory)
data/unit_test/tests.py:1242
Functiontest_task_112
(trajectory)
data/unit_test/tests.py:1247
Functiontest_task_113
(trajectory)
data/unit_test/tests.py:1252
Functiontest_task_114
(trajectory)
data/unit_test/tests.py:1257
Functiontest_task_115
(trajectory)
data/unit_test/tests.py:1262
Functiontest_task_116
(trajectory)
data/unit_test/tests.py:1267
Functiontest_task_117
(trajectory)
data/unit_test/tests.py:1272
Functiontest_task_118
(trajectory)
data/unit_test/tests.py:1277
Functiontest_task_119
(trajectory)
data/unit_test/tests.py:1281
Functiontest_task_12
(trajectory)
data/unit_test/tests.py:261
Functiontest_task_120
(trajectory)
data/unit_test/tests.py:1285
Functiontest_task_121
(trajectory)
data/unit_test/tests.py:1289
Functiontest_task_122
(trajectory)
data/unit_test/tests.py:1293
Functiontest_task_123
(trajectory)
data/unit_test/tests.py:1297
Functiontest_task_124
(trajectory)
data/unit_test/tests.py:1301
Functiontest_task_126
(trajectory)
data/unit_test/tests.py:1305
Functiontest_task_128
(trajectory)
data/unit_test/tests.py:1309
Functiontest_task_129
(trajectory)
data/unit_test/tests.py:1313
Functiontest_task_13
(trajectory)
data/unit_test/tests.py:266
Functiontest_task_130
(trajectory)
data/unit_test/tests.py:1317
Functiontest_task_131
(trajectory)
data/unit_test/tests.py:1321
Functiontest_task_132
(trajectory)
data/unit_test/tests.py:1326
Functiontest_task_133
(trajectory)
data/unit_test/tests.py:1330
Functiontest_task_134
(trajectory)
data/unit_test/tests.py:1334
Functiontest_task_135
(trajectory)
data/unit_test/tests.py:1339
Functiontest_task_136
(trajectory)
data/unit_test/tests.py:1343
next →1–100 of 207, ranked by callers