MCPcopy Create free account

hub / github.com/huggingface/evaluate / functions

Functions785 in github.com/huggingface/evaluate

↓ 2 callersFunctionhttp_get
( url, temp_file, proxies=None, resume_size=0, headers=None, cookies=None, timeout=100.0, max_retries=0, d
src/evaluate/utils/file_utils.py:333
↓ 2 callersFunctionmake_qid_to_has_ans
(dataset)
metrics/squad_v2/compute_score.py:51
↓ 2 callersFunctionmetric_max_over_ground_truths
(metric_fn, prediction, ground_truths)
metrics/super_glue/record_evaluation.py:51
↓ 2 callersFunctionmetric_max_over_ground_truths
(metric_fn, prediction, ground_truths)
metrics/squad/compute_score.py:47
↓ 2 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
metrics/wiki_split/wiki_split.py:80
↓ 2 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
metrics/cuad/compute_score.py:32
↓ 2 callersFunctionprocess_precisions
Processes precisions to ensure that precision and recall don't both get worse. Assumes the list precision is sorted in order of recalls
metrics/cuad/compute_score.py:103
↓ 2 callersFunctionradar_plot
Create a complex radar chart with different scales for each variable Source: https://towardsdatascience.com/how-to-create-and-visualize-complex-ra
src/evaluate/visualization.py:138
↓ 2 callersMethodreadlines
(self, *args, **kwargs)
metrics/code_eval/execute.py:131
↓ 2 callersFunctionsimple_accuracy
(preds, labels)
metrics/xtreme_s/xtreme_s.py:136
↓ 2 callersFunctionsimple_accuracy
(preds, labels)
metrics/indic_glue/indic_glue.py:76
↓ 2 callersFunctionsimple_accuracy
(preds, labels)
metrics/super_glue/super_glue.py:109
↓ 2 callersFunctionsimple_accuracy
(preds, labels)
metrics/glue/glue.py:83
↓ 2 callersFunctionstrip_accent
Strip accents from string
measurements/honest/honest.py:84
↓ 2 callersMethoduse_local_metrics
(self, evaluation_module_type)
tests/test_metric_common.py:146
↓ 1 callersFunctionSARIsent
(ssent, csent, rsents)
metrics/wiki_split/wiki_split.py:188
↓ 1 callersFunctionSARIsent
(ssent, csent, rsents)
metrics/sari/sari.py:161
↓ 1 callersMethod__init__
(self, lock_file, *args, **kwargs)
src/evaluate/module.py:47
↓ 1 callersMethod_build_data_dir
Path of this evaluation module in cache_dir: Will be: self._data_dir_root/self.name/self.config_name/self.hash (if not none)/
src/evaluate/module.py:266
↓ 1 callersMethod_check_all_processes_locks
(self)
src/evaluate/module.py:345
↓ 1 callersMethod_check_rendez_vous
(self)
src/evaluate/module.py:361
↓ 1 callersMethod_compute
This method defines the common API for all the evaluation module in the library
src/evaluate/module.py:719
↓ 1 callersMethod_compute_confidence_interval
A utility function enabling the confidence interval calculation for metrics computed by the evaluator based on `scipy`'s `bootstrap`
src/evaluate/evaluator/base.py:125
↓ 1 callersMethod_compute_time_perf
A utility function computing time performance metrics: - `total_time_in_seconds` - pipeline inference runtime for the evaluation
src/evaluate/evaluator/base.py:163
↓ 1 callersFunction_configure_library_root_logger
()
src/evaluate/utils/logging.py:67
↓ 1 callersFunction_copy_script_and_other_resources_in_importable_dir
Copy a script and its required imports to an importable directory Args: name (str): name of the resource to load importable_direc
src/evaluate/loading.py:273
↓ 1 callersMethod_create_cache_file
Create a new cache file. If the default cache file is used, we generated a new hash.
src/evaluate/module.py:277
↓ 1 callersMethod_download_and_prepare
Downloads and prepares resources for the evaluation module. This is the internal implementation to overwrite called when user calls `
src/evaluate/module.py:708
↓ 1 callersMethod_finalize
Close all the writing process and load/gather the data from all the nodes if main node or all_process is True.
src/evaluate/module.py:381
↓ 1 callersMethod_get_all_cache_files
Get a lock on all the cache files in a distributed setup. We wait for timeout second to let all the distributed node finish their tasks (defau
src/evaluate/module.py:310
↓ 1 callersFunction_get_default_logging_level
If EVALUATE_VERBOSITY env var is set to one of the valid choices return that as the new default level. If it is not - fall back to ``_default
src/evaluate/utils/logging.py:42
↓ 1 callersMethod_get_feature_types
(self)
metrics/mse/mse.py:101
↓ 1 callersMethod_get_feature_types
(self)
metrics/mape/mape.py:97
↓ 1 callersMethod_get_feature_types
(self)
metrics/smape/smape.py:137
↓ 1 callersMethod_get_feature_types
(self)
metrics/mase/mase.py:105
↓ 1 callersMethod_get_feature_types
(self)
metrics/mae/mae.py:97
↓ 1 callersMethod_get_feature_types
(self)
metrics/super_glue/super_glue.py:177
↓ 1 callersMethod_get_feature_types
(self)
metrics/brier_score/brier_score.py:98
↓ 1 callersFunction_git_commit_hash
()
src/evaluate/saving.py:67
↓ 1 callersMethod_infer_feature_from_batch
(self, batch)
src/evaluate/module.py:591
↓ 1 callersMethod_info
Construct the EvaluationModuleInfo object. See `EvaluationModuleInfo` for details. Warning: This function is only called once and the result
src/evaluate/module.py:666
↓ 1 callersMethod_merge_results
(self, results)
src/evaluate/module.py:983
↓ 1 callersMethod_scale_data
Scales data[1:] to ranges[0]
src/evaluate/visualization.py:116
↓ 1 callersFunction_setup_path
(path_or_file, current_time)
src/evaluate/saving.py:54
↓ 1 callersFunctionacc_and_f1
(preds, labels)
metrics/indic_glue/indic_glue.py:80
↓ 1 callersFunctionacc_and_f1
(preds, labels, f1_avg="binary")
metrics/super_glue/super_glue.py:113
↓ 1 callersFunctionacc_and_f1
(preds, labels)
metrics/glue/glue.py:87
↓ 1 callersMethodassert_suite_nonempty
(self)
src/evaluate/evaluation_suite/__init__.py:96
↓ 1 callersFunctionbleu
( preds, labels, smooth_method="exp", smooth_value=None, force=False, lowercase=False,
metrics/xtreme_s/xtreme_s.py:147
↓ 1 callersFunctionchdir
(root)
metrics/code_eval/execute.py:144
↓ 1 callersFunctioncheck_task
Checks an incoming task string, to validate it's correct and returns the default Evaluator class and default metric name. It first performs a
src/evaluate/evaluator/__init__.py:89
↓ 1 callersFunctionchoose_split
(data, subset=None)
src/evaluate/evaluator/utils.py:21
↓ 1 callersMethodcompute
input_column (`str`, defaults to `"path"`): the name of the column containing the input audio path in the dataset specified by `d
src/evaluate/evaluator/automatic_speech_recognition.py:65
↓ 1 callersMethodcompute
( self, model_or_pipeline: Union[ str, "Pipeline", Callable, "PreTrainedModel", "T
src/evaluate/evaluator/text2text_generation.py:111
↓ 1 callersMethodcompute
input_column (`str`, defaults to `"tokens"`): The name of the column containing the tokens feature in the dataset specified by `d
src/evaluate/evaluator/token_classification.py:220
↓ 1 callersMethodcompute
input_column (`str`, *optional*, defaults to `"text"`): The name of the column containing the text feature in the dataset specifi
src/evaluate/evaluator/text_classification.py:91
↓ 1 callersMethodcompute
input_column (`str`, defaults to `"image"`): The name of the column containing the images as PIL ImageFile in the dataset specifi
src/evaluate/evaluator/image_classification.py:70
↓ 1 callersFunctioncompute_em
(predictions, references)
metrics/wiki_split/wiki_split.py:104
↓ 1 callersFunctioncompute_exact
(a_gold, a_pred)
metrics/wiki_split/wiki_split.py:100
↓ 1 callersFunctioncompute_exact
(a_gold, a_pred)
metrics/squad_v2/compute_score.py:85
↓ 1 callersFunctioncompute_f1
(a_gold, a_pred)
metrics/squad_v2/compute_score.py:89
↓ 1 callersFunctioncompute_precision_recall
(predictions, ground_truths, qa_id)
metrics/cuad/compute_score.py:51
↓ 1 callersFunctioncompute_sacrebleu
( predictions, references, smooth_method="exp", smooth_value=None, force=False, lowerc
metrics/wiki_split/wiki_split.py:298
↓ 1 callersFunctioncompute_sari
(sources, predictions, references)
metrics/wiki_split/wiki_split.py:287
↓ 1 callersFunctioncompute_score
(key_lines, sys_lines, metrics, NP_only, remove_nested, keep_singletons, min_span)
metrics/coval/coval.py:229
↓ 1 callersFunctionconvert_github_url
Convert a link to a file on a github repo in a link to the raw github object.
src/evaluate/loading.py:111
↓ 1 callersFunctioncreate_tempdir
()
metrics/code_eval/execute.py:112
↓ 1 callersMethoddistributed_expected_results
(cls)
tests/test_metric.py:61
↓ 1 callersMethoddistributed_predictions_and_references
(cls)
tests/test_metric.py:57
↓ 1 callersMethoddownload_and_prepare
Downloads and prepares evaluation module for reading. Args: download_config ([`DownloadConfig`], *optional*): Spe
src/evaluate/module.py:677
↓ 1 callersFunctionestimate_pass_at_k
Estimates pass@k of each problem and returns them in an array.
metrics/code_eval/code_eval.py:198
↓ 1 callersFunctionestimator
Calculates 1 - comb(n - c, k) / comb(n, k).
metrics/code_eval/code_eval.py:201
↓ 1 callersFunctionevaluate
(dataset, predictions)
metrics/super_glue/record_evaluation.py:59
↓ 1 callersFunctionevaluate_multirc
Computes F1 score and Exact Match for MultiRC predictions.
metrics/super_glue/super_glue.py:122
↓ 1 callersFunctionf1_and_simple_accuracy
(preds, labels)
metrics/xtreme_s/xtreme_s.py:140
↓ 1 callersFunctionfilename_for_dataset_split
(dataset_name, split, filetype_suffix=None)
src/evaluate/naming.py:68
↓ 1 callersFunctionfilename_prefix_for_name
(name)
src/evaluate/naming.py:46
↓ 1 callersFunctionfiles_to_hash
Convert a list of scripts or text files provided in file_paths into a hashed filename in a repeatable way.
src/evaluate/loading.py:91
↓ 1 callersFunctionfilter_logging_context
()
metrics/bertscore/bertscore.py:27
↓ 1 callersFunctionget_aupr
(precisions, recalls)
metrics/cuad/compute_score.py:115
↓ 1 callersFunctionget_coref_infos
( key_lines, sys_lines, NP_only=False, remove_nested=False, keep_singletons=True, min_span=False, doc="dum
metrics/coval/coval.py:168
↓ 1 callersMethodget_dataset_split
Infers which split to use if `None` is given. Args: data (`str`): Name of dataset. subset
src/evaluate/evaluator/base.py:322
↓ 1 callersFunctionget_from_cache
Given a URL, look for the corresponding file in the local cache. If it's not there, download it. Then return the path to the cached file.
src/evaluate/utils/file_utils.py:393
↓ 1 callersMethodget_module
(self)
src/evaluate/loading.py:418
↓ 1 callersFunctionhead_hf_s3
( identifier: str, filename: str, use_cdn=False, dataset=True, max_retries=0 )
src/evaluate/utils/file_utils.py:90
↓ 1 callersFunctionhf_bucket_url
(identifier: str, filename: str, use_cdn=False, dataset=True)
src/evaluate/utils/file_utils.py:82
↓ 1 callersFunctionhonest_score
(self, predictions)
measurements/honest/honest.py:91
↓ 1 callersFunctionhonest_score_group
(self, predictions, groups)
measurements/honest/honest.py:99
↓ 1 callersMethodhonest_score_inner_sentence
(self, predicted_sentence)
measurements/honest/honest.py:169
↓ 1 callersMethodhonest_score_inner_word
(self, predicted_words)
measurements/honest/honest.py:156
↓ 1 callersFunctionimport_main_class
Import a module at module_path and return its main class, a Metric by default
src/evaluate/loading.py:74
↓ 1 callersFunctionimport_main_class
Import a module at module_path and return the EvaluationSuite class
src/evaluate/evaluation_suite/__init__.py:44
↓ 1 callersFunctionincrease_load_count
Update the download count of a dataset or metric.
src/evaluate/loading.py:130
↓ 1 callersFunctioninfer_gradio_input_types
Maps metric feature types to input types for gradio Dataframes: - float/int -> numbers - string -> strings - any other ->
src/evaluate/utils/gradio.py:18
↓ 1 callersFunctioninit_hf_modules
Add hf_modules_cache to the python path. By default hf_modules_cache='~/.cache/huggingface/modules'. It can also be set with the environm
src/evaluate/utils/file_utils.py:41
↓ 1 callersFunctionintersect_and_union
Calculate intersection and Union. Args: pred_label (`ndarray`): Prediction segmentation map of shape (height, width).
metrics/mean_iou/mean_iou.py:96
↓ 1 callersFunctionis_local_path
(url_or_filename: str)
src/evaluate/utils/file_utils.py:65
↓ 1 callersFunctionis_relative_path
(url_or_filename: str)
src/evaluate/utils/file_utils.py:72
↓ 1 callersMethodis_squad_v2_format
Check if the provided dataset follows the squad v2 data schema, namely possible samples where the answer is not in the context. In th
src/evaluate/evaluator/question_answering.py:124
↓ 1 callersFunctionjson_to_string_type
Maps json input type to str.
src/evaluate/utils/gradio.py:39
← previousnext →101–200 of 785, ranked by callers