MCPcopy Create free account

hub / github.com/JeremySun1224/CCFBDCI2020 / functions

Functions7,969 in github.com/JeremySun1224/CCFBDCI2020

↓ 4 callersFunctionbuild_mask
Builds the mask. The attention mechanism will only attend to positions with value 1.
transformers/examples/seq2seq/bertabs/utils_summarization.py:121
↓ 4 callersFunctioncalculate_bleu
Uses sacrebleu's corpus_bleu implementation.
transformers/examples/seq2seq/utils.py:61
↓ 4 callersMethodcheck_best_model_has_been_loaded
( self, output_dir, freq, total, trainer, metric, greater_is_better=False, is_pretrained=True )
transformers/tests/test_trainer.py:215
↓ 4 callersFunctioncheck_slow_torch_cuda
()
transformers/tests/test_skip_decorators.py:55
↓ 4 callersFunctioncompute_relative_buckets
This function computes individual parts of the relative position buckets. For more detail, see paper.
transformers/src/transformers/modeling_prophetnet.py:172
↓ 4 callersMethodconvert_batch_encode_plus_format_to_encode_plus
(batch_encode_plus_sequences)
transformers/tests/test_tokenization_common.py:163
↓ 4 callersFunctionconvert_tf_checkpoint_to_pytorch
(tf_checkpoint_path, config_file, pytorch_dump_path)
transformers/src/transformers/convert_funnel_original_tf_checkpoint_to_pytorch.py:29
↓ 4 callersFunctioncopy_layers
(src_layers: nn.ModuleList, dest_layers: nn.ModuleList, layers_to_copy: List[int])
transformers/examples/seq2seq/make_student.py:15
↓ 4 callersMethodcount_file
(self, path, verbose=False, add_eos=False)
transformers/src/transformers/tokenization_transfo_xl.py:255
↓ 4 callersMethodcreate_token_type_ids_from_sequences
Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence pair mask has the foll
transformers/templates/adding_a_new_model/tokenization_xxx.py:248
↓ 4 callersMethoddetokenize
Detokenize the provided tokens ids to readable text: - **tokens_ids**: List of tokens ids - **skip_special_tokens**: Flag indicating
transformers/src/transformers/commands/serving.py:183
↓ 4 callersFunctionevaluate
(args, model, tokenizer, prefix="", output_layer=-1, eval_highway=False)
transformers/examples/deebert/run_glue_deebert.py:237
↓ 4 callersFunctionevaluate
(eval_iter)
transformers/examples/contrib/run_transfo_xl.py:100
↓ 4 callersFunctionexecute_subprocess_async
(cmd, env=None, stdin=None, timeout=180, quiet=False, echo=True)
transformers/src/transformers/testing_utils.py:937
↓ 4 callersMethodfrom_encoder_decoder_configs
r""" Instantiate a :class:`~transformers.EncoderDecoderConfig` (or a derived class) from a pre-trained encoder model configuration and
transformers/src/transformers/configuration_encoder_decoder.py:91
↓ 4 callersFunctiongeneric_train
( model: BaseTransformer, args: argparse.Namespace, early_stopping_callback=None, logger=True,
transformers/examples/lightning_base.py:347
↓ 4 callersMethodget_bart_tokenizer
(self)
transformers/tests/test_retrieval_rag.py:100
↓ 4 callersMethodget_dev_examples
See base class.
transformers/examples/multiple-choice/utils_multiple_choice.py:425
↓ 4 callersMethodget_doc_dicts
Returns a list of dictionaries, containing titles and text of the retrieved documents. Args: doc_ids (:obj:`np.ndarray`
transformers/src/transformers/retrieval_rag.py:56
↓ 4 callersMethodget_dpr_tokenizer
(self)
transformers/tests/test_retrieval_rag.py:97
↓ 4 callersMethodget_dummy_custom_hf_index_retriever
(self, from_disk: bool)
transformers/tests/test_retrieval_rag.py:134
↓ 4 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
transformers/src/transformers/testing_utils.py:642
↓ 4 callersMethodget_examples_from_dataset
Creates a list of :class:`~transformers.data.processors.squad.SquadExample` using a TFDS dataset. Args: dataset: The tfd
transformers/src/transformers/data/processors/squad.py:561
↓ 4 callersMethodget_input_embeddings
(self)
transformers/src/transformers/modeling_mobilebert.py:826
↓ 4 callersMethodget_rag_config
(self)
transformers/tests/test_modeling_rag.py:606
↓ 4 callersMethodget_rust_tokenizer
(self, **kwargs)
transformers/tests/test_tokenization_common.py:151
↓ 4 callersMethodget_train_examples
See base class.
transformers/examples/multiple-choice/utils_multiple_choice.py:420
↓ 4 callersFunctionget_wanted_result
(result)
transformers/examples/deebert/run_glue_deebert.py:56
↓ 4 callersMethodgroup_sub_entities
Group together the adjacent tokens with the same entity predicted. Args: entities (:obj:`dict`): The entities predicted
transformers/src/transformers/pipelines.py:1516
↓ 4 callersMethodinit_retrieval
Retriever initialization function, needs to be called from the training process. The function sets some common parameters and environ
transformers/examples/rag/distributed_retriever.py:46
↓ 4 callersFunctioninvert_mask
Turns 1->0, 0->1, False->True, True-> False
transformers/src/transformers/modeling_bart.py:154
↓ 4 callersFunctioninvert_mask
Turns 1->0, 0->1, False->True, True-> False
transformers/src/transformers/modeling_fsmt.py:280
↓ 4 callersFunctionis_comet_available
()
transformers/src/transformers/integrations.py:91
↓ 4 callersMethodis_done
If there are enough hypotheses and that none of the hypotheses being generated can become better than the worst one in the heap, then
transformers/src/transformers/generation_tf_utils.py:1096
↓ 4 callersFunctionis_tokenizers_available
()
transformers/src/transformers/file_utils.py:270
↓ 4 callersFunctionis_wandb_available
()
transformers/src/transformers/integrations.py:87
↓ 4 callersMethodload_from_json
Create an instance from the content of :obj:`json_path`.
transformers/src/transformers/trainer_callback.py:99
↓ 4 callersMethodlogin
Call HF API to sign in a user and get a token if credentials are valid. Outputs: token if credentials are valid Throws: req
transformers/src/transformers/hf_api.py:103
↓ 4 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
transformers/src/transformers/data/metrics/squad_metrics.py:25
↓ 4 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
transformers/examples/rag/utils.py:181
↓ 4 callersFunctionparse_flag_from_env
(key, default=False)
transformers/src/transformers/testing_utils.py:32
↓ 4 callersFunctionpickle_save
pickle.dump(obj, path)
transformers/examples/seq2seq/utils.py:433
↓ 4 callersMethodpool_tensor
Apply 1D pooling to a tensor of size [B x T (x H)].
transformers/src/transformers/modeling_funnel.py:349
↓ 4 callersMethodpool_tensor
Apply 1D pooling to a tensor of size [B x T (x H)].
transformers/src/transformers/modeling_tf_funnel.py:343
↓ 4 callersMethodpost_attention
Post-attention processing.
transformers/src/transformers/modeling_xlnet.py:321
↓ 4 callersFunctionprepare_bart_inputs_dict
( config, input_ids, attention_mask=None, )
transformers/tests/test_modeling_bart.py:118
↓ 4 callersMethodprepare_config_and_inputs
(self)
transformers/tests/test_modeling_layoutlm.py:84
↓ 4 callersMethodprepare_config_and_inputs
(self)
transformers/tests/test_modeling_bart.py:85
↓ 4 callersMethodprepare_config_and_inputs
(self)
transformers/tests/test_modeling_tf_openai.py:66
↓ 4 callersMethodprepare_config_and_inputs
(self)
transformers/tests/test_modeling_bert_generation.py:70
↓ 4 callersMethodprepare_config_and_inputs_for_decoder
(self)
transformers/tests/test_modeling_roberta.py:111
↓ 4 callersMethodprepare_config_and_inputs_for_decoder
(self)
transformers/tests/test_modeling_bert_generation.py:97
↓ 4 callersMethodprepare_inputs_for_generation
Implement in subclasses of :class:`~transformers.PreTrainedModel` for custom behavior to prepare inputs in the generate method.
transformers/src/transformers/generation_utils.py:46
↓ 4 callersMethodprint_results
(self, result_dict, type_label)
transformers/src/transformers/benchmark/benchmark_utils.py:827
↓ 4 callersFunctionprocess_story
Extract the story and summary from a story file. Arguments: raw_story (str): content of the story file as an utf-8 encoded string. R
transformers/examples/seq2seq/bertabs/utils_summarization.py:62
↓ 4 callersFunctionreissue_pt_warnings
(caught_warnings)
transformers/src/transformers/trainer_pt_utils.py:151
↓ 4 callersMethodrel_attn_core
Core relative positional attention operations.
transformers/src/transformers/modeling_xlnet.py:269
↓ 4 callersMethodrel_attn_core
Core relative positional attention operations.
transformers/src/transformers/modeling_tf_xlnet.py:131
↓ 4 callersFunctionrequires_flax
(obj)
transformers/src/transformers/file_utils.py:402
↓ 4 callersMethodreset
Resets the accumulated gradients on the current replica.
transformers/src/transformers/optimization_tf.py:344
↓ 4 callersMethodresize_num_qa_labels
Build a resized question answering linear layer Module from a provided new linear layer. Increasing the size will add newly initializ
transformers/src/transformers/modeling_lxmert.py:1074
↓ 4 callersFunctionsave_json
(content, path, indent=4, **json_dump_kwargs)
transformers/examples/rag/utils.py:149
↓ 4 callersMethodsave_to_csv
(self, result_dict, filename)
transformers/src/transformers/benchmark/benchmark_utils.py:873
↓ 4 callersFunctionseparate_process_wrapper_fn
This function wraps another function into its own separated process. In order to ensure accurate memory measurements it is important that the
transformers/src/transformers/benchmark/benchmark_utils.py:64
↓ 4 callersMethodset_early_exit_entropy
(self, x)
transformers/examples/deebert/src/modeling_highway_bert.py:34
↓ 4 callersMethodset_embed_tokens
(self, embed_tokens)
transformers/src/transformers/modeling_tf_t5.py:544
↓ 4 callersMethodset_input_embeddings
(self, new_embeddings)
transformers/src/transformers/modeling_t5.py:674
↓ 4 callersMethodset_retriever
(self, retriever: RagRetriever)
transformers/src/transformers/modeling_rag.py:1013
↓ 4 callersFunctionset_seed
Helper function for reproducible behavior to set the seed in ``random``, ``numpy``, ``torch`` and/or ``tf`` (if installed). Args:
transformers/src/transformers/trainer_utils.py:29
↓ 4 callersFunctionset_seed
(args)
transformers/examples/movement-pruning/masked_run_glue.py:62
↓ 4 callersMethodset_seed
(self)
transformers/tests/test_modeling_tf_xlnet.py:131
↓ 4 callersMethodto_dict
Serializes this instance to a Python dictionary. Returns: :obj:`Dict[str, Any]`: Dictionary of all the attributes that m
transformers/src/transformers/configuration_utils.py:508
↓ 4 callersMethodto_json_file
Save this instance to a json file.
transformers/src/transformers/modelcard.py:217
↓ 4 callersMethodtokenize
Converts a string in a sequence of tokens, using the tokenizer. Note that, unlike Fast tokenizers (instances of PreTrainedTokenizerF
transformers/src/transformers/tokenization_utils.py:230
↓ 4 callersFunctiontrim_batch
Remove columns that are populated exclusively by pad_token_id
transformers/examples/seq2seq/utils.py:95
↓ 4 callersFunctiontruncate_or_pad
Adapt the source and target sequences' lengths to the block size. If the sequence is shorter we append padding token to the right of the sequence.
transformers/examples/seq2seq/bertabs/utils_summarization.py:110
↓ 4 callersFunctionuse_task_specific_params
(model, task)
transformers/tests/test_modeling_t5.py:543
↓ 4 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
transformers/src/transformers/tokenization_bert.py:108
↓ 3 callersMethod__call__
(self, *args, **kwargs)
transformers/src/transformers/pipelines.py:634
↓ 3 callersMethod__getstate__
(self)
transformers/src/transformers/tokenization_t5.py:216
↓ 3 callersMethod__init__
(self, config)
transformers/src/transformers/modeling_ctrl.py:321
↓ 3 callersMethod__init__
(self, nf, nx, initializer_range=0.02, **kwargs)
transformers/src/transformers/modeling_tf_utils.py:778
↓ 3 callersMethod__init__
(self, config)
transformers/src/transformers/modeling_bert_generation.py:273
↓ 3 callersMethod__init__
(self, vector_size, index_path)
transformers/src/transformers/retrieval_rag.py:114
↓ 3 callersMethod__init__
(self, thresh=0.25)
transformers/tests/test_trainer.py:93
↓ 3 callersMethod__init__
(self, config)
transformers/examples/deebert/src/modeling_highway_bert.py:249
↓ 3 callersMethod_assert_generated_batch_equal_expected
(self, **tokenizer_kwargs)
transformers/tests/test_modeling_tf_marian.py:125
↓ 3 callersMethod_chunk_tensor
(self, t: Iterable, chunk_size: int)
transformers/src/transformers/retrieval_rag.py:515
↓ 3 callersFunction_config_zero_init
(config)
transformers/tests/test_modeling_common.py:52
↓ 3 callersMethod_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
transformers/src/transformers/tokenization_t5.py:242
↓ 3 callersMethod_create_and_check_torchscript
(self, config, inputs_dict)
transformers/tests/test_modeling_common.py:374
↓ 3 callersMethod_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:203
↓ 3 callersMethod_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:249
↓ 3 callersMethod_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:311
↓ 3 callersMethod_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:358
↓ 3 callersMethod_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:404
↓ 3 callersMethod_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:502
↓ 3 callersMethod_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:548
↓ 3 callersMethod_create_examples
Creates examples for the training, dev and test sets.
transformers/src/transformers/data/processors/glue.py:594
↓ 3 callersMethod_create_examples
Creates examples for the training and dev sets.
transformers/examples/multiple-choice/utils_multiple_choice.py:297
← previousnext →401–500 of 7,969, ranked by callers