MCPcopy Create free account

hub / github.com/Aveiro-Lin/GraphiContact / functions

Functions11,352 in github.com/Aveiro-Lin/GraphiContact

↓ 2 callersFunctionclean_main_ref_in_model_list
Replace the links from main doc to stable doc in the model list of the README.
src/transformers/utils/release.py:119
↓ 2 callersMethodclean_up_tokenization
Clean up a list of simple English tokenization artifacts like spaces before punctuations and abbreviated forms. Args: ou
src/transformers/src/transformers/tokenization_utils_base.py:3798
↓ 2 callersMethodclear_torch_jit_class_registry
(self)
src/transformers/tests/test_modeling_common.py:761
↓ 2 callersFunctionclip_loss
(similarity)
src/transformers/examples/research_projects/jax-projects/hybrid_clip/run_hybrid_clip.py:458
↓ 2 callersFunctioncmd_exists
(cmd)
src/transformers/src/transformers/testing_utils.py:1010
↓ 2 callersFunctioncompute_contrastive_loss
( quantized_features, transformer_features, negative_indices, mask_time_indices, logits_temp, num_negative
src/transformers/examples/research_projects/jax-projects/wav2vec2/run_wav2vec2_pretrain_flax.py:251
↓ 2 callersMethodcompute_loss
How the loss is computed by Trainer. By default, all models return the loss in the first element. Subclass and override for custom b
src/transformers/src/transformers/trainer.py:2714
↓ 2 callersFunctioncompute_metrics
(preds, label_ids)
src/transformers/examples/tensorflow/text-classification/run_glue.py:384
↓ 2 callersFunctioncompute_metrics
Computes accuracy on a batch of predictions
src/transformers/examples/tensorflow/image-classification/run_image_classification.py:447
↓ 2 callersFunctioncompute_metrics
(p: EvalPrediction)
src/transformers/examples/tensorflow/question-answering/run_qa.py:636
↓ 2 callersFunctioncompute_metrics
()
src/transformers/examples/flax/token-classification/run_flax_ner.py:695
↓ 2 callersFunctioncompute_metrics
(p: EvalPrediction)
src/transformers/examples/flax/question-answering/run_qa.py:812
↓ 2 callersFunctioncompute_metrics
(preds, labels)
src/transformers/examples/flax/summarization/run_summarization_flax.py:725
↓ 2 callersMethodcompute_num_context_mask
(self, kv_len, context, q_len)
src/transformers/tests/test_modeling_utils.py:1361
↓ 2 callersFunctioncompute_token_type_ids
Segment embeddings as described in [1] The values {0,1} were found in the repository [2]. Attributes: batch: torch.Tensor, size [bat
src/transformers/examples/research_projects/bertabs/utils_summarization.py:143
↓ 2 callersFunctionconfig_save_file
(tsv_file, save_file=None, append_str='.new.tsv')
src/utils/tsv_file_ops.py:61
↓ 2 callersFunctioncontext_en
()
src/transformers/tests/utils/test_file_utils.py:56
↓ 2 callersMethodcontrastive_search
r""" Generates sequences of token ids for models with a language modeling head using **contrastive search** and can be used for text-d
src/transformers/src/transformers/generation/utils.py:1954
↓ 2 callersFunctionconv3x3
3x3 convolution with padding
src/modeling/bert/hrnet.py:17
↓ 2 callersFunctionconv3x3
3x3 convolution with padding
src/modeling/hrnet/hrnet_cls_net_gridfeat.py:30
↓ 2 callersFunctionconv3x3
3x3 convolution with padding
src/modeling/hrnet/hrnet_cls_net.py:30
↓ 2 callersFunctionconvert_slow_tokenizer
Utilities to convert a slow tokenizer instance in a fast tokenizer instance. Args: transformer_tokenizer ([`~tokenization_utils_base
src/transformers/src/transformers/convert_slow_tokenizer.py:1311
↓ 2 callersFunctionconvert_tf_weight_name_to_pt_weight_name
Convert a TF 2.0 model variable name in a pytorch model weight name. Conventions for TF2.0 scopes -> PyTorch attribute names conversions:
src/transformers/src/transformers/modeling_tf_pytorch_utils.py:42
↓ 2 callersFunctionconvert_to_float
Converts value to a float using a series of increasingly complex heuristics. Args: value: object that needs to be converted. Allowed types i
src/transformers/examples/research_projects/tapex/wikisql_utils.py:36
↓ 2 callersMethodconvert_to_sharded_checkpoint
(self, folder, save_safe=True, load_safe=True)
src/transformers/tests/trainer/test_trainer.py:460
↓ 2 callersMethodconvert_to_tensors
Convert the inner content to tensors. Args: tensor_type (`str` or [`~utils.TensorType`], *optional*): Th
src/transformers/src/transformers/feature_extraction_utils.py:164
↓ 2 callersFunctioncount_samples
(file_list)
src/transformers/examples/tensorflow/language-modeling-tpu/run_mlm.py:175
↓ 2 callersMethodcreate_accelerator_and_postprocess
(self)
src/transformers/src/transformers/trainer.py:3831
↓ 2 callersFunctioncreate_dummy_files
Create the content of the dummy files. Args: backend_specific_objects (`Dict[str, List[str]]`, *optional*): The mapping
src/transformers/utils/check_dummies.py:158
↓ 2 callersFunctioncreate_dynamic_module
Creates a dynamic module in the cache directory for modules. Args: name (`str` or `os.PathLike`): The name of the dynami
src/transformers/src/transformers/dynamic_module_utils.py:59
↓ 2 callersMethodcreate_from_csv
( cls, file_name, split_name="", column_label=0, column_text=1, column_id=None, skip_first_row=False,
src/transformers/src/transformers/data/processors/utils.py:143
↓ 2 callersFunctioncreate_json_map
Creates a map from a list of tests to run to easily split them by category, when running parallelism of slow tests. Args: test_files
src/transformers/utils/tests_fetcher.py:984
↓ 2 callersFunctioncreate_module_to_test_map
Extract the tests from the reverse_dependency_map and potentially filters the model tests. Args: reverse_map (`Dict[str, List[str]]`
src/transformers/utils/tests_fetcher.py:914
↓ 2 callersMethodcreate_optimizer
Setup the optimizer. We provide a reasonable default that works well. If you want to use something else, you can pass a tuple in the
src/transformers/src/transformers/trainer.py:920
↓ 2 callersFunctioncreate_scene
(mesh, img, focal_length=500, camera_center=250, img_res=500)
src/tools/visualize.py:37
↓ 2 callersMethodcreate_scheduler
Setup the scheduler. The optimizer of the trainer must have been set up either before this method is called or passed as an argument.
src/transformers/src/transformers/trainer.py:1100
↓ 2 callersMethodcreate_sentinel_ids
Sentinel ids creation given the indices that should be masked. The start indices of each mask are replaced by the sentinel ids in inc
src/transformers/examples/flax/language-modeling/run_t5_mlm_flax.py:374
↓ 2 callersFunctioncreate_tiny_models
( output_path, all, model_types, models_to_skip, no_check, upload, organization,
src/transformers/utils/create_dummy_models.py:1382
↓ 2 callersFunctioncrop
Crop image according to the supplied bounding box.
src/utils/image_ops.py:97
↓ 2 callersFunctioncross_entropy
Compute cross entropy and entropy for log probs and targets. Args: logits: [batch, length, num_classes] float array. targets: categorica
src/transformers/examples/research_projects/performer/run_mlm_performer.py:365
↓ 2 callersFunctioncross_entropy
(logits, axis)
src/transformers/examples/research_projects/jax-projects/hybrid_clip/run_hybrid_clip.py:452
↓ 2 callersFunctioncustom_to_pil
(x, process=True, mode="RGB")
src/transformers/examples/research_projects/vqgan-clip/img_processing.py:28
↓ 2 callersMethodcut_text
(self, text, offsets)
src/transformers/src/transformers/tokenization_utils.py:246
↓ 2 callersFunctiondata_loader
Returns batches of size `batch_size` from truncated `dataset`, sharded over all local devices. Shuffle batches if `shuffle` is `True`.
src/transformers/examples/research_projects/jax-projects/model_parallel/run_clm_mp.py:179
↓ 2 callersFunctiondatetime_now
()
src/transformers/examples/legacy/seq2seq/run_eval.py:82
↓ 2 callersMethoddecode_image
(raw_image)
src/transformers/src/transformers/tools/base.py:724
↓ 2 callersFunctiondecode_pred
(pred: EvalPrediction)
src/transformers/examples/legacy/seq2seq/utils.py:84
↓ 2 callersFunctiondecode_pred
(pred: EvalPrediction)
src/transformers/examples/research_projects/seq2seq-distillation/utils.py:70
↓ 2 callersFunctiondeduplicate_dataset
Deduplicate the dataset using minhash and jaccard similarity. This function first generate duplicate clusters, then each cluster is reduced to
src/transformers/examples/research_projects/codeparrot/scripts/minhash_deduplication.py:209
↓ 2 callersFunctiondeepspeed_load_checkpoint
(deepspeed_engine, checkpoint_path)
src/transformers/src/transformers/integrations/deepspeed.py:390
↓ 2 callersFunctiondenumpify_detensorize
Recursively calls `.item()` on the element of the dictionary passed
src/transformers/src/transformers/trainer_utils.py:670
↓ 2 callersFunctiondep_version_check
(pkg, hint=None)
src/transformers/src/transformers/dependency_versions_check.py:62
↓ 2 callersFunctiondequantize_4bit
Dequantizes FP4 blockwise quantized values. Dequantizes the tensor A with maximum absolute values absmax in blocks of size blocksize. P
src/bitsandbytes/bitsandbytes/functional.py:1291
↓ 2 callersFunctiondequantize_blockwise
Dequantizes blockwise quantized values. Dequantizes the tensor A with maximum absolute values absmax in blocks of size 4096. Parame
src/bitsandbytes/bitsandbytes/functional.py:915
↓ 2 callersMethodderive_stage
derives the stage/caller name automatically
src/transformers/src/transformers/trainer_utils.py:478
↓ 2 callersMethoddevice
(self)
src/transformers/src/transformers/benchmark/benchmark_args.py:103
↓ 2 callersMethoddevice_placement
Context Manager allowing tensor allocation on the user-specified device in framework agnostic way. Returns: Context mana
src/transformers/src/transformers/pipelines/base.py:902
↓ 2 callersMethoddict_torch_dtype_to_str
Checks whether the passed dictionary and its nested dicts have a *torch_dtype* key and if it's not None, converts torch.dtype to a st
src/transformers/src/transformers/configuration_utils.py:991
↓ 2 callersMethoddict_torch_dtype_to_str
Checks whether the passed dictionary and its nested dicts have a *torch_dtype* key and if it's not None, converts torch.dtype to a st
src/transformers/src/transformers/generation/configuration_utils.py:806
↓ 2 callersMethoddisplay
(self)
src/transformers/src/transformers/utils/notebook.py:188
↓ 2 callersFunctiondistributed_concat
(tensor: Any, num_total_examples: Optional[int] = None)
src/transformers/src/transformers/trainer_pt_utils.py:196
↓ 2 callersMethoddo_checks
(self, output_dir, do_train=True, do_eval=True, quality_checks=True)
src/transformers/tests/deepspeed/test_deepspeed.py:991
↓ 2 callersMethoddoes_advance
Reads in a token and returns whether it creates progress.
src/transformers/src/transformers/generation/beam_constraints.py:61
↓ 2 callersFunctiondownload_prompt
Downloads and caches the prompt from a repo and returns it contents (if necessary)
src/transformers/src/transformers/tools/prompts.py:33
↓ 2 callersFunctiondraw_text
content is a dict. draws key: val on image Assumes key is str, val is float
src/utils/renderer.py:237
↓ 2 callersMethoddraw_weights
(self, key)
src/transformers/examples/research_projects/performer/modeling_flax_performer_utils.py:505
↓ 2 callersMethoddtype
`torch.dtype`: The dtype of the module (assuming that all the module parameters have the same dtype).
src/transformers/src/transformers/modeling_utils.py:831
↓ 2 callersMethodembed_answers
(self, a_ids, a_mask, checkpoint_batch_size=-1)
src/transformers/examples/research_projects/longform-qa/eli5_utils.py:171
↓ 2 callersMethodembed_questions
(self, q_ids, q_mask, checkpoint_batch_size=-1)
src/transformers/examples/research_projects/longform-qa/eli5_utils.py:167
↓ 2 callersMethodembed_sentences_checkpointed
(self, input_ids, attention_mask, checkpoint_batch_size=-1)
src/transformers/examples/research_projects/longform-qa/eli5_utils.py:129
↓ 2 callersMethodenable_adapters
If you are not familiar with adapters and PEFT methods, we invite you to read more about them on the PEFT official documentation: htt
src/transformers/src/transformers/integrations/peft.py:336
↓ 2 callersMethodencode_image
(image)
src/transformers/src/transformers/tools/base.py:717
↓ 2 callersFunctionencode_line
(tokenizer, line, max_length, padding_side, pad_to_max_length=True, return_tensors="pt")
src/transformers/examples/research_projects/rag-end2end-retriever/utils_rag.py:21
↓ 2 callersFunctionencode_line
(tokenizer, line, max_length, padding_side, pad_to_max_length=True, return_tensors="pt")
src/transformers/examples/research_projects/rag/utils_rag.py:21
↓ 2 callersMethodencode_line
Only used by LegacyDataset
src/transformers/examples/legacy/seq2seq/utils.py:229
↓ 2 callersMethodencode_line
Only used by LegacyDataset
src/transformers/examples/research_projects/seq2seq-distillation/utils.py:212
↓ 2 callersFunctionensure_model_and_config_inputs_match
:param model_inputs: :param config_inputs: :return:
src/transformers/src/transformers/onnx/convert.py:474
↓ 2 callersMethoderror_out
(title, ci_title="", runner_not_available=False, runner_failed=False, setup_failed=False)
src/transformers/utils/notification_service.py:512
↓ 2 callersFunctioneval_data_collator
Returns batches of size `batch_size` from `eval dataset`. Sharding handled by `pad_shard_unpad` in the eval loop.
src/transformers/examples/flax/token-classification/run_flax_ner.py:370
↓ 2 callersFunctioneval_data_collator
Returns batches of size `batch_size` from `eval dataset`. Sharding handled by `pad_shard_unpad` in the eval loop.
src/transformers/examples/flax/question-answering/run_qa.py:427
↓ 2 callersFunctionevaluate
(args, model, tokenizer, prefix="")
src/transformers/examples/legacy/run_swag.py:416
↓ 2 callersFunctionevaluate
(args, model, tokenizer, prefix="")
src/transformers/examples/legacy/question-answering/run_squad.py:269
↓ 2 callersFunctionevaluate
(args, model, tokenizer, prefix="")
src/transformers/examples/research_projects/distillation/run_squad_w_distillation.py:308
↓ 2 callersFunctionevaluate
(args, model, tokenizer, prefix="")
src/transformers/examples/research_projects/movement-pruning/masked_run_glue.py:415
↓ 2 callersFunctionevaluate
(args, model, tokenizer, prefix="")
src/transformers/examples/research_projects/movement-pruning/masked_run_squad.py:437
↓ 2 callersFunctionevaluate
(args)
src/transformers/examples/research_projects/codeparrot/scripts/codeparrot_training.py:175
↓ 2 callersFunctionevaluate
(args, model, tokenizer, prefix="", patience=0)
src/transformers/examples/research_projects/bert-loses-patience/run_glue_with_pabee.py:264
↓ 2 callersMethodevaluate
(self, eval_dataset=None, eval_examples=None, ignore_keys=None, metric_key_prefix: str = "eval")
src/transformers/examples/pytorch/question-answering/trainer_qa.py:36
↓ 2 callersFunctionevaluate_one_result
(explanation, code, agent_answer, theoretical_answer, answer, verbose=False)
src/transformers/src/transformers/tools/evaluate_agent.py:462
↓ 2 callersFunctionevaluation_loop
( rng: jax.random.PRNGKey, dataset: Dataset, metric_key_prefix: str = "eval",
src/transformers/examples/flax/image-captioning/run_image_captioning_flax.py:1066
↓ 2 callersFunctionexpand_1d
Expands 1-dimensional `Tensor`s into 2-dimensional `Tensor`s. Copied from Keras to here to avoid versioning issues.
src/transformers/src/transformers/tf_utils.py:246
↓ 2 callersFunctionexpand_to_aliases
(given_answers, make_sub_answers=False)
src/transformers/examples/research_projects/jax-projects/big_bird/evaluate.py:17
↓ 2 callersMethodextract
By default will return vocab and merges with respect to their order, by sending `vocab_scores` we're going to order the merges with r
src/transformers/src/transformers/convert_slow_tokenizer.py:58
↓ 2 callersFunctionextract_time_from_single_job
Extract time info from a single job in a GitHub Actions workflow run
src/transformers/utils/get_github_job_time.py:9
↓ 2 callersFunctionffmpeg_read
Helper function to read an audio file through ffmpeg.
src/transformers/src/transformers/pipelines/audio_utils.py:10
↓ 2 callersMethodfilter_input_ids
Puts sentinel mask on `input_ids` and fuse consecutive mask tokens into a single mask token by deleting. This will reduce the sequenc
src/transformers/examples/flax/language-modeling/run_t5_mlm_flax.py:389
↓ 2 callersFunctionfind_best_thresh
(preds, scores, na_probs, qid_to_has_ans)
src/transformers/src/transformers/data/metrics/squad_metrics.py:191
↓ 2 callersFunctionfind_best_thresh_v2
(preds, scores, na_probs, qid_to_has_ans)
src/transformers/src/transformers/data/metrics/squad_metrics.py:146
↓ 2 callersFunctionfind_code_in_transformers
Find and return the source code of an object. Args: object_name (`str`): The name of the object we want the source code
src/transformers/utils/check_copies.py:134
↓ 2 callersFunctionfind_cuda_libraries_in_path_list
(paths_list_candidate: str)
src/bitsandbytes/bitsandbytes/diagnostics/cuda.py:44
← previousnext →1,301–1,400 of 11,352, ranked by callers