MCPcopy Create free account

hub / github.com/PaddlePaddle/Knover / functions

Functions590 in github.com/PaddlePaddle/Knover

↓ 2 callersFunctionflatten_ds
Flatten dialogue state from dict to sequence. Args: ds_dict (dict): The dialogue state dict. add_nm (bool, optional): If True, ad
projects/DSTC10-Track2/task1/utils.py:72
↓ 2 callersMethodforward
Run model main forward. Args: inputs: A dict mapping keys to corresponding input data. Returns: outputs: A d
knover/core/model.py:413
↓ 2 callersFunctiongen_cache
(x, d_key, d_value, n_head, topo=None)
knover/modules/transformer_block.py:47
↓ 2 callersFunctiongenerate
Generation from sequence to sequence.
projects/AG-DST/infer_dst.py:166
↓ 2 callersFunctiongenerate
Call Q-TOD model generation.
projects/QKConv/infer.py:94
↓ 2 callersFunctiongenerate
Call Q-TOD model generation.
projects/Q-TOD/infer.py:184
↓ 2 callersFunctionget_chosen_title_and_sent
Return a nicely extracted title and chosen sentence. :return: pair (title, sentence)
projects/PLATO-KAG/wow/build_selection_infer_data.py:52
↓ 2 callersFunctionget_ds_delta
Get the delta of dialogue state from previous turn to current turn. Args: prev_ds_dict (dict): The previous turn dialogue state.
projects/DSTC10-Track2/task1/utils.py:555
↓ 2 callersFunctionget_logger
Setup logger. Args: name (str): Logging name. level (int, optional): Logging level. Defaults to 10. Returns: logging
projects/DSTC10-Track2/task1/utils.py:49
↓ 2 callersMethodinfer_step
(self, model, inputs)
knover/tasks/dialog_generation.py:93
↓ 2 callersMethodinference
Run inference. Args: model: A generation model. Need to implement `_generation_network` and `_calc_logits`.
knover/modules/generator.py:108
↓ 2 callersMethodload
Load persistables or parameters. Args: model_path: The path of initial model. is_checkpoint: If true, load parameters
knover/core/model.py:292
↓ 2 callersFunctionload_vocab
Loads a vocabulary file into a dictionary.
knover/utils/tokenization.py:74
↓ 2 callersMethodmerge_metrics_and_statistics
Merge metrics and statistics.
knover/core/task.py:53
↓ 2 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
projects/PLATO-KAG/tools/generation_metrics.py:38
↓ 2 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
projects/PLATO-KAG/holle/eval_multi_ref_generation.py:42
↓ 2 callersMethodnormalize_retrieve_scores
Normalize retrieve scores Returns: list: Retrieval scores after normalization
projects/QKConv/utils/base_dataset.py:76
↓ 2 callersFunctionnormalize_slot_val
Normalize slot values.
projects/AG-DST/evaluate_dst.py:142
↓ 2 callersFunctionnormalize_val
(val)
projects/AG-DST/evaluate_dst.py:144
↓ 2 callersFunctionpost_process_response
Post-process the decoded sequence. Truncate from the first <eos> and remove the <bos> and <eos> tokens. Convert token_ids to words(merge=True
knover/tasks/dialog_generation.py:327
↓ 2 callersMethodpreprocess_text
Preprocess utterance or table value. Returns: str: A processed text.
projects/QKConv/utils/base_dataset.py:68
↓ 2 callersFunctionrecall_at
Calculation for recall at k.
projects/PLATO-KAG/holle/build_generation_infer_data.py:37
↓ 2 callersFunctionrecall_score
Compute the knowledge selection accuracy of query Args: data (BaseDataset): an instance of dataset containing knowledge selection results
projects/QKConv/utils/metrics.py:205
↓ 2 callersFunctionremove_substr
Remove substring.
projects/DSTC10-Track2/task2/tools/get_mark_logs.py:93
↓ 2 callersFunctionrepeat_array_or_tensor
Repeate numpy array or LoD tensor.
knover/utils/tensor_utils.py:117
↓ 2 callersFunctionrindex
Get the last position of elem in lst.
knover/utils/reader_utils.py:21
↓ 2 callersFunctionto_lodtensor
Convert data to LoDTensor.
knover/utils/tensor_utils.py:60
↓ 1 callersFunction__combine_heads
Merge multiply chunks into output embeddings. Transpose and then reshape the last two dimensions of input tensor x into one dimension
knover/modules/transformer_block.py:157
↓ 1 callersFunction__compute_qkv
Add linear projection to queries, keys, and values.
knover/modules/transformer_block.py:88
↓ 1 callersFunction__convert_schema_desc_to_tgt
(doamin, knowledge_type, description)
projects/DSTC9-Track1/task1/generate_inference_dataset_with_schema.py:46
↓ 1 callersFunction__convert_to_tgt
(domain, entity, doc)
projects/DSTC9-Track1/task1/generate_inference_dataset_with_schema.py:32
↓ 1 callersFunction__convert_to_tgt
(domain, entity, doc)
projects/DSTC9-Track1/task2/generate_inference_dataset.py:30
↓ 1 callersFunction__convert_to_tgt
(domain, entity, doc)
projects/DSTC10-Track2/task2/subtask2/generate_inference_dataset.py:45
↓ 1 callersFunction__scaled_dot_product_attention
Scaled Dot-Product Attention
knover/modules/transformer_block.py:175
↓ 1 callersMethod_batch_reader
Construct a batch reader from a record reader.
knover/data/dialog_reader.py:528
↓ 1 callersMethod_build_programs
Build programs. Build training program, evaluation program and inference program. Only use in static graph mode.
knover/core/model.py:223
↓ 1 callersMethod_calc_bow_logits
Get the logits of BoW task. The network may share weight with token embeddings. Args: enc_out: the output embeddings of
knover/models/plato.py:201
↓ 1 callersMethod_calc_recognition_logits
Get the logits of latent recognition task. The network may share weight with latent embeddings. Args: enc_out: the output
knover/models/plato.py:116
↓ 1 callersMethod_case_intervention
Run intervention case by case. Args: ds_dict (dict): The dialogue state dict. ds_delta_dict (dict): The delta of dial
projects/DSTC10-Track2/task1/utils.py:633
↓ 1 callersMethod_clone
(self, prog)
knover/core/model.py:215
↓ 1 callersMethod_compute_entity_f1
Compute Entity-F1.
projects/QKConv/utils/metrics.py:100
↓ 1 callersMethod_compute_entity_f1
Compute Entity-F1.
projects/Q-TOD/evaluate.py:203
↓ 1 callersMethod_convert_example_to_record
Convert an example to a record which can be used as the model's input.
knover/data/dialog_reader.py:318
↓ 1 callersMethod_db_guide
Database guidance. Args: ds_dict (dict): The dialogue state. db_match_score (dict): Matching score of predicted value
projects/DSTC10-Track2/task1/utils.py:992
↓ 1 callersFunction_f1_score
Return the max F1 score between the guess and *any* answer.
projects/PLATO-KAG/tools/generation_metrics.py:73
↓ 1 callersFunction_f1_score
Return the max F1 score between the guess and *any* answer.
projects/PLATO-KAG/holle/eval_multi_ref_generation.py:77
↓ 1 callersMethod_filter_slot_value
Filter out `name` slot values that do not appear in the dialogue history. Args: ds_dict (dict): The dialogue state dict.
projects/DSTC10-Track2/task1/utils.py:702
↓ 1 callersMethod_forward_for_dense_emb
Run forward for dense embedding.
knover/models/plato_kag.py:294
↓ 1 callersMethod_forward_for_kag_training
Run forward for KAG training.
knover/models/plato_kag.py:199
↓ 1 callersMethod_get_batch
Yield batches from record reader.
knover/data/dialog_reader.py:463
↓ 1 callersFunction_get_best_match_idx
Get best match idx.
projects/PLATO-KAG/holle/build_selection_infer_data.py:46
↓ 1 callersMethod_get_feed_dict_for_dense_emb
Get the feed list of the model for dense embedding.
knover/models/plato_kag.py:110
↓ 1 callersMethod_get_feed_dict_for_kag_training
Get the feed list of the model for KAG training.
knover/models/plato_kag.py:51
↓ 1 callersMethod_get_field_values_for_generation
Get field values for KAG generation.
knover/data/kag_reader.py:244
↓ 1 callersMethod_get_field_values_for_training
Get field values for KAG training.
knover/data/kag_reader.py:147
↓ 1 callersMethod_get_lr_scheduler
(self, args)
knover/core/model.py:463
↓ 1 callersMethod_get_optimizer
Get the optimizer of model. Args: args: arguments. lr_scheduler: learning rate scheduler Returns:
knover/core/model.py:499
↓ 1 callersMethod_get_sorted_batch
Yield sorted batches from record reader.
knover/data/dialog_reader.py:489
↓ 1 callersMethod_get_statistics_for_kag_training
Get statistics for KAG training.
knover/models/plato_kag.py:329
↓ 1 callersMethod_get_tgt_idx
Get idx for the target.
knover/models/plato_kag.py:166
↓ 1 callersMethod_get_topk_gather_idx
Get idx for the topk gathering.
knover/models/plato_kag.py:148
↓ 1 callersMethod_init_build_strategy
(self)
knover/core/model.py:200
↓ 1 callersMethod_init_distributed_strategy
Initialize distributed strategy.
knover/core/model.py:160
↓ 1 callersMethod_initialize_state
(self, inputs, step_idx)
knover/models/unified_transformer.py:495
↓ 1 callersFunction_is_control
Checks whether `chars` is a control character.
knover/utils/tokenization.py:244
↓ 1 callersFunction_is_whitespace
Checks whether `chars` is a whitespace character.
knover/utils/tokenization.py:232
↓ 1 callersMethod_load_entities
(self, entities_file)
projects/QKConv/utils/metrics.py:42
↓ 1 callersMethod_load_entities
(self, entities_file)
projects/Q-TOD/evaluate.py:108
↓ 1 callersMethod_lower_value
Lower slot values for candidates. Args: candidates (list): Lower case candidates.
projects/DSTC10-Track2/task1/utils.py:1112
↓ 1 callersMethod_mask_batch_as_list_for_topk_gen
Add mask for batch_tokens, return out, mask_label, mask_pos; Note: mask_pos responding the batch_tokens after padded;
knover/data/kag_reader.py:329
↓ 1 callersMethod_mix_negative_sample
Mix random negative samples into dataset.
knover/data/plato_reader.py:58
↓ 1 callersMethod_mix_negative_sample
Mix random negative samples into dataset.
knover/data/nsp_reader.py:58
↓ 1 callersMethod_multi_slot_normalization
Normalize the generated slot values according to the results of querying the database using multiple slots. Args: dom (str): The
projects/DSTC10-Track2/task1/utils.py:814
↓ 1 callersMethod_normalize
Normalize the generated slot values according to the database. Args: ds_dict (dict): The dialogue state dict. utt_lis
projects/DSTC10-Track2/task1/utils.py:736
↓ 1 callersMethod_normalize_time
Normalize the generated time string. Args: t (str): The time string. Returns: str: The time string after nor
projects/DSTC10-Track2/task1/utils.py:918
↓ 1 callersMethod_pad_batch_data_to_len
Pad the instances to a given length in batch.
knover/data/kag_reader.py:381
↓ 1 callersMethod_pad_batch_data_to_len_for_topk
Pad the instances to a given length in batch.
knover/data/kag_reader.py:389
↓ 1 callersMethod_pad_batch_records
Padding a batch of records and construct model's inputs. This function can be override by its subclass if necessary.
knover/data/dialog_reader.py:670
↓ 1 callersMethod_pad_batch_records_for_training
Pad batch records and mask for KAG training.
knover/data/kag_reader.py:410
↓ 1 callersMethod_parse_fields_for_kag_training
Parse and return corresponding fields for KAG training.
knover/data/kag_reader.py:45
↓ 1 callersMethod_parse_knowledge_list
Parse knowledge list and return corresponding fields.
knover/data/kag_reader.py:93
↓ 1 callersMethod_parse_topic
Parse topic sequence and return corresponding fields.
knover/data/dense_embedding_reader.py:51
↓ 1 callersMethod_post_process_generation_output
Post-process generation output. Calculate repetion, reranking. Args: predictions: the generation outputs of the model.
knover/tasks/dialog_generation.py:98
↓ 1 callersMethod_post_process_infer_output
Post-process inference output.
knover/core/task.py:49
↓ 1 callersMethod_post_process_scoring_output
Post-process scoring output. The score is calculated by perplexity (PPL).
knover/tasks/dialog_generation.py:204
↓ 1 callersFunction_prec_recall_f1_score
Compute precision, recall and f1 given a set of gold and prediction items. :param pred_items: iterable of predicted values :param gold_it
projects/PLATO-KAG/tools/generation_metrics.py:56
↓ 1 callersFunction_prec_recall_f1_score
Compute precision, recall and f1 given a set of gold and prediction items. :param pred_items: iterable of predicted values :param gold_it
projects/PLATO-KAG/holle/eval_multi_ref_generation.py:60
↓ 1 callersMethod_prepare_timestep_input
(self, state, step_idx)
knover/models/unified_transformer.py:509
↓ 1 callersMethod_process_text
(self, preds, refs)
projects/Q-TOD/evaluate.py:84
↓ 1 callersMethod_read_files
Read multiply files and yield records.
knover/data/dialog_reader.py:415
↓ 1 callersMethod_read_numerical_file
Read a file which contains numerical data and yield records.
knover/data/dialog_reader.py:379
↓ 1 callersMethod_read_tsv
Read a tab separated value file and yield records.
knover/data/dialog_reader.py:363
↓ 1 callersMethod_run_sys
Convert number to english in system utterance. Args: utt (str): The system utterance. Returns: str: The syst
projects/DSTC10-Track2/task1/utils.py:317
↓ 1 callersMethod_run_user
Convert number to english in user utterance. Args: utt (str): The user utterance. Returns: str: The user utt
projects/DSTC10-Track2/task1/utils.py:289
↓ 1 callersMethod_set_checkpoints
Set checkpoints for recompute. Args: checkpoints: A list of Variables which need to set as checkpoints.
knover/core/model.py:203
↓ 1 callersMethod_shuffle_reader
Shuffle examples.
knover/data/dialog_reader.py:437
↓ 1 callersMethod_update_state
(self, state, model_input, selected_ids,
knover/models/unified_transformer.py:542
↓ 1 callersMethod_update_type_ids
Mark entity spans in the input.
projects/DSTC10-Track2/task2/subtask2/ent_aug_nsp_reader.py:28
↓ 1 callersMethod_update_type_ids
Mark entity spans in the input.
projects/DSTC10-Track2/task2/subtask1/ent_aug_classification_reader.py:29
↓ 1 callersMethodadd_cmdline_args
Add cmdline arguments.
knover/tasks/dialog_generation.py:33
← previousnext →101–200 of 590, ranked by callers