MCPcopy Create free account

hub / github.com/ML-GSAI/LLaDA / functions

Functions3,438 in github.com/ML-GSAI/LLaDA

↓ 814 callersMethodget
(self, label)
opencompass/opencompass/datasets/phybench/extended_zss.py:35
↓ 427 callersMethodreplace
Replaces all instances of 'src' in the PromptList with 'dst'. Args: src (str): The string to be replaced. dst (Prompt
opencompass/opencompass/utils/prompt.py:107
↓ 413 callersFunctionopen
(file, mode='r', *args, **kwargs)
opencompass/opencompass/utils/fileio.py:188
↓ 291 callersMethodformat
Replaces all instances of 'src' in the PromptList with 'dst'. Args: src (str): The string to be replaced. dst (Prompt
opencompass/opencompass/utils/prompt.py:82
↓ 289 callersFunctionget_data_path
return dataset id when getting data from ModelScope/HuggingFace repo, otherwise just return local path as is. Args: dataset_id (str):
opencompass/opencompass/utils/datasets.py:10
↓ 135 callersMethodgroup
(self, n: int, details: List[Dict[str, Any]], test_set: Dataset)
opencompass/opencompass/openicl/icl_evaluator/icl_base_evaluator.py:60
↓ 122 callersFunctionload_dataset
(dataset_name, setting_name, parent_path, prompt_path=None,
opencompass/opencompass/datasets/agieval/dataset_loader.py:275
↓ 118 callersMethodupdate
Update pbar counter when callback.
opencompass/opencompass/runners/local_api.py:224
↓ 116 callersMethodlower
(text)
opencompass/opencompass/datasets/lawbench/utils/rc_f1.py:54
↓ 99 callersMethodencode
Encode prompt to tokens. Not necessary for most cases. Args: prompt (str): Input string. Returns: torch.Tens
opencompass/opencompass/models/base.py:111
↓ 84 callersFunctionmodel_abbr_from_cfg
Generate model abbreviation from the model's confg.
opencompass/opencompass/utils/abbr.py:7
↓ 80 callersFunctionget_logger
Get the logger for OpenCompass. Args: log_level (str): The log level. Default: 'INFO'. Choices are 'DEBUG', 'INFO', 'WARNING'
opencompass/opencompass/utils/logging.py:20
↓ 79 callersFunctiondataset_abbr_from_cfg
Returns dataset abbreviation from the dataset's confg.
opencompass/opencompass/utils/abbr.py:19
↓ 74 callersMethoddecode
Decode tokens to text. Not necessary for most cases. Args: tokens (torch.Tensor): Input tokens. Returns: str
opencompass/opencompass/models/base.py:125
↓ 63 callersMethodload
(path: str)
opencompass/opencompass/datasets/c3.py:14
↓ 59 callersMethodlower
(text)
opencompass/opencompass/datasets/s3eval.py:55
↓ 58 callersMethodmean
(scores)
opencompass/opencompass/datasets/truthfulqa.py:174
↓ 53 callersMethodbuild
(module_path)
opencompass/opencompass/models/interntrain.py:22
↓ 45 callersMethodto
(self, device)
opencompass/opencompass/models/base.py:261
↓ 43 callersMethodchoice
(self, inputs, choices)
opencompass/opencompass/models/glm.py:132
↓ 39 callersFunctionget_infer_output_path
(model_cfg: ConfigDict, dataset_cfg: ConfigDict, root_path
opencompass/opencompass/utils/abbr.py:40
↓ 32 callersMethodfrom_dict
(cls, d: dict)
opencompass/opencompass/datasets/healthbench/healthbench.py:109
↓ 32 callersMethodwait
Wait till the next query can be sent. Applicable in both single-thread and multi-thread environments.
opencompass/opencompass/models/base_api.py:153
↓ 31 callersMethodflush
Ensure simultaneous emptying of stdout and stderr when concurrent resources are available. When employing multiprocessing with standa
opencompass/opencompass/models/base_api.py:77
↓ 30 callersMethodread
(self, *args, **kwargs)
opencompass/opencompass/datasets/mbpp.py:219
↓ 27 callersMethodget_token_len_from_template
Get lengths given a list of templates. Args: templates (Union[List[str], str]): Input template(s). mode (str): Parsin
opencompass/opencompass/models/base.py:203
↓ 26 callersMethodreadlines
(self, *args, **kwargs)
opencompass/opencompass/datasets/mbpp.py:225
↓ 25 callersMethodgenerate_ice
Generate the in-context example for one test example. If `ice_template` is an instance of `PromptTemplate`, the `ice_separator` and `i
opencompass/opencompass/openicl/icl_retriever/icl_base_retriever.py:73
↓ 25 callersFunctionget_outdir
Get out put path. Args: cfg (ConfigDict): The running config. time_str (str): Current time.
opencompass/opencompass/summarizers/subjective/utils.py:9
↓ 24 callersMethodpost
Post a message to Lark. When title is None, message must be a str. otherwise msg can be in rich text format (see https://open
opencompass/opencompass/utils/lark.py:13
↓ 24 callersMethodrelease
Release concurrent resources if acquired. This behavior will fall back to do nothing if there are no concurrent resources.
opencompass/opencompass/models/base_api.py:100
↓ 23 callersMethodacquire
Acquire concurrent resources if exists. This behavior will fall back to wait with query_per_second if there are no concurrent resourc
opencompass/opencompass/models/base_api.py:89
↓ 23 callersFunctionget_logger
(name, level=LOG_LEVEL, log_file=None, file_mode='w')
opencompass/opencompass/openicl/utils/logging.py:10
↓ 20 callersFunctiongeneral_postprocess
(text: str)
opencompass/opencompass/utils/text_postprocessors.py:8
↓ 18 callersFunctionbuild_dataset_from_cfg
(dataset_cfg: ConfigDict)
opencompass/opencompass/utils/build.py:8
↓ 18 callersFunctionget_judgeanswer_and_reference
Extract judgements (scores) and references. Args: result (ConfigDict): Dataset config. filename (str): Model path in results dir.
opencompass/opencompass/datasets/subjective/utils.py:2
↓ 18 callersMethodparse_template
Parse a prompt template, and wrap it with meta template if applicable. Args: prompt_template (List[PromptType]): A prompt
opencompass/opencompass/models/base.py:149
↓ 17 callersMethodload
( self )
opencompass/opencompass/summarizers/multi_model.py:125
↓ 17 callersMethodparse_template
(self, chat: List[dict], mode='gen')
opencompass/opencompass/openicl/icl_inferencer/icl_chat_inferencer.py:62
↓ 16 callersMethodgenerate_item
Generate an item based on the provided :obj:`entry` data, as well as optional output field and ice field tokens. Warning:
opencompass/opencompass/openicl/icl_prompt_template.py:146
↓ 16 callersMethodgenerate_prompt_for_generate_task
Generate the prompt for one test example in generative evaluation with `prompt_template`. If `prompt_template` is not provided, the `i
opencompass/opencompass/openicl/icl_retriever/icl_base_retriever.py:157
↓ 15 callersMethodfilter
Filter the repeated error message. Args: record (LogRecord): The log record. Returns: bool: Whether to outpu
opencompass/opencompass/utils/logging.py:68
↓ 15 callersFunctionget_judgeanswer_and_reference
Extract judgements (scores) and references. Args: dataset (ConfigDict): Dataset config. subdir_path (str): Model path in results
opencompass/opencompass/summarizers/subjective/utils.py:24
↓ 14 callersFunctionextract_text_from_brackets
(text, clean_level='basic')
opencompass/opencompass/datasets/korbench/korbench_utils.py:336
↓ 14 callersFunctionextract_text_from_brackets
(text, clean_level='basic')
opencompass/opencompass/datasets/supergpqa/supergpqa_utils.py:336
↓ 14 callersMethodgenerate_from_template
Generate completion from a list of templates. Args: templates (List[PromptType]): A list of templates. max_out_len (i
opencompass/opencompass/models/base.py:190
↓ 14 callersMethodrun
(self)
opencompass/opencompass/utils/menu.py:45
↓ 14 callersMethodsubmit
(task, index)
opencompass/opencompass/runners/local.py:163
↓ 14 callersMethodto_dict
(self)
opencompass/opencompass/datasets/agieval/constructions.py:21
↓ 13 callersMethodget_command
Get the command template for the task. Args: cfg_path (str): The path to the config file of the task. template (str):
opencompass/opencompass/tasks/base.py:72
↓ 13 callersMethodretrieve
(self)
opencompass/opencompass/openicl/icl_retriever/icl_dpp_retriever.py:74
↓ 12 callersFunctioniter_jsonl
(path)
opencompass/opencompass/datasets/infinitebench/utils.py:7
↓ 11 callersMethodbatch_decode
(self, outputs, eos_token_ids: List[int], stopp
opencompass/opencompass/models/interntrain.py:480
↓ 11 callersFunctiondump_results_dict
(results_dict, filename)
opencompass/opencompass/openicl/icl_inferencer/icl_base_inferencer.py:96
↓ 11 callersFunctiontask_abbr_from_cfg
Returns task abbreviation from the task's confg.
opencompass/opencompass/utils/abbr.py:30
↓ 11 callersMethodto
(self, device)
opencompass/opencompass/openicl/icl_retriever/icl_topk_retriever.py:152
↓ 10 callersFunctionget_config_type
(obj)
opencompass/opencompass/utils/run.py:357
↓ 10 callersFunctionget_element_counts
Processes a list of dictionaries to compute markdown element counts. Args: data (list): Input data, either a list of dictionaries.
opencompass/opencompass/datasets/subjective/compass_arena_subjective_bench.py:509
↓ 10 callersMethodread
(self, *args, **kwargs)
opencompass/opencompass/datasets/livecodebench/execute_utils.py:159
↓ 10 callersMethodtokenize
(self, text)
opencompass/opencompass/openicl/icl_evaluator/hf_metrics/rouge.py:89
↓ 9 callersFunctiondeal_with_judge_model_abbr
(model_cfg, judge_model_cfg, meta=False)
opencompass/opencompass/utils/abbr.py:51
↓ 9 callersMethodget_dataloader
Return a dataloader of the input data list.
opencompass/opencompass/openicl/icl_inferencer/icl_base_inferencer.py:88
↓ 9 callersFunctionget_prompt_hash
Get the hash of the prompt configuration. Args: dataset_cfg (ConfigDict or list[ConfigDict]): The dataset configuration.
opencompass/opencompass/utils/prompt.py:38
↓ 9 callersFunctionparse_requirements
Parse the package dependencies listed in a requirements file but strips specific versioning information. Args: fname (str): path to r
opencompass/setup.py:20
↓ 9 callersFunctionremove_duplicate_pairs
(model_combinations)
opencompass/opencompass/partitioners/sub_naive.py:16
↓ 9 callersFunctionrun_humaneval_check
(completion)
opencompass/tests/dataset/test_humaneval.py:6
↓ 9 callersMethodwrite_to_json
Dump the result to a json file.
opencompass/opencompass/openicl/icl_inferencer/icl_base_inferencer.py:110
↓ 8 callersMethod_merge_edits
(seq, tag="X")
opencompass/opencompass/datasets/lawbench/utils/modules/merger.py:23
↓ 8 callersFunctionbuild_model_from_cfg
(model_cfg: ConfigDict)
opencompass/opencompass/utils/build.py:15
↓ 8 callersMethodclean
(cls, target_str: str)
opencompass/opencompass/datasets/math_intern.py:129
↓ 8 callersFunctionextract_chemical_data
(text)
opencompass/opencompass/datasets/smolinstruct.py:33
↓ 8 callersMethodforward
(self, dataloader, process_bar=False, information='')
opencompass/opencompass/openicl/icl_retriever/icl_topk_retriever.py:121
↓ 8 callersMethodget_scores
Calculate toxic scores for each prediction. Args: predictions (List): List of predictions of each sample. Returns:
opencompass/opencompass/openicl/icl_evaluator/icl_toxic_evaluator.py:174
↓ 8 callersFunctionnormalize_final_answer
Normalize a final answer to a quantitative reasoning question.
opencompass/opencompass/datasets/math.py:68
↓ 8 callersMethodrun
(self, timeout)
opencompass/opencompass/datasets/ds1000.py:287
↓ 7 callersMethod__init__
(self, pred_postprocessor: Optional[ConfigDict] = None)
opencompass/opencompass/openicl/icl_evaluator/icl_hf_evaluator.py:104
↓ 7 callersMethod__init__
( self, subset: str, filter_keys: Union[str, List[str]], **kwargs, )
opencompass/opencompass/datasets/advglue.py:22
↓ 7 callersFunctionchange_accelerator
(models, accelerator)
opencompass/opencompass/utils/run.py:236
↓ 7 callersFunctionfind_file
Find the first available file with given extensions.
opencompass/opencompass/datasets/korbench/korbench_utils.py:30
↓ 7 callersMethodgenerate_label_prompt
Generate the prompt for one test example in perpelxity evaluation with `prompt_template`. If `prompt_template` is not provided, the `i
opencompass/opencompass/openicl/icl_retriever/icl_base_retriever.py:114
↓ 7 callersMethodget_log_path
Get the path to the log file. Args: file_extension (str): The file extension of the log file. Default: 'json'.
opencompass/opencompass/tasks/base.py:92
↓ 7 callersMethodinference
(self, retriever: BaseRetriever, ice_template: Optional[PromptTemplate] =
opencompass/opencompass/openicl/icl_inferencer/icl_ll_inferencer.py:58
↓ 7 callersFunctionload_json_or_jsonl
Load data from a JSON or JSONL file.
opencompass/opencompass/datasets/korbench/korbench_utils.py:18
↓ 7 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
opencompass/opencompass/datasets/lveval/evaluators.py:147
↓ 7 callersFunctionnormalize_zh_answer
Lower text and remove punctuation, extra whitespace.
opencompass/opencompass/datasets/lveval/evaluators.py:166
↓ 7 callersMethodto_json
(self)
opencompass/opencompass/datasets/musr/tree.py:140
↓ 6 callersMethod_calculate_group_metrics
The function calculates the numerical results for each group based on the configuration in summary_groups, and updates the contents of
opencompass/opencompass/summarizers/default.py:137
↓ 6 callersMethod_pick_up_results
The function reads the numerical results of evaluations from the output folder based on the configuration file, and ultimately returns
opencompass/opencompass/summarizers/default.py:67
↓ 6 callersFunctioncombined_int_check
(val)
opencompass/opencompass/datasets/livecodebench/testing_util.py:77
↓ 6 callersMethodcompute_f1
(a_gold, a_pred)
opencompass/opencompass/datasets/lawbench/utils/rc_f1.py:69
↓ 6 callersFunctionedit_distance
>>> edit_distance('abcde', 'avbcude') 2 >>> edit_distance(['至', '刂'], ['亻', '至', '刂']) 1 >>> edit_distance('fang', 'qwe') 4
opencompass/opencompass/datasets/lawbench/utils/char_smi.py:54
↓ 6 callersMethodextract_text_from_brackets
Extracts text enclosed in double brackets [[ ]]. Args: text (str): The text to extract from. clean_level (str): The l
opencompass/opencompass/openicl/icl_evaluator/icl_korbench_evaluator.py:166
↓ 6 callersFunctionfix_json_slash
(s: str)
opencompass/opencompass/datasets/sage/evaluation.py:23
↓ 6 callersFunctiongenerate_chain_family_story
(names, templates, relationship_terms)
opencompass/opencompass/datasets/needlebench_v2/multi.py:35
↓ 6 callersMethodgenerate_label_prompt_item
Generate prompt based on :obj:`entry` data, :obj:`ice` in-context example, and the corresponding :obj:`label`. Args: ent
opencompass/opencompass/openicl/icl_prompt_template.py:105
↓ 6 callersMethodload_single
(path, data_filename, label_filename)
opencompass/opencompass/datasets/piqa.py:17
↓ 6 callersMethodload_single
(path, data_filename, label_filename)
opencompass/opencompass/datasets/siqa.py:18
↓ 6 callersMethodparse_template
Parse a prompt template, and wrap it with meta template if applicable. Args: prompt_template (List[PromptType]): A prompt
opencompass/opencompass/models/base.py:300
↓ 6 callersMethodreadlines
(self, *args, **kwargs)
opencompass/opencompass/datasets/livecodebench/execute_utils.py:165
↓ 6 callersFunctionstring_to_tree
This function converts ids string to a string that can be used as a tree input to APTED. Any Error raised by this function implies that the i
opencompass/opencompass/datasets/lawbench/utils/char_smi.py:340
next →1–100 of 3,438, ranked by callers