MCPcopy Create free account

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

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

↓ 40 callersMethodfrom_pretrained
(cls, retriever_name_or_path, actor_handles, indexed_dataset=None, **kwargs)
src/transformers/examples/research_projects/rag/distributed_ray_retriever.py:136
↓ 39 callersMethodshuffle
(self, buffer_size=1000)
src/transformers/examples/research_projects/codeparrot/scripts/codeparrot_training.py:94
↓ 39 callersMethodstep
Performs a single optimization step. Arguments: closure (`Callable`, *optional*): A closure that reevaluates the model a
src/transformers/src/transformers/optimization.py:442
↓ 38 callersMethodfrom_config
Creates an optimizer from its config with WarmUp custom object.
src/transformers/src/transformers/optimization_tf.py:230
↓ 38 callersMethodpredict
Run prediction and returns predictions and potential metrics. Depending on the dataset and your use case, your test dataset may cont
src/transformers/src/transformers/trainer.py:3017
↓ 38 callersMethodresize_token_embeddings
Resizes input token embeddings matrix of the model if `new_num_tokens != config.vocab_size`. Takes care of tying weights embeddings
src/transformers/src/transformers/modeling_utils.py:1548
↓ 38 callersMethodto_dict
Serializes this instance to a Python dictionary.
src/transformers/src/transformers/modelcard.py:240
↓ 37 callersFunctionset_seed
Set the random seed.
src/transformers/examples/research_projects/distillation/utils.py:126
↓ 36 callersMethodevaluate
(self, state, dataset)
src/transformers/examples/research_projects/jax-projects/big_bird/bigbird_flax.py:262
↓ 35 callersFunctionfilter
Filter dataset with heuristics. Config, test and has_no_keywords files are removed with a given probability.
src/transformers/examples/research_projects/codeparrot/scripts/preprocessing.py:129
↓ 34 callersMethod_read_tsv
Reads a tab separated value file.
src/transformers/src/transformers/data/processors/utils.py:119
↓ 34 callersFunctiondeps_list
(*pkgs)
src/transformers/setup.py:215
↓ 34 callersMethodtransform
Scikit / Keras interface to transformers' pipelines. This method will forward to __call__().
src/transformers/src/transformers/pipelines/base.py:889
↓ 32 callersMethodget_input_embeddings
Returns the model's input embeddings. Returns: `nn.Module`: A torch module mapping vocabulary to hidden states.
src/transformers/src/transformers/modeling_utils.py:1353
↓ 31 callersFunctionadd_start_docstrings
(*docstr)
src/transformers/src/transformers/utils/doc.py:23
↓ 31 callersMethodcollect
(self)
src/transformers/src/transformers/testing_utils.py:2193
↓ 31 callersMethodis_world_process_zero
Whether or not this process is the global main process (when training in a distributed fashion on several machines, this is only goin
src/transformers/src/transformers/trainer.py:2758
↓ 30 callersFunctionget_activation
(activation_string)
src/transformers/src/transformers/activations.py:224
↓ 29 callersFunction_add_variant
(weights_name: str, variant: Optional[str] = None)
src/transformers/src/transformers/modeling_utils.py:761
↓ 29 callersMethodbackward
(ctx, grad_output)
src/bitsandbytes/tests/test_modules.py:240
↓ 29 callersMethodget_process_log_level
Returns the log level to be used depending on whether this process is the main process of node 0, main process of node non-0, or a no
src/transformers/src/transformers/training_args.py:2038
↓ 29 callersMethodto_tuple
Convert self to a tuple containing all the attributes/keys that are not `None`.
src/transformers/src/transformers/utils/generic.py:424
↓ 29 callersMethodtokenize
Tokenize the provided input and eventually returns corresponding tokens id: - **text_input**: String to tokenize - **return_ids**: Bo
src/transformers/src/transformers/commands/serving.py:179
↓ 29 callersMethodtrain
(self, state, tr_dataset, val_dataset)
src/transformers/examples/research_projects/jax-projects/big_bird/bigbird_flax.py:229
↓ 28 callersMethod_get_uniform_logits
(self, batch_size: int, length: int)
src/transformers/tests/generation/test_logits_process.py:61
↓ 28 callersMethodpad
Pad a single encoded input or a batch of encoded inputs up to predefined length or to the max sequence length in the batch.
src/transformers/src/transformers/tokenization_utils_base.py:3128
↓ 28 callersMethodsample
r""" Generates sequences of token ids for models with a language modeling head using **multinomial sampling** and can be used for text
src/transformers/src/transformers/generation/utils.py:2671
↓ 27 callersMethodget_vocab
(self)
src/transformers/src/transformers/tokenization_utils_fast.py:213
↓ 27 callersFunctionloss_fn
(params)
src/transformers/examples/flax/question-answering/run_qa.py:932
↓ 27 callersMethodrun_task_tests
Run pipeline tests for a specific `task` Args: task (`str`): A task name. This should be a key in the mapping `pi
src/transformers/tests/test_pipeline_mixin.py:129
↓ 26 callersMethodconvert_ids_to_tokens
(self, ids: int, skip_special_tokens: bool = False)
src/transformers/src/transformers/tokenization_utils.py:946
↓ 26 callersMethodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: language (`str`, *optional*):
src/transformers/src/transformers/trainer.py:3452
↓ 26 callersFunctionis_accelerate_available
(min_version: str = "0.21.0")
src/transformers/src/transformers/utils/import_utils.py:655
↓ 26 callersMethodprint_fn
(self)
src/transformers/src/transformers/benchmark/benchmark_utils.py:633
↓ 25 callersMethod_get_input_ids_and_config
(self, batch_size=2)
src/transformers/tests/generation/test_utils.py:92
↓ 25 callersFunctionget_tests_dir
Args: append_path: optional path to append to the tests dir path Return: The full path to the `tests` dir, so that the tests
src/transformers/src/transformers/testing_utils.py:1062
↓ 25 callersMethodinit
( self, batch_size: int, max_length: int, num_beams: int, device: torc
src/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py:361
↓ 25 callersFunctionpatch_transformer_repo_path
Temporarily patches the variables defines in `tests_fetcher` to use a different location for the repo.
src/transformers/tests/repo_utils/test_tests_fetcher.py:174
↓ 24 callersMethod__init__
(self, config)
src/modeling/bert/modeling_bert.py:408
↓ 24 callersFunctionload_image
Loads `image` to a PIL Image. Args: image (`str` or `PIL.Image.Image`): The image to convert to the PIL Image format.
src/transformers/src/transformers/image_utils.py:279
↓ 24 callersMethodset
external allocation
src/bitsandbytes/include/AAlloc.h:56
↓ 23 callersMethodconvert
(k, v)
src/transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples_multi_gpu.py:130
↓ 23 callersMethodcuda
(self, *args, **kwargs)
src/transformers/src/transformers/modeling_utils.py:2270
↓ 23 callersMethodgenerate
Generate an image from the given prompts. If image_path is provided, the image is used as a starting point for the optimization. If im
src/transformers/examples/research_projects/vqgan-clip/VQGAN_CLIP.py:211
↓ 23 callersFunctionis_on_gpu
(tensors)
src/bitsandbytes/bitsandbytes/functional.py:421
↓ 23 callersMethodprepare_tf_dataset
Wraps a HuggingFace [`~datasets.Dataset`] as a `tf.data.Dataset` with collation and batching. This method is designed to create a "re
src/transformers/src/transformers/modeling_tf_utils.py:1395
↓ 22 callersMethodcheck_result
(self, file_name, expected_result)
src/transformers/tests/utils/test_add_new_model_like.py:93
↓ 22 callersMethodcheck_results_dict_not_empty
(self, results)
src/transformers/tests/benchmark/test_benchmark.py:30
↓ 22 callersMethodfrom_dict
Constructs a `ModelCard` from a Python dictionary of parameters.
src/transformers/src/transformers/modelcard.py:222
↓ 22 callersMethodget_env
Return a copy of the `os.environ` object that sets up `PYTHONPATH` correctly, depending on the test suite it's invoked from. This is
src/transformers/src/transformers/testing_utils.py:1464
↓ 22 callersFunctionget_tf_activation
(activation_string)
src/transformers/src/transformers/activations_tf.py:130
↓ 22 callersMethodinit_file
(self, file_name, content)
src/transformers/tests/utils/test_add_new_model_like.py:89
↓ 22 callersMethodis_initialized
(self)
src/bitsandbytes/bitsandbytes/utils.py:61
↓ 22 callersFunctionmockenv_context
Temporarily updates the `os.environ` dictionary in-place. Similar to mockenv The `os.environ` dictionary is updated in-place so that the mod
src/transformers/src/transformers/testing_utils.py:1613
↓ 21 callersMethodadd_tokens
Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added to it with indices start
src/transformers/src/transformers/tokenization_utils_base.py:974
↓ 21 callersFunctioncreate_tmp_repo
Creates a repository in a temporary directory mimicking the structure of Transformers. Uses the list of models provided (which defaults to ju
src/transformers/tests/repo_utils/test_tests_fetcher.py:86
↓ 21 callersFunctionis_deepspeed_zero3_enabled
()
src/transformers/src/transformers/integrations/deepspeed.py:256
↓ 21 callersFunctionis_offline_mode
()
src/transformers/src/transformers/utils/hub.py:78
↓ 21 callersFunctionis_safetensors_available
()
src/transformers/src/transformers/utils/import_utils.py:685
↓ 21 callersFunctionis_torch_tensor
Tests if `x` is a torch tensor or not. Safe to call even if torch is not installed.
src/transformers/src/transformers/utils/generic.py:151
↓ 21 callersMethodnum_special_tokens_to_add
Returns the number of added tokens when encoding a sequence with special tokens. <Tip> This encodes a dummy input and check
src/transformers/src/transformers/tokenization_utils.py:518
↓ 21 callersFunctiontransform
Transform pixel location to different reference.
src/utils/image_ops.py:85
↓ 20 callersMethodadd
(number, extra=0)
src/transformers/tests/pipelines/test_pipelines_common.py:344
↓ 20 callersMethodcheck_model_type
Check if the model class is in supported by the pipeline. Args: supported_models (`List[str]` or `dict`):
src/transformers/src/transformers/pipelines/base.py:962
↓ 20 callersFunctiondefault_data_collator
Very simple data collator that simply collates batches of dict-like objects and performs special handling for potential keys named:
src/transformers/src/transformers/data/data_collator.py:52
↓ 20 callersMethodfrom_pretrained
(cls, retriever_name_or_path, actor_handles, indexed_dataset=None, **kwargs)
src/transformers/examples/research_projects/rag-end2end-retriever/distributed_ray_retriever.py:149
↓ 20 callersFunctionimage_segmenter
(image, prompt)
src/transformers/src/transformers/tools/evaluate_agent.py:82
↓ 20 callersFunctionquestion_answerer
(text, question)
src/transformers/src/transformers/tools/evaluate_agent.py:56
↓ 20 callersFunctionrequire_version_core
require_version wrapper which emits a core-specific hint on failure
src/transformers/src/transformers/utils/versions.py:114
↓ 20 callersMethodresolve
src/bitsandbytes/include/Algo-Direct2.h:56
↓ 20 callersMethodto_numpy_array
Converts `image` to a numpy array. Optionally rescales it and puts the channel dimension as the first dimension. Args:
src/transformers/src/transformers/image_utils.py:387
↓ 19 callersFunctionget_initializer
Creates a `tf.keras.initializers.TruncatedNormal` with the given range. Args: initializer_range (*float*, defaults to 0.02): Standar
src/transformers/src/transformers/modeling_tf_utils.py:3448
↓ 19 callersMethodget_input_embeddings
(self)
src/transformers/examples/research_projects/deebert/src/modeling_highway_bert.py:123
↓ 19 callersFunctionis_tensorboard_available
()
src/transformers/src/transformers/integrations/integration_utils.py:97
↓ 19 callersFunctionload_tool
Main function to quickly load a tool, be it on the Hub or in the Transformers library. Args: task_or_repo_id (`str`): Th
src/transformers/src/transformers/tools/base.py:643
↓ 19 callersFunctionpost_call
(prev_device)
src/bitsandbytes/bitsandbytes/functional.py:467
↓ 19 callersFunctionpre_call
(device)
src/bitsandbytes/bitsandbytes/functional.py:461
↓ 19 callersFunctionreplace_default_in_arg_description
Catches the default value in the description of an argument inside a docstring and replaces it by the value passed. Args: descriptio
src/transformers/utils/check_docstrings.py:890
↓ 19 callersFunctionwindow_function
Returns an array containing the specified window. This window is intended to be used with `stft`. The following window types are supported:
src/transformers/src/transformers/audio_utils.py:220
↓ 18 callersFunctionbackend_device_count
(device: str)
src/transformers/src/transformers/testing_utils.py:2292
↓ 18 callersMethodcheck_results_dict_not_empty
(self, results)
src/transformers/tests/benchmark/test_benchmark_tf.py:32
↓ 18 callersFunctionclassifier
(text, labels)
src/transformers/src/transformers/tools/evaluate_agent.py:22
↓ 18 callersFunctionexecute_subprocess_async
(cmd, env=None, stdin=None, timeout=180, quiet=False, echo=True)
src/transformers/src/transformers/testing_utils.py:1864
↓ 18 callersFunctionget_cls_net_gridfeat
(config, pretrained, **kwargs)
src/modeling/hrnet/hrnet_cls_net_gridfeat.py:521
↓ 18 callersFunctionget_logger
Return a logger with the specified name. This function is not supposed to be directly accessed unless you are writing a custom transformers
src/transformers/src/transformers/utils/logging.py:148
↓ 18 callersFunctionget_scheduler
Unified API to get any scheduler from its name. Args: name (`str` or `SchedulerType`): The name of the scheduler to use.
src/transformers/src/transformers/optimization.py:335
↓ 18 callersMethoditems
(self)
src/transformers/src/transformers/tokenization_utils_base.py:286
↓ 18 callersMethodsequence_ids
Return a list mapping the tokens to the id of their original sentences: - `None` for special tokens added around or between sequ
src/transformers/src/transformers/tokenization_utils_base.py:319
↓ 18 callersFunctionspectrogram
Calculates a spectrogram over one waveform using the Short-Time Fourier Transform. This function can create the following kinds of spectrogr
src/transformers/src/transformers/audio_utils.py:284
↓ 18 callersMethodword_to_tokens
Get the encoded token span corresponding to a word in a sequence of the batch. Token spans are returned as a [`~tokenization_utils_b
src/transformers/src/transformers/tokenization_utils_base.py:463
↓ 17 callersMethod_get_uniform_logits
(self, batch_size: int, length: int)
src/transformers/tests/generation/test_tf_logits_process.py:52
↓ 17 callersMethodadd
Add a new hypothesis to the list.
src/transformers/src/transformers/generation/beam_search.py:954
↓ 17 callersMethodapply_gradients
(self, features, labels, nb_instances_in_global_batch)
src/transformers/src/transformers/trainer_tf.py:651
↓ 17 callersMethodget_config_dict
(self, stage)
src/transformers/tests/deepspeed/test_deepspeed.py:271
↓ 17 callersMethodget_lr
(self)
src/transformers/src/transformers/optimization.py:763
↓ 17 callersFunctioninfer_channel_dimension_format
Infers the channel dimension format of `image`. Args: image (`np.ndarray`): The image to infer the channel dimension of.
src/transformers/src/transformers/image_utils.py:160
↓ 17 callersFunctionis_peft_available
()
src/transformers/src/transformers/utils/import_utils.py:398
↓ 17 callersMethodtranspose_for_scores
(self, x)
src/transformers/examples/research_projects/movement-pruning/emmental/modeling_bert_masked.py:116
↓ 17 callersMethodword_to_chars
Get the character span in the original string corresponding to given word in a sequence of the batch. Character spans are returned a
src/transformers/src/transformers/tokenization_utils_base.py:596
↓ 16 callersFunctionevaluate
Evaluate a python expression using the content of the variables stored in a state and only evaluating a given set of functions. This fun
src/transformers/src/transformers/tools/python_interpreter.py:32
← previousnext →101–200 of 11,352, ranked by callers