MCPcopy Create free account

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

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

↓ 3 callersMethodconvert_examples_to_features
Loads a data file into a list of `InputFeatures` `cls_token_at_end` define the location of the CLS token: - False (Default, BERT/X
src/transformers/examples/legacy/token-classification/utils_ner.py:79
↓ 3 callersFunctionconvert_file_size_to_int
Converts a size expressed as a string with digits an unit (like `"5MB"`) to an integer (in bytes). Args: size (`int` or `str`): The
src/transformers/src/transformers/utils/hub.py:920
↓ 3 callersFunctionconvert_pytorch_state_dict_to_flax
(pt_state_dict, flax_model)
src/transformers/src/transformers/modeling_flax_pytorch_utils.py:148
↓ 3 callersFunctionconvert_to_rgb
Converts an image to RGB format. Only converts if the image is of type PIL.Image.Image, otherwise returns the image as is. Args:
src/transformers/src/transformers/image_transforms.py:748
↓ 3 callersFunctioncorners_to_center_format
Converts bounding boxes from corners format to center format. corners format: contains the coordinates for the top-left and bottom-right cor
src/transformers/src/transformers/image_transforms.py:597
↓ 3 callersMethodcpu_mem_used
get resident set size memory for the current process
src/transformers/src/transformers/trainer_utils.py:488
↓ 3 callersFunctioncreate_inputs
(input_types: List[str])
src/transformers/tests/tools/test_tools_common.py:34
↓ 3 callersFunctioncreate_reverse_dependency_tree
Create a list of all edges (a, b) which mean that modifying a impacts b with a going over all module and test files.
src/transformers/utils/tests_fetcher.py:753
↓ 3 callersFunctioncreate_tmp_repo
Creates a mock repository in a temporary folder for testing.
src/transformers/tests/repo_utils/test_check_copies.py:108
↓ 3 callersFunctioncross_entropy
Args: logits: bsz, seqlen, vocab_size labels: bsz, seqlen
src/transformers/examples/research_projects/jax-projects/big_bird/bigbird_flax.py:49
↓ 3 callersFunctiondata_loader
Returns batches of size `batch_size` from `dataset`. If `drop_last` is set to `False`, the final batch may be incomplete, and range in size f
src/transformers/examples/flax/summarization/run_summarization_flax.py:371
↓ 3 callersFunctiondata_loader
Returns batches of size `batch_size` from `dataset`. If `drop_last` is set to `False`, the final batch may be incomplete, and range in size f
src/transformers/examples/flax/language-modeling/run_clm_flax.py:286
↓ 3 callersFunctiondeepspeed_init
Init DeepSpeed, after updating the DeepSpeed configuration with any relevant Trainer's args. If `resume_from_checkpoint` was passed then an
src/transformers/src/transformers/integrations/deepspeed.py:335
↓ 3 callersMethoddetokenize
Detokenize the provided tokens ids to readable text: - **tokens_ids**: List of tokens ids - **skip_special_tokens**: Flag indicating
src/transformers/src/transformers/commands/serving.py:197
↓ 3 callersMethoddevice
`torch.device`: The device on which the module is (assuming that all the module parameters are on the same device).
src/transformers/src/transformers/modeling_utils.py:823
↓ 3 callersFunctiondiff_is_docstring_only
Check if the diff is only in docstrings (or comments and whitespace) in a filename. Args: repo (`git.Repo`): A git repository (for i
src/transformers/utils/tests_fetcher.py:207
↓ 3 callersFunctiondistill_main
(args)
src/transformers/examples/research_projects/seq2seq-distillation/distillation.py:296
↓ 3 callersFunctiondownload_artifact
Download a GitHub Action artifact from a URL. The URL is of the form `https://api.github.com/repos/huggingface/transformers/actions/artifacts/{AR
src/transformers/utils/get_ci_error_statistics.py:65
↓ 3 callersFunctionelementwise_func
(func_name, A, B, value, prefetch=True)
src/bitsandbytes/bitsandbytes/functional.py:209
↓ 3 callersFunctionembed_passages_for_retrieval
(passages, tokenizer, qa_embedder, max_length=128, device="cuda:0")
src/transformers/examples/research_projects/longform-qa/eli5_utils.py:568
↓ 3 callersFunctionembed_questions_for_retrieval
(q_ls, tokenizer, qa_embedder, device="cuda:0")
src/transformers/examples/research_projects/longform-qa/eli5_utils.py:579
↓ 3 callersFunctionenable_full_determinism
Helper function for reproducible behavior during distributed training. See - https://pytorch.org/docs/stable/notes/randomness.html for pytorc
src/transformers/src/transformers/trainer_utils.py:58
↓ 3 callersMethodenable_gradient_checkpointing
(self)
src/transformers/src/transformers/modeling_flax_utils.py:243
↓ 3 callersFunctionentropy
Calculate entropy of a pre-softmax logit Tensor
src/transformers/examples/research_projects/deebert/src/modeling_highway_bert.py:16
↓ 3 callersFunctionevaluate
(args, model, tokenizer, criterion, prefix="")
src/transformers/examples/research_projects/mm-imdb/run_mmimdb.py:235
↓ 3 callersMethodevaluate
Run evaluation and returns metrics. The calling script will be responsible for providing a method to compute metrics, as they are ta
src/transformers/src/transformers/trainer_tf.py:423
↓ 3 callersMethodfill_qmap
(self)
src/bitsandbytes/bitsandbytes/optim/optimizer.py:149
↓ 3 callersFunctionfilter_tests
(tests)
src/transformers/utils/tests_fetcher.py:955
↓ 3 callersMethodfinalize
( self, input_ids: torch.Tensor, final_beam_scores: torch.Tensor, final_beam_t
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:523
↓ 3 callersFunctionfind_adapter_config_file
r""" Simply checks if the model stored on the Hub or locally is an adapter model or not, return the path of the adapter config file if it is,
src/transformers/src/transformers/utils/peft_utils.py:29
↓ 3 callersFunctionfind_base_model_checkpoint
Finds the model checkpoint used in the docstrings for a given model. Args: model_type (`str`): A valid model type (like "bert" or "g
src/transformers/src/transformers/commands/add_new_model_like.py:675
↓ 3 callersMethodflatten_output_collection_property
Flatten any potential nested structure expanding the name of the field with the index of the element within the structure. A
src/transformers/src/transformers/onnx/config.py:425
↓ 3 callersFunctionformat_time
Format `t` (in seconds) to (h):mm:ss
src/transformers/src/transformers/utils/notebook.py:26
↓ 3 callersMethodfrom_dict
Instantiates a [`GenerationConfig`] from a Python dictionary of parameters. Args: config_dict (`Dict[str, Any]`):
src/transformers/src/transformers/generation/configuration_utils.py:773
↓ 3 callersMethodfrom_model_config
Instantiates a [`GenerationConfig`] from a [`PretrainedConfig`]. This function is useful to convert legacy [`PretrainedConfig`] objec
src/transformers/src/transformers/generation/configuration_utils.py:902
↓ 3 callersMethodfrom_pretrained
Load the secondary learner Args: state_path: Path to save secondary learner model: Pretrained GPT-2
src/transformers/examples/research_projects/information-gain-filtration/igf/igf.py:399
↓ 3 callersMethodgather_pre_entities
Fuse various numpy arrays into dicts with all the information needed for aggregation
src/transformers/src/transformers/pipelines/token_classification.py:356
↓ 3 callersFunctiongenerate_batch_splits
Generate batches of data for a specified batch size from sample indices. If the dataset size is not divisible by the batch size and `drop_last` is
src/transformers/examples/flax/language-modeling/run_mlm_flax.py:353
↓ 3 callersFunctiongenerate_batch_splits
Generate batches of data for a specified batch size from sample indices. If the dataset size is not divisible by the batch size and `drop_last` is
src/transformers/examples/flax/language-modeling/run_bart_dlm_flax.py:429
↓ 3 callersFunctiongenerate_batch_splits
Generate batches of data for a specified batch size from sample indices. If the dataset size is not divisible by the batch size and `drop_last` is
src/transformers/examples/flax/language-modeling/run_t5_mlm_flax.py:470
↓ 3 callersMethodget_adapter_state_dict
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:397
↓ 3 callersFunctionget_artifacts_links
Get all artifact links from a workflow run
src/transformers/utils/get_ci_error_statistics.py:39
↓ 3 callersMethodget_base_args
(self, output_dir, num_epochs, logging_steps)
src/transformers/tests/fsdp/test_fsdp.py:243
↓ 3 callersFunctionget_checkpoint_from_config_class
(config_class)
src/transformers/utils/check_config_docstrings.py:50
↓ 3 callersFunctionget_checkpoint_shard_files
For a given model: - download and cache all the shards of a sharded checkpoint if `pretrained_model_name_or_path` is a model ID on the
src/transformers/src/transformers/utils/hub.py:953
↓ 3 callersMethodget_dataloader
(self, type_path: str, batch_size: int, shuffle: bool = False)
src/transformers/examples/legacy/pytorch-lightning/lightning_base.py:177
↓ 3 callersMethodget_dataloader
(self, type_path: str, batch_size: int, shuffle: bool = False)
src/transformers/examples/research_projects/seq2seq-distillation/finetune.py:252
↓ 3 callersMethodget_dataloader
(self, type_path: str, batch_size: int, shuffle: bool = False)
src/transformers/examples/research_projects/seq2seq-distillation/lightning_base.py:177
↓ 3 callersMethodget_dataloader
(self, type_path: str, batch_size: int, shuffle: bool = False)
src/transformers/examples/research_projects/rag-end2end-retriever/finetune_rag.py:462
↓ 3 callersMethodget_dataloader
(self, type_path: str, batch_size: int, shuffle: bool = False)
src/transformers/examples/research_projects/rag-end2end-retriever/lightning_base.py:179
↓ 3 callersMethodget_dataloader
(self, type_path: str, batch_size: int, shuffle: bool = False)
src/transformers/examples/research_projects/rag/finetune_rag.py:349
↓ 3 callersMethodget_dataloader
(self, type_path: str, batch_size: int, shuffle: bool = False)
src/transformers/examples/research_projects/rag/lightning_base.py:177
↓ 3 callersFunctionget_dataset
( args: DataTrainingArguments, tokenizer: PreTrainedTokenizer, evaluate: bool = False, cache_d
src/transformers/examples/legacy/run_language_modeling.py:163
↓ 3 callersMethodget_dataset
(self)
src/transformers/examples/legacy/token-classification/utils_ner.py:363
↓ 3 callersFunctionget_default_endpoints
()
src/transformers/src/transformers/tools/base.py:631
↓ 3 callersMethodget_device_report
(report, rjust=6)
src/transformers/utils/notification_service.py:239
↓ 3 callersFunctionget_imports
Extracts all the libraries (not relative imports this time) that are imported in a file. Args: filename (`str` or `os.PathLike`): Th
src/transformers/src/transformers/dynamic_module_utils.py:135
↓ 3 callersFunctionget_indent
Find the indent in the first non empty line in a code sample. Args: code (`str`): The code to inspect. Returns: `str`:
src/transformers/utils/check_copies.py:208
↓ 3 callersMethodget_labels
(self)
src/transformers/src/transformers/data/datasets/glue.py:160
↓ 3 callersMethodget_labels
See base class.
src/transformers/examples/legacy/multiple_choice/utils_multiple_choice.py:433
↓ 3 callersFunctionget_launcher
(distributed=False, use_accelerate=False)
src/transformers/tests/fsdp/test_fsdp.py:99
↓ 3 callersFunctionget_launcher
(distributed=False)
src/transformers/tests/deepspeed/test_deepspeed.py:124
↓ 3 callersFunctionget_master_port
When using a single gpu launcher emulation (i.e. not deepspeed or python -m torch.distributed) the issue is that once the port is tied it can
src/transformers/tests/deepspeed/test_deepspeed.py:80
↓ 3 callersFunctionget_model_modules
Get all the model modules inside the transformers library (except deprecated models).
src/transformers/utils/check_repo.py:383
↓ 3 callersFunctionget_model_to_tester_mapping
Get a mapping from model classes to model tester classes in `test_file`.
src/transformers/utils/get_test_info.py:166
↓ 3 callersFunctionget_models
Get the objects in a module that are models. Args: module (`types.ModuleType`): The module from which we are extracting
src/transformers/utils/check_repo.py:423
↓ 3 callersFunctionget_parameter_names
Returns the names of the model parameters that are not inside a forbidden layer.
src/transformers/src/transformers/trainer_pt_utils.py:1063
↓ 3 callersMethodget_shape
(self, input_, shape=None)
src/transformers/tests/pipelines/test_pipelines_feature_extraction.py:161
↓ 3 callersMethodget_supported_tasks
(self)
src/transformers/src/transformers/pipelines/base.py:1195
↓ 3 callersFunctionget_task
(model: str, token: Optional[str] = None, **deprecated_kwargs)
src/transformers/src/transformers/pipelines/__init__.py:441
↓ 3 callersFunctionget_temp_dir
()
src/bitsandbytes/tests/test_optim.py:28
↓ 3 callersFunctionget_torch_version
()
src/transformers/src/transformers/utils/import_utils.py:260
↓ 3 callersFunctionget_tree_starting_at
Returns the tree starting at a given module following all edges. Args: module (`str`): The module that will be the root of the subtr
src/transformers/utils/tests_fetcher.py:765
↓ 3 callersMethodget_tsv_file
(self, tsv_file)
src/datasets/human_mesh_tsv.py:55
↓ 3 callersMethodget_tsv_file
(self, tsv_file)
src/datasets/hand_mesh_tsv.py:55
↓ 3 callersMethodget_warmup_steps
Get number of steps used for a linear warmup.
src/transformers/src/transformers/training_args.py:2127
↓ 3 callersFunctionget_xla_device_type
Returns the xla device type (CPU|GPU|TPU) or None if the device is a non-xla device.
src/transformers/src/transformers/training_args.py:124
↓ 3 callersFunctiongrad_status
(model: nn.Module)
src/transformers/examples/legacy/seq2seq/utils.py:584
↓ 3 callersFunctiongrad_status
(model: nn.Module)
src/transformers/examples/research_projects/seq2seq-distillation/utils.py:565
↓ 3 callersMethodgradients
The accumulated gradients on the current replica.
src/transformers/src/transformers/optimization_tf.py:332
↓ 3 callersFunctionhandle_metrics
Log and save metrics Args: - split: one of train, val, test - metrics: metrics dict - output_dir: where to save the metrics
src/transformers/examples/legacy/seq2seq/finetune_trainer.py:141
↓ 3 callersFunctionhrnet_w32
( pretrained=True, pretrained_ckpt='data/weights/pose_hrnet_w32_256x192.pth', downsamp
src/modeling/bert/hrnet.py:608
↓ 3 callersFunctionhttp_user_agent
Formats a user-agent string with basic info about a request.
src/transformers/src/transformers/utils/hub.py:223
↓ 3 callersMethodhypo_len
Number of hypotheses in the list.
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:403
↓ 3 callersMethodinitialize
(self)
src/bitsandbytes/bitsandbytes/functional.py:141
↓ 3 callersMethodinstall_metadata
(self, metadata)
src/transformers/src/transformers/utils/fx.py:612
↓ 3 callersFunctionis_auto_awq_available
()
src/transformers/src/transformers/utils/import_utils.py:669
↓ 3 callersFunctionis_clearml_available
()
src/transformers/src/transformers/integrations/integration_utils.py:89
↓ 3 callersFunctionis_essentia_available
()
src/transformers/src/transformers/utils/import_utils.py:276
↓ 3 callersFunctionis_flash_attn_2_available
()
src/transformers/src/transformers/utils/import_utils.py:607
↓ 3 callersFunctionis_ipex_available
()
src/transformers/src/transformers/utils/import_utils.py:559
↓ 3 callersFunctionis_keras_nlp_available
()
src/transformers/src/transformers/utils/import_utils.py:723
↓ 3 callersFunctionis_librosa_available
()
src/transformers/src/transformers/utils/import_utils.py:272
↓ 3 callersFunctionis_mlflow_available
()
src/transformers/src/transformers/integrations/integration_utils.py:127
↓ 3 callersFunctionis_openai_available
()
src/transformers/src/transformers/utils/import_utils.py:422
↓ 3 callersFunctionis_pretty_midi_available
()
src/transformers/src/transformers/utils/import_utils.py:280
↓ 3 callersFunctionis_remote_url
(url_or_filename)
src/transformers/examples/research_projects/visual_bert/utils.py:240
↓ 3 callersFunctionis_remote_url
(url_or_filename)
src/transformers/examples/research_projects/lxmert/utils.py:240
↓ 3 callersFunctionis_sagemaker_available
()
src/transformers/tests/sagemaker/__init__.py:4
↓ 3 callersFunctionis_scipy_available
()
src/transformers/src/transformers/utils/import_utils.py:633
← previousnext →901–1,000 of 11,352, ranked by callers