MCPcopy Create free account

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

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

↓ 16 callersFunctionfind_labels
Find the labels used by a given model. Args: model_class (`type`): The class of the model.
src/transformers/src/transformers/utils/generic.py:523
↓ 16 callersFunctionget_user_field
A utility function that asks a question to the user to get an answer, potentially looping until it gets a valid answer. Args: qu
src/transformers/src/transformers/commands/add_new_model_like.py:1554
↓ 16 callersMethodset_defaults
(cls, prefix, defaults)
src/transformers/src/transformers/utils/hp_naming.py:25
↓ 15 callersMethod_prepare_for_class
(self, inputs_dict, model_class)
src/transformers/tests/test_modeling_flax_common.py:135
↓ 15 callersMethodadd_special_tokens
Add a dictionary of special tokens (eos, pad, cls, etc.) to the encoder and link them to class attributes. If special tokens are NOT
src/transformers/src/transformers/tokenization_utils_base.py:873
↓ 15 callersMethodassert_padded_input_match
(self, input_r: list, input_p: list, max_length: int, pad_token_id: int)
src/transformers/tests/test_tokenization_common.py:346
↓ 15 callersMethodbuild
(self, input_shape)
src/transformers/src/transformers/modeling_tf_utils.py:3211
↓ 15 callersMethodcan_generate
Returns whether this model can generate sequences with `.generate()`. Returns: `bool`: Whether this model can generate s
src/transformers/src/transformers/modeling_utils.py:1245
↓ 15 callersMethodchar_to_token
Get the index of the token in the encoded output comprising a character in the original string for a sequence of the batch.
src/transformers/src/transformers/tokenization_utils_base.py:555
↓ 15 callersMethodchar_to_word
Get the word in the original string corresponding to a character in the original string of a sequence of the batch. Can be c
src/transformers/src/transformers/tokenization_utils_base.py:641
↓ 15 callersMethodcheck_to_4d
(self, mask_converter, q_len, kv_len, additional_mask=None, bsz=3)
src/transformers/tests/test_modeling_utils.py:1296
↓ 15 callersMethoddownsample
Downsample mesh.
src/modeling/_smpl.py:248
↓ 15 callersMethodfill_match
A utility method that massages the config file and can optionally verify that the values match. 1. Replace "auto" values with `Train
src/transformers/src/transformers/integrations/deepspeed.py:104
↓ 15 callersFunctionget_results
(output_dir)
src/transformers/examples/pytorch/test_pytorch_examples.py:82
↓ 15 callersFunctionreshape
Framework-agnostic version of `numpy.reshape` that will work on torch/TensorFlow/Jax tensors as well as NumPy arrays.
src/transformers/src/transformers/utils/generic.py:587
↓ 15 callersFunctionshape_list
(*args, **kwargs)
src/transformers/src/transformers/utils/dummy_tf_objects.py:170
↓ 15 callersFunctionsqueeze
Framework-agnostic version of `numpy.squeeze` that will work on torch/TensorFlow/Jax tensors as well as NumPy arrays.
src/transformers/src/transformers/utils/generic.py:606
↓ 14 callersMethod__init__
(self, cfg, input_shape: Dict[str, ShapeSpec])
src/transformers/examples/research_projects/visual_bert/modeling_frcnn.py:1501
↓ 14 callersMethod__init__
(self, cfg, input_shape: Dict[str, ShapeSpec])
src/transformers/examples/research_projects/lxmert/modeling_frcnn.py:1501
↓ 14 callersFunction_get_library_root_logger
()
src/transformers/src/transformers/utils/logging.py:78
↓ 14 callersMethodaggregate
(self, pre_entities: List[dict], aggregation_strategy: AggregationStrategy)
src/transformers/src/transformers/pipelines/token_classification.py:418
↓ 14 callersFunctioncreate_optimizer
Creates an optimizer with a learning rate schedule using a warmup phase followed by a linear decay. Args: init_lr (`float`):
src/transformers/src/transformers/optimization_tf.py:88
↓ 14 callersMethodget_output_embeddings
Returns the model's output embeddings. Returns: `nn.Module`: A torch module mapping hidden states to vocabulary.
src/transformers/src/transformers/modeling_utils.py:1379
↓ 14 callersMethodget_special_tokens_mask
Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
src/transformers/src/transformers/tokenization_utils.py:915
↓ 14 callersMethodget_trainer
(self, a=0, b=0, train_len=64, eval_len=64, callbacks=None, disable_tqdm=False, **kwargs)
src/transformers/tests/trainer/test_trainer_callback.py:90
↓ 14 callersFunctionnested_concat
Concat the `new_tensors` to `tensors` on the first dim and pad them on the second if needed. Works for tensors or nested list/tuples/dict of
src/transformers/src/transformers/trainer_pt_utils.py:112
↓ 14 callersFunctionparse_commit_message
Parses the commit message to detect if a command is there to skip, force all or part of the CI. Args: commit_message (`str`): The co
src/transformers/utils/tests_fetcher.py:1158
↓ 14 callersMethodtie_weights
Tie the weights between the input embeddings and the output embeddings. If the `torchscript` flag is set in the configuration, can't
src/transformers/src/transformers/modeling_utils.py:1403
↓ 14 callersFunctionto_channel_dimension_format
Converts `image` to the channel dimension format specified by `channel_dim`. Args: image (`numpy.ndarray`): The image to
src/transformers/src/transformers/image_transforms.py:53
↓ 14 callersMethodtrace
Traces `root` and returns the corresponding FX `torch.fx.Graph` representation. `root` can either be a `torch.nn.Module` instance or
src/transformers/src/transformers/utils/fx.py:993
↓ 14 callersFunctiontranspose
Framework-agnostic version of `numpy.transpose` that will work on torch/TensorFlow/Jax tensors as well as NumPy arrays.
src/transformers/src/transformers/utils/generic.py:568
↓ 13 callersMethod__init__
(self, config)
src/transformers/examples/research_projects/movement-pruning/emmental/modeling_bert_masked.py:289
↓ 13 callersMethod_check_lora_correctly_converted
Utility method to check if the model has correctly adapters injected on it.
src/transformers/tests/peft_integration/test_peft_integration.py:45
↓ 13 callersMethodadd_arrays
Add `arrays` to the internal storage, Will initialize the storage to the full size at the first arrays passed so that if we're bound
src/transformers/src/transformers/trainer_pt_utils.py:431
↓ 13 callersMethodcall_event
(self, event, args, state, control, **kwargs)
src/transformers/src/transformers/trainer_callback.py:408
↓ 13 callersMethodconvert_to_tensors
Convert the inner content to tensors. Args: tensor_type (`str` or [`~utils.TensorType`], *optional*): Th
src/transformers/src/transformers/tokenization_utils_base.py:680
↓ 13 callersMethoddecoder
(self, replacement, add_prefix_space)
src/transformers/src/transformers/convert_slow_tokenizer.py:526
↓ 13 callersFunctionget_linear_schedule_with_warmup
Create a schedule with a learning rate that decreases linearly from the initial lr set in the optimizer to 0, after a warmup period during wh
src/transformers/src/transformers/optimization.py:104
↓ 13 callersFunctionget_size_dict
Converts the old size parameter in the config into the new dict expected in the config. This is to ensure backwards compatibility with the ol
src/transformers/src/transformers/image_processing_utils.py:705
↓ 13 callersFunctionget_time
(k, fn, info_dict)
src/bitsandbytes/benchmarking/switchback/speed_benchmark.py:24
↓ 13 callersFunctionis_datasets_available
()
src/transformers/src/transformers/utils/import_utils.py:518
↓ 13 callersFunctionis_tokenizers_available
()
src/transformers/src/transformers/utils/import_utils.py:689
↓ 13 callersFunctionis_torch_npu_available
Checks if `torch_npu` is installed and potentially if a NPU is in the environment
src/transformers/src/transformers/utils/import_utils.py:461
↓ 13 callersFunctionis_wandb_available
()
src/transformers/src/transformers/integrations/integration_utils.py:78
↓ 13 callersMethodnum_parameters
Get number of (optionally, trainable or non-embeddings) parameters in the module. Args: only_trainable (`bool`, *optiona
src/transformers/src/transformers/modeling_utils.py:979
↓ 13 callersMethodprocess
( self, input_ids: torch.LongTensor, next_scores: torch.FloatTensor, next_toke
src/transformers/src/transformers/generation/beam_search.py:99
↓ 13 callersFunctionprune_linear_layer
Prune a linear layer (a model parameters) to keep only entries in index. Return the pruned layer as a new layer with requires_grad=True.
src/modeling/bert/modeling_utils.py:833
↓ 13 callersFunctionset_seed
Helper function for reproducible behavior to set the seed in `random`, `numpy`, `torch` and/or `tf` (if installed). Args: seed (`int
src/transformers/src/transformers/trainer_utils.py:85
↓ 13 callersMethodshape
(self)
src/transformers/src/transformers/utils/fx.py:616
↓ 13 callersMethodstart
start tracking for the caller's stage
src/transformers/src/transformers/trainer_utils.py:504
↓ 13 callersMethodstep
Performs a single optimization step. Args: closure (callable, optional): A closure that reevaluates the model and
src/bitsandbytes/bitsandbytes/optim/lars.py:221
↓ 13 callersMethodstore
src/bitsandbytes/include/SIMD.h:184
↓ 13 callersFunctionto_pil_image
Converts `image` to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if needed. Args: im
src/transformers/src/transformers/image_transforms.py:157
↓ 13 callersMethodto_pil_image
Converts `image` to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if needed. Args
src/transformers/src/transformers/image_utils.py:336
↓ 12 callersFunctioncalculate_rouge
Calculate rouge using rouge_scorer package. Args: pred_lns: list of summaries generated by model tgt_lns: list of groundtruth sum
src/transformers/examples/legacy/seq2seq/utils.py:508
↓ 12 callersMethodconvert_tokens_to_string
(self, tokens: List[str])
src/transformers/src/transformers/tokenization_utils.py:988
↓ 12 callersFunctiondirect_transformers_import
Imports transformers directly Args: path (`str`): The path to the source file file (`str`, optional): The file to join with the p
src/transformers/src/transformers/utils/import_utils.py:1368
↓ 12 callersFunctionevaluate_ast
Evaluate an absract syntax tree using the content of the variables stored in a state and only evaluating a given set of functions. This
src/transformers/src/transformers/tools/python_interpreter.py:78
↓ 12 callersFunctionevaluator
(contact_labels_3d_pred, contact_labels_3d_gt, normalize=True, return_dict=False)
src/utils/evaluator.py:9
↓ 12 callersFunctionfind_file_path_in_yaml
(fname, root)
src/utils/tsv_file_ops.py:107
↓ 12 callersFunctionfind_indent
Returns the number of spaces that start a line indent.
src/transformers/src/transformers/commands/add_new_model_like.py:128
↓ 12 callersFunctionhas_file
Checks if a repo contains a given file without downloading it. Works for remote repos and local folders. <Tip warning={false}> This fun
src/transformers/src/transformers/utils/hub.py:584
↓ 12 callersMethodinit_weights
(self)
src/transformers/examples/research_projects/bertabs/modeling_bertabs.py:92
↓ 12 callersFunctionis_torch_xpu_available
Checks if `intel_extension_for_pytorch` is installed and potentially if a XPU is in the environment
src/transformers/src/transformers/utils/import_utils.py:578
↓ 12 callersFunctionmask_to_test_readable
(mask: Image)
src/transformers/tests/pipelines/test_pipelines_image_segmentation.py:66
↓ 12 callersMethodpost_init
A method executed at the end of each Transformer model initialization, to execute code that needs the model's modules properly initia
src/transformers/src/transformers/modeling_utils.py:1157
↓ 12 callersMethodprepare_inputs_for_generation
(self, *args, **kwargs)
src/transformers/src/transformers/generation/utils.py:595
↓ 12 callersFunctionquantize_rowwise
(x: torch.Tensor)
src/bitsandbytes/bitsandbytes/triton/quantize_rowwise.py:9
↓ 12 callersFunctionverify_out_features_out_indices
Verify that out_indices and out_features are valid for the given stage_names.
src/transformers/src/transformers/utils/backbone_utils.py:28
↓ 11 callersMethod_check_outputs
(self, output, input_ids, config, use_cache=False, num_return_sequences=1)
src/transformers/tests/generation/test_utils.py:1907
↓ 11 callersMethod_create_repo
Create the repo if needed, cleans up repo_id with deprecated kwargs `repo_url` and `organization`, retrieves the token.
src/transformers/src/transformers/utils/hub.py:648
↓ 11 callersMethod_get_files_timestamps
Returns the list of files with their last modification timestamp.
src/transformers/src/transformers/utils/hub.py:683
↓ 11 callersMethod_get_input_ids_and_config
(self)
src/transformers/tests/generation/test_flax_utils.py:71
↓ 11 callersMethod_get_logits_processor_and_kwargs
( input_length, eos_token_id, forced_bos_token_id=None, forced_eos_token_id=No
src/transformers/tests/generation/test_utils.py:112
↓ 11 callersMethod_upload_modified_files
Uploads all modified files in `working_dir` to `repo_id`, based on `files_timestamps`.
src/transformers/src/transformers/utils/hub.py:689
↓ 11 callersFunctioncheck_models_equal
(model1, model2)
src/transformers/tests/test_modeling_flax_utils.py:133
↓ 11 callersMethodcheck_optim_and_kwargs
(self, training_args: TrainingArguments, expected_cls, expected_kwargs)
src/transformers/tests/trainer/test_trainer.py:2775
↓ 11 callersMethodcheck_trained_model
(self, model, alternate_seed=False)
src/transformers/tests/trainer/test_trainer.py:523
↓ 11 callersMethodcheck_trainer_state_are_the_same
(self, trainer_state, trainer_state1)
src/transformers/tests/trainer/test_trainer.py:445
↓ 11 callersFunctioncommit_changes
Commit new `contents` to `filenames` inside a given `repo`.
src/transformers/tests/repo_utils/test_tests_fetcher.py:192
↓ 11 callersFunctionget_model_files
Retrieves all the files associated to a model. Args: model_type (`str`): A valid model type (like "bert" or "gpt2") framewor
src/transformers/src/transformers/commands/add_new_model_like.py:630
↓ 11 callersFunctionget_resize_output_image_size
Find the target (height, width) dimension of the output image after resizing given the input image and the desired size. Args: i
src/transformers/src/transformers/image_transforms.py:209
↓ 11 callersMethodget_tokenizer
(self, **kwargs)
src/transformers/tests/test_tokenization_common.py:268
↓ 11 callersFunctionhertz_to_mel
Convert frequency from hertz to mels. Args: freq (`float` or `np.ndarray`): The frequency, or multiple frequencies, in h
src/transformers/src/transformers/audio_utils.py:25
↓ 11 callersMethodinitialize
this function has to be called in init function if cache_policy is enabled. Thus, let's always call it in init funciton to make it si
src/utils/tsv_file.py:138
↓ 11 callersFunctionis_tf_tensor
Tests if `x` is a tensorflow tensor or not. Safe to call even if tensorflow is not installed.
src/transformers/src/transformers/utils/generic.py:195
↓ 11 callersMethodkeys
(self)
src/transformers/src/transformers/tokenization_utils_base.py:280
↓ 11 callersFunctionmkdir
(path)
src/utils/miscellaneous.py:15
↓ 11 callersFunctionpad
Pads the `image` with the specified (height, width) `padding` and `mode`. Args: image (`np.ndarray`): The image to pad.
src/transformers/src/transformers/image_transforms.py:661
↓ 11 callersMethodput
Function that is called by `.generate()` to push new tokens
src/transformers/src/transformers/generation/streamers.py:29
↓ 11 callersMethodsetdefault
(self, *args, **kwargs)
src/transformers/src/transformers/utils/generic.py:389
↓ 11 callersMethodsetup
Overwrite this method here for any operation that is expensive and needs to be executed before you start using your tool. Such as loa
src/transformers/src/transformers/tools/base.py:115
↓ 11 callersFunctiontranslator
(text, src_lang, tgt_lang)
src/transformers/src/transformers/tools/evaluate_agent.py:26
↓ 11 callersFunctionunwrap_model
Recursively unwraps a model from potential containers (as used in distributed training). Args: model (`torch.nn.Module`): The model
src/transformers/src/transformers/modeling_utils.py:4606
↓ 11 callersMethodwarn_if_padding_and_no_attention_mask
Shows a one-time warning if the input_ids appear to contain padding and no attention mask was given.
src/transformers/src/transformers/modeling_utils.py:4144
↓ 10 callersMethod_ensure_format_supported
(self, image)
src/transformers/src/transformers/image_utils.py:329
↓ 10 callersMethod_get_tensors
(self, length)
src/transformers/tests/generation/test_stopping_criteria.py:39
↓ 10 callersMethodaccumulate
(grad1, grad2)
src/transformers/tests/optimization/test_optimization_tf.py:74
↓ 10 callersFunctionadd_content_to_file
A utility to add some content inside a given file. Args: file_name (`str` or `os.PathLike`): The name of the file in which we want to
src/transformers/src/transformers/commands/add_new_model_like.py:286
↓ 10 callersFunctionadd_content_to_text
A utility to add some content inside a given text. Args: text (`str`): The text in which we want to insert some content. conte
src/transformers/src/transformers/commands/add_new_model_like.py:228
← previousnext →201–300 of 11,352, ranked by callers