MCPcopy Create free account

hub / github.com/LHRLAB/ChatKBQA / functions

Functions419 in github.com/LHRLAB/ChatKBQA

↓ 2 callersMethodpredict
( self, chatbot: List[Tuple[str, str]], query: str, history: List[Tuple[str, s
LLMs/LLaMA/src/llmtuner/webui/chat.py:71
↓ 2 callersFunctionprepare_dataloader
(args,split)
process_NQ.py:19
↓ 2 callersFunctionremove_prefixes_from_name
(name)
entity_retrieval/aqqu_util.py:46
↓ 2 callersFunctionreplace_model
(model: "AutoModelForCausalLMWithValueHead", target: Literal["default", "reward"])
LLMs/LLaMA/src/llmtuner/tuner/ppo/utils.py:10
↓ 2 callersMethodresolve_dependancy
resolve dependancy of variables @param triplets: all sparql triplet lines @param filter_lines: filter lines that start with `Filter (s
parse_sparql_webqsp.py:541
↓ 2 callersMethodresolve_dependancy
resolve dependancy of variables @param triplets: all sparql triplet lines @param filter_lines: filter lines that start with `Filter (s
parse_sparql_cwq.py:529
↓ 2 callersFunctionrun_exp
(args: Optional[Dict[str, Any]] = None, callbacks: Optional[List["TrainerCallback"]] = None)
LLMs/LLaMA/src/llmtuner/tuner/tune.py:19
↓ 2 callersFunctionsmooth
r""" EMA implementation according to TensorBoard.
LLMs/LLaMA/src/llmtuner/extras/ploting.py:14
↓ 2 callersMethodtiming
(self)
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:53
↓ 2 callersMethodtriplet_to_clause
Convert a triplet to S_expression clause @param tgt_var: target variable @param triplet: triplet in sparql @param parsed_dict:
parse_sparql_webqsp.py:366
↓ 2 callersMethodtriplet_to_clause
Convert a triplet to S_expression clause @param tgt_var: target variable @param triplet: triplet in sparql @param parsed_dict:
parse_sparql_cwq.py:359
↓ 2 callersFunctionupdate_process_bar
(callback: "LogCallback")
LLMs/LLaMA/src/llmtuner/webui/utils.py:18
↓ 1 callersFunctionCalculatePRF1
(goldAnswerList, predAnswerList)
generation/webqsp_evaluate_offcial.py:34
↓ 1 callersMethod__init__
(self, args: Optional[Dict[str, Any]] = None, lazy_init: Optional[bool] = True)
LLMs/LLaMA/src/llmtuner/webui/chat.py:13
↓ 1 callersMethod__str__
(self)
components/dataset_utils.py:24
↓ 1 callersMethod_build_entity_vocabulary
Create mapping from MID to offset/ID. :return:
entity_retrieval/surface_index_memory.py:116
↓ 1 callersMethod_build_surface_index
Build the surface index. Reads from the surface map on disk and creates a map from surface_form -> offset, score .... :retur
entity_retrieval/surface_index_memory.py:73
↓ 1 callersFunction_consume_a_node
(tokens, cursor, data_type)
components/expr_parser.py:189
↓ 1 callersMethod_filter_identical_entities
Some entities are identified twice, once with a prefix/suffix and once without. :param identified_entities: :return
entity_retrieval/aqqu_entity_linker.py:365
↓ 1 callersMethod_get_entity_vocabulary
Return vocabulary by building a new or reading an existing one. :param index_prefix: :return:
entity_retrieval/surface_index_memory.py:35
↓ 1 callersFunction_get_graph
( expression: List)
executor/logic_form_util_cwq.py:128
↓ 1 callersFunction_get_graph
( expression: List)
executor/logic_form_util.py:128
↓ 1 callersMethod_get_surface_index
Return surface index by building new or reading existing one. :param index_prefix: :return:
entity_retrieval/surface_index_memory.py:57
↓ 1 callersFunction_linearize_lisp_expression
(expression: list, sub_formula_id)
executor/logic_form_util_cwq.py:727
↓ 1 callersFunction_linearize_lisp_expression
(expression: list, sub_formula_id)
executor/logic_form_util.py:725
↓ 1 callersMethod_pad_labels
(self, batch: torch.Tensor, positions: List[Tuple[int, int]])
LLMs/LLaMA/src/llmtuner/tuner/dpo/collator.py:13
↓ 1 callersFunction_parse_args
()
data_process.py:26
↓ 1 callersFunction_parse_args
()
run_generator_final.py:15
↓ 1 callersFunction_parse_args
()
process_NQ.py:13
↓ 1 callersFunction_parse_args
()
eval_final.py:35
↓ 1 callersFunction_parse_args
()
eval_final_cwq.py:35
↓ 1 callersMethod_string_to_entity
Instantiate entity from string representation. :param line: :return:
entity_retrieval/surface_index_memory.py:186
↓ 1 callersMethod_text_matches_main_name
Check if the entity name is a perfect match on the text. :param entity: :param text: :return:
entity_retrieval/aqqu_entity_linker.py:198
↓ 1 callersFunction_textualize_relation
return a relation string with '_' and '.' replaced
components/utils.py:164
↓ 1 callersFunctionaggressive_top_k_eval_new
Run top k predictions, using linear origin map
eval_final.py:366
↓ 1 callersFunctionaggressive_top_k_eval_new
Run top k predictions, using linear origin map
eval_final_cwq.py:366
↓ 1 callersMethodassign_depth_and_level
(self, level=0)
components/expr_parser.py:33
↓ 1 callersMethodchat
( self, query: str, history: Optional[List[Tuple[str, str]]] = None, system: O
LLMs/LLaMA/src/llmtuner/chat/stream_chat.py:100
↓ 1 callersFunctioncheck_time_macro_from_body_lines
(lines)
parse_sparql_webqsp.py:772
↓ 1 callersFunctionchecksum
(data_files: List[str], file_sha1: Optional[str] = None)
LLMs/LLaMA/src/llmtuner/dsets/utils.py:23
↓ 1 callersFunctioncombine_entities_from_FACC1_and_elq
Combine the linking results from FACC1 and ELQ
data_process.py:37
↓ 1 callersFunctionconvert_cwq_sparql_instance
convert a cwq sparql to a s_expr
parse_sparql_cwq.py:656
↓ 1 callersFunctionconvert_webqsp_sparql_instance
convert a webqsp sparql to a s_expr
parse_sparql_webqsp.py:713
↓ 1 callersFunctioncount_function
(G, start)
executor/logic_form_util_cwq.py:275
↓ 1 callersFunctioncount_function
(G, start)
executor/logic_form_util.py:275
↓ 1 callersFunctioncreate_app
(chat_model: ChatModel)
LLMs/LLaMA/src/llmtuner/api/app.py:32
↓ 1 callersFunctioncreate_eval_tab
(top_elems: Dict[str, "Component"], runner: "Runner")
LLMs/LLaMA/src/llmtuner/webui/components/eval.py:13
↓ 1 callersFunctioncreate_export_tab
(top_elems: Dict[str, "Component"])
LLMs/LLaMA/src/llmtuner/webui/components/export.py:10
↓ 1 callersFunctioncreate_infer_tab
(top_elems: Dict[str, "Component"])
LLMs/LLaMA/src/llmtuner/webui/components/infer.py:12
↓ 1 callersFunctioncreate_top
()
LLMs/LLaMA/src/llmtuner/webui/components/top.py:14
↓ 1 callersFunctioncreate_train_tab
(top_elems: Dict[str, "Component"], runner: "Runner")
LLMs/LLaMA/src/llmtuner/webui/components/train.py:16
↓ 1 callersFunctioncreate_ui
()
LLMs/LLaMA/src/llmtuner/webui/interface.py:21
↓ 1 callersMethoddep_graph_to_s_expr
Convert dependancy graph to s_expression @param var_dep_list: varialbe dependancy list @param ret_var: return var @param spec_
parse_sparql_webqsp.py:308
↓ 1 callersMethoddep_graph_to_s_expr
Convert dependancy graph to s_expression @param var_dep_list: varialbe dependancy list @param ret_var: return var @param spec_
parse_sparql_cwq.py:301
↓ 1 callersFunctiondispatch_model
r""" Dispatches a pre-trained model to GPUs with balanced memory. Borrowed from: https://github.com/huggingface/transformers/blob/v4.31.0/src/
LLMs/LLaMA/src/llmtuner/extras/misc.py:68
↓ 1 callersFunctiondump_json
(obj, fname, indent=4, mode='w' ,encoding="utf8", ensure_ascii=False)
generation/webqsp_evaluate_offcial.py:5
↓ 1 callersFunctionexecute_normed_s_expr_from_label_maps
(normed_expr, entity_label_map,
eval_final.py:213
↓ 1 callersFunctionexecute_normed_s_expr_from_label_maps
(normed_expr, entity_label_map,
eval_final_cwq.py:213
↓ 1 callersFunctionexecute_normed_s_expr_from_label_maps_rel
(normed_expr, entity_label_map,
eval_final.py:268
↓ 1 callersFunctionexecute_normed_s_expr_from_label_maps_rel
(normed_expr, entity_label_map,
eval_final_cwq.py:268
↓ 1 callersFunctionexport_model
(args: Optional[Dict[str, Any]] = None, max_shard_size: Optional[str] = "10GB")
LLMs/LLaMA/src/llmtuner/tuner/tune.py:37
↓ 1 callersFunctionextract_mentioned_relations_from_sparql
extract relation from sparql
components/utils.py:84
↓ 1 callersFunctionextract_type_label_from_dataset
(dataset, split)
data_process.py:488
↓ 1 callersFunctionextract_type_label_from_dataset_webqsp
(dataset, split)
data_process.py:524
↓ 1 callersFunctionfind_all_linear_modules
( model: "PreTrainedModel", quantization_bit: Optional[int] = None, output_layer_name: Optional[st
LLMs/LLaMA/src/llmtuner/tuner/core/utils.py:10
↓ 1 callersFunctionfind_macro_template_from_query
(query, topic_mid)
parse_sparql_webqsp.py:738
↓ 1 callersMethodgen_refresh
(self, lang: str)
LLMs/LLaMA/src/llmtuner/webui/manager.py:15
↓ 1 callersFunctionget_all_entity
(dirname, dataset)
data_process.py:560
↓ 1 callersFunctionget_entity_labels
(src_path, tgt_path)
executor/sparql_executor.py:1027
↓ 1 callersFunctionget_eval_results
(path: os.PathLike)
LLMs/LLaMA/src/llmtuner/webui/utils.py:86
↓ 1 callersFunctionget_in_relations_with_odbc
(entity: str)
executor/sparql_executor.py:849
↓ 1 callersMethodget_inputs
r""" Generates model's responses given queries.
LLMs/LLaMA/src/llmtuner/tuner/ppo/trainer.py:162
↓ 1 callersMethodget_maximal_sets
(i, maximal_set, overlapping_sets, maximal_sets)
entity_retrieval/aqqu_entity_linker.py:451
↓ 1 callersFunctionget_out_relations_with_odbc
(entity: str)
executor/sparql_executor.py:889
↓ 1 callersMethodget_rewards
r""" Computes scores using given reward model.
LLMs/LLaMA/src/llmtuner/tuner/ppo/trainer.py:201
↓ 1 callersFunctionget_time
()
LLMs/LLaMA/src/llmtuner/webui/utils.py:32
↓ 1 callersFunctionget_value_for_year
Return the correct value representation for a year.
entity_retrieval/aqqu_entity_linker.py:143
↓ 1 callersFunctionhttpPort
(port)
Freebase-Setup/virtuoso.py:18
↓ 1 callersFunctioninit_adapter
r""" Initializes the adapters. Support full-parameter, freeze and LoRA training. Note that the trainable parameters must be cast to floa
LLMs/LLaMA/src/llmtuner/tuner/core/adapter.py:24
↓ 1 callersMethodinit_for_training
(self)
LLMs/LLaMA/src/llmtuner/hparams/data_args.py:98
↓ 1 callersMethodis_entity_occurrence
Return true if the tokens marked by start and end indices are a valid entity occurrence. :param tokens: :param start:
entity_retrieval/aqqu_entity_linker.py:216
↓ 1 callersFunctionlist_dataset
( dataset_dir: Optional[str] = None, training_stage: Optional[str] = list(TRAINING_STAGES.keys())[0] )
LLMs/LLaMA/src/llmtuner/webui/common.py:81
↓ 1 callersFunctionload_data
(split, args)
process_NQ.py:7
↓ 1 callersFunctionload_dataset_info
(dataset_dir: str)
LLMs/LLaMA/src/llmtuner/webui/common.py:73
↓ 1 callersFunctionmain
()
LLMs/LLaMA/src/beam_output_eva.py:9
↓ 1 callersFunctionmain
()
LLMs/LLaMA/src/cli_demo.py:4
↓ 1 callersFunctionmain
()
LLMs/LLaMA/src/beam_output.py:4
↓ 1 callersFunctionmake_sorted_relation_dataset_from_logits
(dataset, split)
data_process.py:96
↓ 1 callersFunctionmerge_all_data_for_logical_form_generation
(dataset, split)
data_process.py:287
↓ 1 callersMethodnormalize_body_lines
return normalized body lines of sparql, specially return filter lines starting with `FILTER (str(` @param lines: sparql lines list
parse_sparql_webqsp.py:105
↓ 1 callersMethodnormalize_body_lines
return normalized body lines of sparql, specially return filter lines starting with `FILTER (str(` @param lines: sparql lines list
parse_sparql_cwq.py:100
↓ 1 callersMethodon_log
r""" Event called after logging the last logs.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:117
↓ 1 callersMethodon_save
r""" Event called after a checkpoint save.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:22
↓ 1 callersMethodon_step_end
r""" Event called at the end of a training step.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:90
↓ 1 callersMethodon_train_begin
r""" Event called at the beginning of training.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:61
↓ 1 callersFunctionparse_cwq_sparql
Parse CWQ sparqls into s-expressions
parse_sparql_cwq.py:674
↓ 1 callersFunctionparse_infer_args
( args: Optional[Dict[str, Any]] = None )
LLMs/LLaMA/src/llmtuner/tuner/core/parser.py:77
↓ 1 callersMethodparse_naive_body
Parse body lines @param body_lines: list of sparql body lines @param filter_lines: lines that start with `FILTER (str(?` @para
parse_sparql_webqsp.py:391
↓ 1 callersMethodparse_naive_body
Parse body lines @param body_lines: list of sparql body lines @param ret_var: return var, default `?x` @param filter_lines: li
parse_sparql_cwq.py:384
↓ 1 callersMethodparse_query_cwq
parse a sparql query into a s-expression @param query: sparql query @param mid_list: all mids appeared in the sparql query
parse_sparql_cwq.py:15
← previousnext →101–200 of 419, ranked by callers