MCPcopy Create free account

hub / github.com/InternScience/SciReason / functions

Functions3,711 in github.com/InternScience/SciReason

↓ 764 callersMethodget
(self, label)
opencompass/datasets/phybench/extended_zss.py:35
↓ 474 callersMethodreplace
Replaces all instances of 'src' in the PromptList with 'dst'. Args: src (str): The string to be replaced. dst (Prompt
opencompass/utils/prompt.py:107
↓ 443 callersFunctionopen
(file, mode='r', *args, **kwargs)
opencompass/utils/fileio.py:188
↓ 290 callersMethodformat
Replaces all instances of 'src' in the PromptList with 'dst'. Args: src (str): The string to be replaced. dst (Prompt
opencompass/utils/prompt.py:82
↓ 283 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/utils/datasets.py:10
↓ 150 callersMethodgroup
(self, n: int, details: List[Dict[str, Any]], test_set: Dataset)
opencompass/openicl/icl_evaluator/icl_base_evaluator.py:60
↓ 138 callersMethodlower
(text)
opencompass/datasets/lawbench/utils/rc_f1.py:54
↓ 116 callersFunctionload_dataset
(dataset_name, setting_name, parent_path, prompt_path=None,
opencompass/datasets/agieval/dataset_loader.py:275
↓ 92 callersMethodsum
see torch.sum Args: dim (): keepdim (): Returns:
opencompass/datasets/unconditional_protein_generation/omegafold/utils/protein_utils/aaframe.py:317
↓ 91 callersMethodencode
Encode prompt to tokens. Not necessary for most cases. Args: prompt (str): Input string. Returns: torch.Tens
opencompass/models/base.py:111
↓ 87 callersMethodupdate
Update pbar counter when callback.
opencompass/runners/local_api.py:224
↓ 84 callersFunctionmodel_abbr_from_cfg
Generate model abbreviation from the model's confg.
opencompass/utils/abbr.py:7
↓ 79 callersFunctiondataset_abbr_from_cfg
Returns dataset abbreviation from the dataset's confg.
opencompass/utils/abbr.py:19
↓ 75 callersFunctionget_logger
Get the logger for OpenCompass. Args: log_level (str): The log level. Default: 'INFO'. Choices are 'DEBUG', 'INFO', 'WARNING'
opencompass/utils/logging.py:20
↓ 71 callersMethodlower
(text)
opencompass/datasets/s3eval.py:55
↓ 70 callersMethodmean
(scores)
opencompass/datasets/truthfulqa.py:174
↓ 63 callersMethoddecode
Decode tokens to text. Not necessary for most cases. Args: tokens (torch.Tensor): Input tokens. Returns: str
opencompass/models/base.py:125
↓ 62 callersMethodload
(path: str)
opencompass/datasets/c3.py:14
↓ 51 callersMethodbuild
(module_path)
opencompass/models/interntrain.py:22
↓ 50 callersMethodview
See Tensor.view Args: *args (): Returns:
opencompass/datasets/unconditional_protein_generation/omegafold/utils/protein_utils/aaframe.py:690
↓ 39 callersFunctionget_infer_output_path
(model_cfg: ConfigDict, dataset_cfg: ConfigDict, root_path
opencompass/utils/abbr.py:40
↓ 35 callersMethodchoice
(self, inputs, choices)
opencompass/models/glm.py:132
↓ 34 callersMethodflush
Ensure simultaneous emptying of stdout and stderr when concurrent resources are available. When employing multiprocessing with standa
opencompass/models/base_api.py:77
↓ 33 callersMethodunsqueeze
see torch.squeeze Args: dim (): Returns:
opencompass/datasets/unconditional_protein_generation/omegafold/utils/protein_utils/aaframe.py:305
↓ 32 callersMethodread
(self, *args, **kwargs)
opencompass/datasets/mbpp.py:219
↓ 31 callersMethodwait
Wait till the next query can be sent. Applicable in both single-thread and multi-thread environments.
opencompass/models/base_api.py:153
↓ 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/models/base.py:203
↓ 26 callersMethodreadlines
(self, *args, **kwargs)
opencompass/datasets/mbpp.py:225
↓ 26 callersMethodto
(self, device)
opencompass/models/base.py:261
↓ 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/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/summarizers/subjective/utils.py:9
↓ 24 callersMethodrelease
Release concurrent resources if acquired. This behavior will fall back to do nothing if there are no concurrent resources.
opencompass/models/base_api.py:100
↓ 23 callersFunctionget_logger
(name, level=LOG_LEVEL, log_file=None, file_mode='w')
opencompass/openicl/utils/logging.py:10
↓ 23 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/utils/lark.py:13
↓ 22 callersMethodacquire
Acquire concurrent resources if exists. This behavior will fall back to wait with query_per_second if there are no concurrent resourc
opencompass/models/base_api.py:89
↓ 20 callersFunctiongeneral_postprocess
(text: str)
opencompass/utils/text_postprocessors.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/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/models/base.py:149
↓ 17 callersFunctionbuild_dataset_from_cfg
(dataset_cfg: ConfigDict)
opencompass/utils/build.py:8
↓ 17 callersMethodload
( self )
opencompass/summarizers/multi_model.py:125
↓ 17 callersMethodparse_template
(self, chat: List[dict], mode='gen')
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/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/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/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/summarizers/subjective/utils.py:24
↓ 14 callersMethod_construct_frame
Construct a frame Args: trans: the absolute position in the bigger frame rots: the rotation of the frame
opencompass/datasets/unconditional_protein_generation/omegafold/utils/protein_utils/aaframe.py:358
↓ 14 callersFunctionextract_text_from_brackets
(text, clean_level='basic')
opencompass/datasets/korbench/korbench_utils.py:336
↓ 14 callersFunctionextract_text_from_brackets
(text, clean_level='basic')
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/models/base.py:190
↓ 14 callersMethodto_dict
(self)
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/tasks/base.py:72
↓ 13 callersMethodretrieve
(self)
opencompass/openicl/icl_retriever/icl_dpp_retriever.py:74
↓ 13 callersMethodsubmit
(task, index)
opencompass/runners/local.py:163
↓ 12 callersFunctioniter_jsonl
(path)
opencompass/datasets/infinitebench/utils.py:7
↓ 12 callersMethodnormalize
(label)
opencompass/datasets/GUE.py:154
↓ 11 callersFunctiondump_results_dict
(results_dict, filename)
opencompass/openicl/icl_inferencer/icl_base_inferencer.py:96
↓ 11 callersFunctiontask_abbr_from_cfg
Returns task abbreviation from the task's confg.
opencompass/utils/abbr.py:30
↓ 11 callersMethodto
(self, device)
opencompass/openicl/icl_retriever/icl_topk_retriever.py:152
↓ 10 callersFunctioncreate_summarizer
(context_lengths, depths, dataset_size, sparse_depths=None)
opencompass/configs/summarizers/needlebench.py:32
↓ 10 callersFunctionget_config_type
(obj)
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/datasets/subjective/compass_arena_subjective_bench.py:509
↓ 10 callersMethodread
(self, *args, **kwargs)
opencompass/datasets/livecodebench/execute_utils.py:159
↓ 10 callersMethodtokenize
(self, text)
opencompass/openicl/icl_evaluator/hf_metrics/rouge.py:89
↓ 10 callersMethodtokenize
(self, text)
opencompass/datasets/lawbench/utils/modules/tokenization.py:121
↓ 9 callersFunctiondeal_with_judge_model_abbr
(model_cfg, judge_model_cfg, meta=False)
opencompass/utils/abbr.py:51
↓ 9 callersMethodget_dataloader
Return a dataloader of the input data list.
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/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
setup.py:20
↓ 9 callersFunctionremove_duplicate_pairs
(model_combinations)
opencompass/partitioners/sub_naive.py:16
↓ 9 callersMethodrun
(self)
opencompass/utils/menu.py:45
↓ 9 callersFunctionrun_humaneval_check
(completion)
tests/dataset/test_humaneval.py:6
↓ 9 callersMethodwrite_to_json
Dump the result to a json file.
opencompass/openicl/icl_inferencer/icl_base_inferencer.py:110
↓ 8 callersMethod__init__
( self, cfg: typing.Optional[argparse.Namespace] )
opencompass/datasets/unconditional_protein_generation/omegafold/modules.py:177
↓ 8 callersMethod_merge_edits
(seq, tag="X")
opencompass/datasets/lawbench/utils/modules/merger.py:23
↓ 8 callersMethodbatch_decode
(self, outputs, eos_token_ids: List[int], stopp
opencompass/models/interntrain.py:480
↓ 8 callersMethodclean
(cls, target_str: str)
opencompass/datasets/math_intern.py:129
↓ 8 callersFunctionextract_chemical_data
(text)
opencompass/datasets/smolinstruct.py:33
↓ 8 callersMethodforward
(self, dataloader, process_bar=False, information='')
opencompass/openicl/icl_retriever/icl_topk_retriever.py:121
↓ 8 callersFunctiongenerate_depth_percents
(intervals, interval_type)
opencompass/configs/datasets/needlebench/needlebench_4k/needlebench_multi_reasoning_4k.py:24
↓ 8 callersFunctiongenerate_depth_percents
(intervals, interval_type)
opencompass/configs/datasets/needlebench/needlebench_8k/needlebench_multi_reasoning_8k.py:24
↓ 8 callersMethodget_scores
Calculate toxic scores for each prediction. Args: predictions (List): List of predictions of each sample. Returns:
opencompass/openicl/icl_evaluator/icl_toxic_evaluator.py:174
↓ 8 callersFunctionnormalize_final_answer
Normalize a final answer to a quantitative reasoning question.
opencompass/datasets/math.py:68
↓ 8 callersMethodrun
(self, timeout)
opencompass/datasets/ds1000.py:287
↓ 7 callersMethod__init__
(self, pred_postprocessor: Optional[ConfigDict] = None)
opencompass/openicl/icl_evaluator/icl_hf_evaluator.py:104
↓ 7 callersMethod__init__
( self, subset: str, filter_keys: Union[str, List[str]], **kwargs, )
opencompass/datasets/advglue.py:22
↓ 7 callersFunctionbuild_model_from_cfg
(model_cfg: ConfigDict)
opencompass/utils/build.py:15
↓ 7 callersFunctionchange_accelerator
(models, accelerator)
opencompass/utils/run.py:236
↓ 7 callersFunctionfind_file
Find the first available file with given extensions.
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/openicl/icl_retriever/icl_base_retriever.py:114
↓ 7 callersFunctionload_json_or_jsonl
Load data from a JSON or JSONL file.
opencompass/datasets/korbench/korbench_utils.py:18
↓ 7 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
opencompass/datasets/lveval/evaluators.py:147
↓ 7 callersFunctionnormalize_zh_answer
Lower text and remove punctuation, extra whitespace.
opencompass/datasets/lveval/evaluators.py:166
↓ 7 callersFunctionsave_processed_data
(model_name, task_name, task_processed_data)
opencompass/datasets/bioinstruction/evaluator.py:306
↓ 7 callersFunctionsave_processed_data
(model_name, task_name, task_processed_data)
opencompass/datasets/bio_instruction/bio_instrcution.py:194
↓ 7 callersMethodto_json
(self)
opencompass/datasets/musr/tree.py:140
↓ 6 callersFunction_convert_chat_messages
(inputs, merge_role=True, skip_empty_prompt=True)
opencompass/models/huggingface_above_v4_33.py:62
↓ 6 callersFunctioncombined_int_check
(val)
opencompass/datasets/livecodebench/testing_util.py:77
↓ 6 callersMethodcompute_f1
(a_gold, a_pred)
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/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/openicl/icl_evaluator/icl_korbench_evaluator.py:166
next →1–100 of 3,711, ranked by callers