MCPcopy Create free account

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

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

↓ 2,045 callersFunctionrequires_backends
(obj, backends)
src/transformers/src/transformers/utils/import_utils.py:1230
↓ 1,564 callersMethodinfo
(self, msg)
src/transformers/tests/trainer/test_trainer_utils.py:481
↓ 1,039 callersMethodsplit
Will look for the words added to the trie within `text`. Output is the original string splitted along the boundaries of the words fou
src/transformers/src/transformers/tokenization_utils.py:93
↓ 870 callersMethodfrom_pretrained
r""" Instantiate a [`ModelCard`] from a pre-trained model model card. Parameters: pretrained_model_name_or_path: either:
src/transformers/src/transformers/modelcard.py:126
↓ 858 callersMethoditems
(self)
src/transformers/src/transformers/feature_extraction_utils.py:112
↓ 796 callersMethodpop
(self, *args, **kwargs)
src/transformers/src/transformers/utils/generic.py:392
↓ 747 callersMethodto
(self, *args, **kwargs)
src/transformers/src/transformers/modeling_utils.py:2281
↓ 642 callersMethodkeys
Called when a proxy object is has the keys() method called. This is what happens when ** is called on a proxy. This should return an iterator
src/transformers/src/transformers/utils/fx.py:1177
↓ 504 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: str, **kwargs)
src/transformers/examples/research_projects/lxmert/utils.py:177
↓ 396 callersMethodsave_pretrained
Save a model card object to the directory or file `save_directory_or_file`.
src/transformers/src/transformers/modelcard.py:114
↓ 331 callersMethodwrite
(self, msg)
src/transformers/scripts/benchmark/trainer-benchmark.py:139
↓ 330 callersMethodmean
Returns the mean of the distribution.
src/transformers/src/transformers/time_series_utils.py:42
↓ 328 callersFunctionmodel
r""" # Using torch.hub ! import torch model = torch.hub.load('huggingface/transformers', 'model', 'bert-base-unca
src/transformers/hubconf.py:73
↓ 300 callersMethodupdate
(self, *args, **kwargs)
src/transformers/src/transformers/utils/generic.py:395
↓ 291 callersMethodload
(module, prefix='')
src/modeling/bert/modeling_utils.py:483
↓ 284 callersMethodreplace
(original_file: str, line_to_copy_below: str, lines_to_copy: List[str])
src/transformers/src/transformers/commands/add_new_model.py:204
↓ 258 callersFunctionis_torch_available
()
src/transformers/src/transformers/utils/import_utils.py:256
↓ 253 callersMethodfloat
(self, *args)
src/transformers/src/transformers/modeling_utils.py:2318
↓ 238 callersFunctionpipeline
Utility factory method to build a [`Pipeline`]. Pipelines are made of: - A [tokenizer](tokenizer) in charge of mapping raw textual
src/transformers/src/transformers/pipelines/__init__.py:531
↓ 235 callersMethodsize
Number of byte required for this data type Returns: Integer > 0
src/transformers/src/transformers/onnx/utils.py:28
↓ 230 callersMethodgenerate
r""" Generates sequences of token ids for models with a language modeling head. <Tip warning={true}> Most generation-contro
src/transformers/src/transformers/generation/utils.py:1395
↓ 218 callersFunctionget_ptr
Get the ctypes pointer from a PyTorch Tensor. Parameters ---------- A : torch.tensor The PyTorch tensor. Returns --
src/bitsandbytes/bitsandbytes/functional.py:442
↓ 217 callersFunctiontokenizer
r""" # Using torch.hub ! import torch tokenizer = torch.hub.load('huggingface/transformers', 'tokenizer', 'bert-base-uncased'
src/transformers/hubconf.py:59
↓ 205 callersMethodvalues
(self)
src/transformers/src/transformers/feature_extraction_utils.py:108
↓ 203 callersMethoddetach
Need to document this
src/transformers/examples/research_projects/bertabs/modeling_bertabs.py:573
↓ 202 callersFunctionnested_simplify
Simplifies an object by rounding float numbers, and downcasting tensors/numpy arrays to get simple equality test within tests.
src/transformers/src/transformers/testing_utils.py:1908
↓ 183 callersMethoddecode
Uses the `post_processor` to decode the model output.
src/transformers/src/transformers/tools/base.py:552
↓ 163 callersMethodtime
(self)
src/transformers/utils/notification_service.py:147
↓ 153 callersMethodcopy
Creates a new instance of this constraint. Args: stateful(`bool`): Whether to not only copy the constraint for new insta
src/transformers/src/transformers/generation/beam_constraints.py:114
↓ 151 callersMethodencode
Uses the `pre_processor` to prepare the inputs for the `model`.
src/transformers/src/transformers/tools/base.py:539
↓ 150 callersMethodto
(self, device)
src/bitsandbytes/bitsandbytes/functional.py:769
↓ 131 callersMethodread
(self, n=-1)
src/transformers/src/transformers/commands/lfs.py:142
↓ 127 callersMethodtrain
Main training entry point. Args: resume_from_checkpoint (`str` or `bool`, *optional*): If a `str`, local
src/transformers/src/transformers/trainer.py:1429
↓ 126 callersFunctionis_tf_available
()
src/transformers/src/transformers/utils/import_utils.py:406
↓ 123 callersFunctionget_regression_trainer
( a=0, b=0, double_output=False, train_len=64, eval_len=64, pretrained=True, keep_report_to=False, **k
src/transformers/tests/trainer/test_trainer.py:362
↓ 123 callersMethodparse
Overwrites the `parse` method to incorporate a skip for CUDA tests, and remove logs and dataset prints before calling `super().parse`
src/transformers/src/transformers/testing_utils.py:2178
↓ 117 callersMethodhalf
(self, *args)
src/transformers/src/transformers/modeling_utils.py:2308
↓ 108 callersMethodcuda
(self, device: Optional[Union[int, device, str]] = None, non_blocking: bool = False)
src/bitsandbytes/bitsandbytes/nn/modules.py:303
↓ 104 callersMethodis_available
()
src/transformers/src/transformers/hyperparameter_search.py:111
↓ 103 callersMethodpush_to_hub
Upload `self.model` and `self.tokenizer` to the 🤗 model hub on the repo `self.args.hub_model_id`. Parameters: commit_mes
src/transformers/src/transformers/trainer.py:3572
↓ 101 callersMethodopen
(*args, **kwargs)
src/transformers/tests/pipelines/test_pipelines_image_to_text.py:45
↓ 100 callersMethodget_auto_remove_tmp_dir
Args: tmp_dir (`string`, *optional*): if `None`: - a unique temporary path will be created
src/transformers/src/transformers/testing_utils.py:1484
↓ 99 callersMethodcompile
This is a thin wrapper that sets the model's loss output head as the loss if the user does not specify a loss function themselves.
src/transformers/src/transformers/modeling_tf_utils.py:1500
↓ 99 callersMethoddevice
(self)
src/transformers/src/transformers/utils/fx.py:620
↓ 98 callersFunctionnext
src/bitsandbytes/include/Portable.h:166
↓ 88 callersMethodmain_process_first
A context manager for torch distributed environment where on needs to do something on the main process, while blocking replicas, and
src/transformers/src/transformers/training_args.py:2077
↓ 86 callersMethodparse_args_into_dataclasses
Parse command-line args into instances of the specified dataclass types. This relies on argparse's `ArgumentParser.parse_known_args`
src/transformers/src/transformers/hf_argparser.py:265
↓ 85 callersMethodprocess_index
The index of the current process used.
src/transformers/src/transformers/training_args.py:1988
↓ 84 callersMethodbatch_decode
Convert a list of lists of token ids into a list of strings by calling decode. Args: sequences (`Union[List[int], List[L
src/transformers/src/transformers/tokenization_utils_base.py:3686
↓ 83 callersMethodpad
(self, images)
src/transformers/examples/research_projects/lxmert/processing_image.py:87
↓ 82 callersMethodto
( self: T, device: Optional[Union[int, device]] = ..., dtype: Optional[Union[dtype, st
src/bitsandbytes/bitsandbytes/nn/modules.py:307
↓ 80 callersMethodlog
Log `logs` on the various objects watching training. Subclass and override this method to inject custom behavior. Args:
src/transformers/src/transformers/trainer.py:2604
↓ 79 callersMethodsave_metrics
(self, latest_metrics, type_path)
src/transformers/examples/research_projects/rag/finetune_rag.py:301
↓ 77 callersMethodbackward
(ctx, grad)
src/transformers/examples/research_projects/lxmert/modeling_frcnn.py:409
↓ 75 callersMethodconvert_tokens_to_ids
Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the vocabulary. Args:
src/transformers/src/transformers/tokenization_utils.py:630
↓ 74 callersMethodload_state_dict
Load an optimizer state. Arguments: state_dict (`dict`): An optimizer state (should be returned from a call to `s
src/bitsandbytes/bitsandbytes/optim/optimizer.py:156
↓ 72 callersMethodsave
Saves the relevant code files for your tool so it can be pushed to the Hub. This will copy the code of your tool in `output_dir` as w
src/transformers/src/transformers/tools/base.py:122
↓ 72 callersMethodtokenizer
(self, proto)
src/transformers/src/transformers/convert_slow_tokenizer.py:486
↓ 71 callersMethodencode_plus
Tokenize and prepare for the model a sequence or a pair of sequences. <Tip warning={true}> This method is deprecated, `__ca
src/transformers/src/transformers/tokenization_utils_base.py:2930
↓ 69 callersMethodbatch_encode_plus
Tokenize and prepare for the model a list of sequences or a list of pairs of sequences. <Tip warning={true}> This method is
src/transformers/src/transformers/tokenization_utils_base.py:3026
↓ 69 callersMethodcast
r"""Make a deep copy of value, casting all tensors to device of param.
src/bitsandbytes/bitsandbytes/optim/optimizer.py:187
↓ 67 callersMethodsave
(self, saveas=None)
src/transformers/examples/research_projects/lxmert/visualizing_image.py:194
↓ 66 callersMethod__init__
(self, shape, initializer, trainable, name, **kwargs)
src/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py:2655
↓ 66 callersMethodexpand_dims
Expands 2-dimensional `image` to 3 dimensions. Args: image (`PIL.Image.Image` or `np.ndarray` or `torch.Tensor`):
src/transformers/src/transformers/image_utils.py:419
↓ 64 callersFunctionflatten_dict
Flatten a nested dict into a single level dict.
src/transformers/src/transformers/utils/generic.py:545
↓ 62 callersMethodapply
Args: inputs (`torch.FloatTensor`) The input matrix from which the binarizer computes the binary mask.
src/transformers/examples/research_projects/movement-pruning/emmental/modules/binarizer.py:121
↓ 61 callersMethodparse_json_file
Alternative helper method that does not use `argparse` at all, instead loading a json file and populating the dataclass types.
src/transformers/src/transformers/hf_argparser.py:379
↓ 60 callersFunctionshape_list
Deal with dynamic shape in tensorflow cleanly. Args: tensor (`tf.Tensor` or `np.ndarray`): The tensor we want the shape of. Ret
src/transformers/src/transformers/tf_utils.py:26
↓ 59 callersFunctionrequire_version
Perform a runtime check of the dependency versions, using the exact same syntax used by pip. The installed module version comes from the *si
src/transformers/src/transformers/utils/versions.py:49
↓ 59 callersFunctionsend_example_telemetry
Sends telemetry that helps tracking the examples use. Args: example_name (`str`): The name of the example. *example_args (da
src/transformers/src/transformers/utils/hub.py:885
↓ 59 callersFunctionsupported_features_mapping
Generate the mapping between supported the features and their corresponding OnnxConfig for a given model. Args: *supported_features:
src/transformers/src/transformers/onnx/features.py:55
↓ 57 callersFunctionids_tensor
(shape, vocab_size, rng=None, name=None)
src/transformers/tests/test_modeling_common.py:3327
↓ 57 callersMethodzero_grad
(self)
src/transformers/examples/research_projects/bertabs/modeling_bertabs.py:1047
↓ 56 callersMethod_prepare_for_class
(self, inputs_dict, model_class, return_labels=False)
src/transformers/tests/test_modeling_common.py:173
↓ 56 callersMethodsize
src/bitsandbytes/include/AAlloc.h:67
↓ 55 callersMethodrun
Sends a request to the agent. Args: task (`str`): The task to perform return_code (`bool`, *optional*, defau
src/transformers/src/transformers/tools/agents.py:318
↓ 55 callersMethodtrain
The real training loop.
src/transformers/examples/research_projects/distillation/distiller.py:329
↓ 54 callersFunctioncheck_min_version
(min_version)
src/transformers/src/transformers/utils/__init__.py:231
↓ 52 callersMethodstride
(self)
src/transformers/examples/research_projects/lxmert/modeling_frcnn.py:802
↓ 51 callersFunction_is_package_available
(pkg_name: str, return_version: bool = False)
src/transformers/src/transformers/utils/import_utils.py:41
↓ 51 callersMethodadd
Passes over every char (utf-8 char) on word and recursively adds it to the internal `data` trie representation. The special key `""`
src/transformers/src/transformers/tokenization_utils.py:62
↓ 50 callersMethodget_tokenizers
(self, fast=True, **kwargs)
src/transformers/tests/test_tokenization_common.py:258
↓ 50 callersMethodsave_model
Will save the model, so you can reload it using `from_pretrained()`. Will only save from the main process.
src/transformers/src/transformers/trainer.py:2770
↓ 49 callersMethodclose
Closes the progress bar.
src/transformers/src/transformers/utils/notebook.py:199
↓ 49 callersMethodscalar
src/bitsandbytes/include/BinAlgo.h:16
↓ 48 callersMethodindex
src/bitsandbytes/include/Algo-Direct-Common.h:44
↓ 47 callersMethod_prepare_for_class
(self, inputs_dict, model_class, return_labels=False)
src/transformers/tests/test_modeling_tf_common.py:123
↓ 46 callersFunctionis_vision_available
()
src/transformers/src/transformers/utils/import_utils.py:693
↓ 45 callersFunctionis_main_process
Whether or not the current process is the local process, based on `xm.get_ordinal()` (for TPUs) first, then on `local_rank`.
src/transformers/src/transformers/trainer_utils.py:338
↓ 45 callersFunctionis_sagemaker_mp_enabled
()
src/transformers/src/transformers/utils/import_utils.py:771
↓ 45 callersMethodresize
Resizes `image`. Enforces conversion of input to PIL.Image. Args: image (`PIL.Image.Image` or `np.ndarray` or `torch.Ten
src/transformers/src/transformers/image_utils.py:485
↓ 44 callersFunctioncached_file
Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_repo_id (`str` or `os.PathLike
src/transformers/src/transformers/utils/hub.py:260
↓ 44 callersFunctionids_tensor
Creates a random int32 tensor of the shape within the vocab size.
src/transformers/tests/generation/test_flax_utils.py:41
↓ 44 callersFunctionis_torch_tpu_available
Checks if `torch_xla` is installed and potentially if a TPU is in the environment
src/transformers/src/transformers/utils/import_utils.py:435
↓ 44 callersFunctionset_seed
(args)
src/transformers/examples/legacy/run_swag.py:225
↓ 43 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.py:2946
↓ 43 callersMethodstep
One optimization step: forward of student AND teacher, backward on the loss (for gradient accumulation), and possibly a parameter upd
src/transformers/examples/research_projects/distillation/distiller.py:371
↓ 41 callersMethodfrom_pretrained
Convenience method to build a `LocalAgent` from a pretrained checkpoint. Args: pretrained_model_name_or_path (`str` or `
src/transformers/src/transformers/tools/agents.py:705
↓ 41 callersFunctionget_last_checkpoint
(folder)
src/transformers/src/transformers/trainer_utils.py:196
↓ 41 callersFunctionis_flax_available
()
src/transformers/src/transformers/utils/import_utils.py:426
next →1–100 of 11,352, ranked by callers