MCPcopy Create free account

hub / github.com/JinYuanLi0012/PGIM / functions

Functions413 in github.com/JinYuanLi0012/PGIM

↓ 1 callersMethod_dump_to_jsonline
(self)
adaseq/data/dataset_dumpers/named_entity_recognition_dataset_dumper.py:77
↓ 1 callersMethod_forward
(self, tokens: Dict[str, Any])
adaseq/models/global_pointer_model.py:122
↓ 1 callersMethod_forward
(self, tokens: Dict[str, Any], mention_boundary: torch.LongTensor)
adaseq/models/multilabel_typing_model.py:123
↓ 1 callersMethod_forward
(self, tokens: Dict[str, Any])
adaseq/models/multilabel_typing_model.py:274
↓ 1 callersMethod_forward
(self, tokens: Dict[str, Any])
adaseq/models/multilabel_typing_model.py:432
↓ 1 callersMethod_forward_embedder
(self, tokens: Dict[str, Any])
adaseq/models/twostage_ner_model.py:119
↓ 1 callersMethod_forward_two_stage_ner
( # noqa: D102 self, tokens: Dict[str, Any], meta: Optional[Dict[str, Any]] = None,
adaseq/models/pretraining_model.py:133
↓ 1 callersMethod_forward_zero_shot_ner
( # noqa: D102 self, tokens: Dict[str, Any], prompt_input_ids: torch.Tensor,
adaseq/models/pretraining_model.py:178
↓ 1 callersMethod_gen_label2id
(labels: List[str])
adaseq/data/preprocessors/relation_extraction_preprocessor.py:33
↓ 1 callersMethod_gen_label_to_id_with_bio
(labels: List[str], tag_scheme: str = 'BIOES')
adaseq/data/preprocessors/sequence_labeling_preprocessor.py:67
↓ 1 callersMethod_generate_mentions_labels
(self, data: Union[str, List, Dict], output: Dict[str, Any])
adaseq/data/preprocessors/twostage_preprocessor.py:55
↓ 1 callersMethod_infer_embedding_dim
Infer embedding dimension from embedding file Args: embedding_file (str): local embedding file path Returns:
adaseq/modules/embedders/embedding.py:135
↓ 1 callersMethod_is_valid_tag_scheme
(tag_scheme: str)
adaseq/data/preprocessors/sequence_labeling_preprocessor.py:53
↓ 1 callersMethod_load_cluener_file
(cls, filepath, corpus_config)
adaseq/data/dataset_builders/named_entity_recognition_dataset_builder.py:203
↓ 1 callersMethod_load_conll_file
(cls, file_path, corpus_config: Dict)
adaseq/data/dataset_builders/named_entity_recognition_dataset_builder.py:107
↓ 1 callersMethod_load_json_spans_file
(cls, filepath, corpus_config)
adaseq/data/dataset_builders/named_entity_recognition_dataset_builder.py:165
↓ 1 callersMethod_load_json_tags_file
(cls, filepath, corpus_config)
adaseq/data/dataset_builders/named_entity_recognition_dataset_builder.py:137
↓ 1 callersMethod_load_vocab
Load from vocab file Args: vocab_file (str): vocab file to be loaded Returns: word2id (Dict[str, int]): a di
adaseq/modules/embedders/embedding.py:114
↓ 1 callersMethod_span_label_loss
(self, typing_logits, typing_target, typing_mask)
adaseq/models/twostage_ner_model.py:200
↓ 1 callersMethod_spans_to_bio_labels
(spans: List[Dict], length: int, tag_scheme: str = 'BIOES')
adaseq/data/preprocessors/sequence_labeling_preprocessor.py:78
↓ 1 callersMethod_token2span_encode
(self, tokens: Dict[str, Any])
adaseq/models/multilabel_typing_model.py:283
↓ 1 callersMethod_token2span_encode
(self, tokens: Dict[str, Any])
adaseq/models/multilabel_typing_model.py:438
↓ 1 callersMethod_viterbi_decode
( self, emissions: torch.FloatTensor, mask: torch.ByteTensor, pad_tag: Optional[int] = None )
adaseq/modules/decoders/crf.py:341
↓ 1 callersMethod_viterbi_decode
( self, emissions: torch.FloatTensor, mask: torch.ByteTensor, pad_tag: Optional[int] = None )
adaseq/modules/decoders/crf.py:856
↓ 1 callersMethod_viterbi_decode_nbest
( self, emissions: torch.FloatTensor, mask: torch.ByteTensor, nbest: int,
adaseq/modules/decoders/crf.py:398
↓ 1 callersMethod_viterbi_decode_nbest
( self, emissions: torch.FloatTensor, mask: torch.ByteTensor, nbest: int,
adaseq/modules/decoders/crf.py:939
↓ 1 callersMethodadd_constraint_for_iob
(self)
adaseq/modules/decoders/crf.py:636
↓ 1 callersMethodadd_constraint_for_iobes
(self)
adaseq/modules/decoders/crf.py:601
↓ 1 callersMethodapply_threshold
TODO
adaseq/metrics/typing_metric.py:222
↓ 1 callersFunctionapply_transform
Apply a given function to reformat a `Dataset`.
adaseq/data/dataset_manager.py:239
↓ 1 callersFunctionbatched_index_select
The given `indices` of size `(batch_size, d_1, ..., d_n)` indexes into the sequence dimension (dimension 2) of the target, which has size `(b
adaseq/modules/util.py:107
↓ 1 callersMethodbio2span
label sequence to span format
adaseq/models/twostage_ner_model.py:218
↓ 1 callersFunctionbuild_decoder
Build decoder from config dict Args: cfg (:obj:`ConfigDict`): config dict for decoder object default_args (dict): default initial
adaseq/modules/decoders/base.py:17
↓ 1 callersFunctionbuild_embedder
Build embedder from config dict Args: cfg (:obj:`ConfigDict`): config dict for embedder object default_args (dict): default initi
adaseq/modules/embedders/base.py:14
↓ 1 callersFunctionbuild_encoder
Build encoder from config dict Args: cfg (:obj:`ConfigDict`): config dict for encoder object default_args (dict): default initial
adaseq/modules/encoders/base.py:12
↓ 1 callersFunctionbuild_lr_scheduler
Build lr scheduler, `constant` by default.
adaseq/training/lr_scheduler.py:12
↓ 1 callersFunctionbuild_optimizer
Build optimizer from config
adaseq/training/optimizer.py:16
↓ 1 callersFunctionbuild_pretrainer_from_partial_objects
Entrypoint of build the trainer from `config` by modelscope. In this method, we will build the `DatasetManager` first, then use the count
adaseq/commands/pretrain.py:77
↓ 1 callersFunctionbuild_trainer_from_partial_objects
Entrypoint of build the trainer from `config` by modelscope. In this method, we will build the `DatasetManager` first, then use the count
adaseq/commands/train.py:169
↓ 1 callersMethodclassify
(self, logits, mention_mask)
adaseq/models/multilabel_typing_model.py:158
↓ 1 callersMethodclassify
(self, logits)
adaseq/models/multilabel_typing_model.py:291
↓ 1 callersMethodclassify
(self, logits, meta)
adaseq/models/multilabel_typing_model.py:451
↓ 1 callersFunctioncompute_f1
Compute f1 from predictions and ground truth Args: preds (List[str]): prediction list labels (List[str]): ground truth list
adaseq/metrics/relation_extraction_metric.py:12
↓ 1 callersFunctionconvert2span
convert label sequence to span
adaseq/models/utils.py:27
↓ 1 callersMethoddecode
( # noqa: D102 self, logits: torch.Tensor, mask: torch.Tensor )
adaseq/models/sequence_labeling_model.py:213
↓ 1 callersMethoddecode
(self, entity_scores: torch.Tensor)
adaseq/models/global_pointer_model.py:214
↓ 1 callersMethoddecode
(self, logits)
adaseq/models/relation_extraction_model.py:117
↓ 1 callersMethoddecode
:param span_scores: (b, t, t, c) :param mask: (b, t) :return:
adaseq/models/biaffine_ner_model.py:122
↓ 1 callersMethodencode_text
encode `text` to ids
adaseq/data/preprocessors/nlp_preprocessor.py:120
↓ 1 callersMethodencode_tokens_origin_view
encode tokens when using retrieval-augmented multi-view model.
adaseq/data/preprocessors/nlp_preprocessor.py:209
↓ 1 callersMethodencode_tokens_word2vec
Convert tokens to ids, one by one via vocab, no word pieces.
adaseq/data/preprocessors/nlp_preprocessor.py:139
↓ 1 callersMethodencode_tokens_wordpiece
Convert tokens to ids by word piece tokenizer.
adaseq/data/preprocessors/nlp_preprocessor.py:147
↓ 1 callersMethodexpand_vocab
TODO
adaseq/models/multilabel_typing_model.py:378
↓ 1 callersFunctionfix_tag_sequence_error
fix label sequence errors
adaseq/models/utils.py:56
↓ 1 callersFunctionflatten_and_batch_shift_indices
This is a subroutine for [`batched_index_select`](./util.md#batched_index_select). The given `indices` of size `(batch_size, d_1, ..., d_n)`
adaseq/modules/util.py:165
↓ 1 callersMethodfrom_config
Build embedder instance from config
adaseq/modules/embedders/base.py:39
↓ 1 callersFunctionget_label_emb
produce label embeddings
adaseq/modules/decoders/pairwise_crf.py:116
↓ 1 callersMethodget_label_emb
TODO
adaseq/models/multilabel_typing_model.py:392
↓ 1 callersFunctionget_member_set
Get member names set.
adaseq/metainfo.py:4
↓ 1 callersFunctionget_or_download_model_dir
get model cache dir
adaseq/utils/hub_utils.py:8
↓ 1 callersFunctionget_transformer
Returns a transformer model and a flag of whether comes from huggingface. # Parameters model_name_or_path : `str` The name of t
adaseq/modules/embedders/transformer_embedder.py:298
↓ 1 callersMethodload_from_pretrained
load pretrained model
adaseq/models/twostage_ner_model.py:94
↓ 1 callersFunctionmain
(prog: Optional[str] = None)
adaseq/commands/__init__.py:25
↓ 1 callersFunctionmake_glove_embed
Utils function to obtain glove embedding
adaseq/modules/decoders/pairwise_crf.py:16
↓ 1 callersFunctionmake_parameter_groups
Takes a list of model parameters with associated names (typically coming from something like `model.named_parameters()`), along with a groupi
adaseq/training/optimizer.py:37
↓ 1 callersFunctionmake_tencent_embed
Utils function to obtain tencent zh embedding
adaseq/modules/decoders/pairwise_crf.py:62
↓ 1 callersMethodmultilabel_categorical_crossentropy
Multi-label cross entropy loss. https://kexue.fm/archives/7359
adaseq/models/global_pointer_model.py:197
↓ 1 callersMethodpadding
pad other fields.
adaseq/data/data_collators/base.py:104
↓ 1 callersMethodpadding_token
pad token related fields (hf.transformers style)
adaseq/data/data_collators/base.py:59
↓ 1 callersFunctionparse_args
( # noqa: D103 prog: Optional[str] = None, )
adaseq/commands/__init__.py:10
↓ 1 callersMethodpartial_binary_cross_entropy
(self, input, target)
adaseq/modules/losses.py:76
↓ 1 callersMethodpost_init
Run something after __init__ in subclass All derived model instances will try to load checkpoint from model_dir after __init__. Usefu
adaseq/models/base.py:43
↓ 1 callersMethodpostprocess
( # noqa: D102 self, inputs: Dict[str, Any], **postprocess_params )
adaseq/pipelines/base.py:49
↓ 1 callersFunctionprepare_global_logging
Prepare global logging.
adaseq/utils/logging.py:67
↓ 1 callersFunctionread_yaml
read and parse yaml file :param str file_path: path to file :param dict cfg: configuration variables (environ and .env) :param bool stric
adaseq/utils/yaml.py:18
↓ 1 callersMethodreset_parameters
Initialize the transition parameters. The parameters will be initialized randomly from a uniform distribution between -0.1 and 0.1.
adaseq/modules/decoders/crf.py:48
↓ 1 callersMethodreset_parameters
Initialize the transition parameters. The parameters will be initialized randomly from a uniform distribution between -0.1 and 0.1.
adaseq/modules/decoders/crf.py:586
↓ 1 callersMethodresult
(self)
adaseq/metrics/pretraining_metric.py:35
↓ 1 callersFunctionrun
Command line main interface
adaseq/main.py:9
↓ 1 callersFunctionsuppress_modelscope_ast_warning
()
adaseq/ms_patch.py:6
↓ 1 callersMethodtensorize
convert all possible fields to tensor.
adaseq/data/batch.py:37
↓ 1 callersFunctiontest_model
Train a model from config file. You can mannualy call this function in a python script for debugging.
adaseq/commands/test.py:54
↓ 1 callersMethodto_task_dataset
Override this func to build task dataset from only `datasets.Dataset`.
adaseq/training/default_trainer.py:118
↓ 1 callersFunctiontrain_model
Train a model from config file or dict. You can manually call this function in a python script for debugging.
adaseq/commands/train.py:98
↓ 1 callersMethodtune_threshold
TODO
adaseq/metrics/typing_metric.py:172
↓ 1 callersMethodupdate
(self, batch_gold_entities, batch_pred_entities)
adaseq/metrics/pretraining_metric.py:26
↓ 1 callersFunctionviterbi_decode_inner_loop1
(score, history_idx, emissions, transitions, mask, oor_idx)
adaseq/modules/decoders/crf.py:497
↓ 1 callersFunctionviterbi_decode_inner_loop2
(mask, history_idx, best_tags, best_tags_arr)
adaseq/modules/decoders/crf.py:530
Method__call__
(self, y_pred, y_true)
adaseq/modules/losses.py:15
Method__call__
(self, y_pred, y_true)
adaseq/modules/losses.py:36
Method__call__
pad list of instances to batch
adaseq/data/data_collators/base.py:131
Method__call__
prepare inputs for Pretraining model
adaseq/data/preprocessors/pretraining_preprocessor.py:45
Method__call__
prepare inputs for two-stage-ner model
adaseq/data/preprocessors/twostage_preprocessor.py:43
Method__call__
prepare inputs for Sequence Labeling models.
adaseq/data/preprocessors/sequence_labeling_preprocessor.py:40
Method__call__
prepare inputs for span-based model.
adaseq/data/preprocessors/span_extraction_preprocessor.py:22
Method__call__
Encode one instance, it could be a text str, a list of tokens for a dict. Returns: Dict[str, Any]: `{'tokens': tokenized
adaseq/data/preprocessors/nlp_preprocessor.py:86
Method__call__
prepare inputs for Entity Typing model
adaseq/data/preprocessors/multilabel_typing_preprocessor.py:27
Method__call__
(self, data: Dict)
adaseq/data/preprocessors/multilabel_typing_preprocessor.py:67
Method__call__
(self, data: Dict)
adaseq/data/preprocessors/multilabel_typing_preprocessor.py:126
Method__call__
prepare inputs for Relation Extraction model.
adaseq/data/preprocessors/relation_extraction_preprocessor.py:23
← previousnext →101–200 of 413, ranked by callers