Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LHRLAB/ChatKBQA
/ functions
Functions
419 in github.com/LHRLAB/ChatKBQA
⨍
Functions
419
◇
Types & classes
61
↳
Endpoints
2
Function
convert_parse_instance
convert a webqsp parse instance to a s_expr
parse_sparql_webqsp.py:607
Function
create_chat_completion
(request: ChatCompletionRequest)
LLMs/LLaMA/src/llmtuner/api/app.py:49
Method
create_consistent_identification_sets
(identified_entities)
entity_retrieval/aqqu_entity_linker.py:424
Function
create_web_demo
()
LLMs/LLaMA/src/llmtuner/webui/interface.py:58
Function
dump_to_bin
(obj, fname)
components/utils.py:10
Method
emit
(self, record)
LLMs/LLaMA/src/llmtuner/extras/logging.py:14
Function
execute_webq_s_expr
(s_expr)
parse_sparql_webqsp.py:629
Function
extract_entities
(expr)
components/expr_parser.py:10
Function
extract_macro_template_from_instance
(parse)
parse_sparql_webqsp.py:810
Function
extract_mentioned_entities_from_sexpr
(expr:str)
components/utils.py:59
Function
extract_mentioned_relations_from_sexpr
(sexpr:str)
components/utils.py:99
Function
extract_relations
(expr)
components/expr_parser.py:15
Method
forward
(self, x: torch.Tensor)
LLMs/LLaMA/src/llmtuner/tuner/core/utils.py:68
Method
forward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
LLMs/LLaMA/src/llmtuner/extras/patches/llama_patch.py:21
Method
forward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
LLMs/LLaMA/src/llmtuner/extras/patches/llama_patch.py:110
Function
freebase_query_entity_type_with_odbc
(entities_path, output_path)
executor/sparql_executor.py:1070
Function
freebase_relations_post_process
(input_path, output_path)
executor/sparql_executor.py:1146
Method
gen_label
(self, lang: str)
LLMs/LLaMA/src/llmtuner/webui/manager.py:36
Function
gen_plot
(base_model: str, finetuning_type: str, output_dir: str)
LLMs/LLaMA/src/llmtuner/webui/utils.py:92
Function
get_1hop_relations_with_odbc
(entity)
executor/sparql_executor.py:929
Function
get_2hop_relations_with_odbc
(entity: str)
executor/sparql_executor.py:250
Function
get_all_unique_candidate_entities
Get unique candidate entity ids of {dataset}
data_process.py:210
Function
get_candidate_unique_entities_cwq
()
data_process.py:667
Function
get_entities_in_out_relations
(dataset,unique_candidate_entities)
data_process.py:251
Method
get_entity_for_mid
Returns the entity object for the MID or None if the MID is unknown. Forwards to surface index. :param mid: :return:
entity_retrieval/aqqu_entity_linker.py:174
Method
get_entity_for_mid
Returns the entity object for the MID or None if the MID is unknown. :param mid: :return:
entity_retrieval/surface_index_memory.py:141
Function
get_freebase_mid_from_wikiID
(wikiID: int)
executor/sparql_executor.py:970
Function
get_freebase_relations_with_odbc
Get all relations of Freebase
executor/sparql_executor.py:1107
Function
get_in_relations
(entity: str)
executor/sparql_executor.py:117
Function
get_label
Get the label of an entity in Freebase
executor/sparql_executor.py:751
Function
get_lisp_from_graph_query
(graph_query)
executor/logic_form_util_cwq.py:363
Function
get_lisp_from_graph_query
(graph_query)
executor/logic_form_util.py:363
Function
get_merged_disambiguated_entities
Get disambiguated entities by entity retrievers (one entity for one mention)
data_process.py:387
Function
get_model_class
(args)
config.py:218
Function
get_out_relations
(entity: str)
executor/sparql_executor.py:147
Function
get_preview
( dataset_dir: str, dataset: list, start: Optional[int] = 0, end: Optional[int] = 2 )
LLMs/LLaMA/src/llmtuner/webui/utils.py:50
Function
get_template
(model_name: str)
LLMs/LLaMA/src/llmtuner/webui/common.py:51
Function
graph_to_logical_form
(G, start, count: bool = False)
executor/logic_form_util_cwq.py:238
Function
graph_to_logical_form
(G, start, count: bool = False)
executor/logic_form_util.py:238
Method
identify_dates
Identify entities representing dates in the tokens. :param tokens: :return:
entity_retrieval/aqqu_entity_linker.py:292
Method
identify_entities_in_tokens
Identify instances in the tokens. :param tokens: A list of string tokens. :return: A list of tuples (i, j, e, score) for an i
entity_retrieval/aqqu_entity_linker.py:311
Function
lifespan
(app: FastAPI)
LLMs/LLaMA/src/llmtuner/api/app.py:27
Function
lisp_to_lambda
(expressions: Union[List[str], str])
executor/logic_form_util_cwq.py:740
Function
lisp_to_lambda
(expressions: Union[List[str], str])
executor/logic_form_util.py:738
Function
list_checkpoint
(model_name: str, finetuning_type: str)
LLMs/LLaMA/src/llmtuner/webui/common.py:57
Function
list_models
()
LLMs/LLaMA/src/llmtuner/api/app.py:44
Function
load_bin
(fname)
components/utils.py:15
Method
load_from_json
r"""Creates an instance from the content of `json_path`.
LLMs/LLaMA/src/llmtuner/hparams/finetuning_args.py:83
Method
load_model
( self, lang: str, model_name: str, checkpoints: List[str], finetuning
LLMs/LLaMA/src/llmtuner/webui/chat.py:21
Function
load_untrained_model
(args)
config.py:197
Method
logical_form_with_type
(self)
components/expr_parser.py:82
Function
make_inputs_require_grad
(module, input, output)
LLMs/LLaMA/src/llmtuner/tuner/core/utils.py:55
Function
mkdir_f
(prefix)
components/utils.py:34
Function
mkdir_p
(prefix)
components/utils.py:40
Function
multi_edge_match
(e1, e2)
executor/logic_form_util_cwq.py:108
Function
multi_edge_match
(e1, e2)
executor/logic_form_util.py:108
Function
node_match
(n1, n2)
executor/logic_form_util_cwq.py:88
Function
node_match
(n1, n2)
executor/logic_form_util.py:88
Method
on_evaluate
r""" Event called after an evaluation phase.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:101
Method
on_predict
r""" Event called after a successful prediction.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:109
Method
on_prediction_step
r""" Event called after a prediction step.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:141
Method
on_substep_end
r""" Event called at the end of an substep during gradient accumulation.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:82
Method
on_train_end
r""" Event called at the end of training.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:32
Method
overlaps
Check whether the other identified entity overlaps this one.
entity_retrieval/aqqu_entity_linker.py:132
Method
prediction_step
r""" Removes the prompt part in the generated tokens. Subclass and override to inject custom behavior.
LLMs/LLaMA/src/llmtuner/tuner/sft/trainer.py:24
Method
prefixed_sparql_name
Returns an id with sparql prefix.
entity_retrieval/aqqu_entity_linker.py:25
Method
prefixed_sparql_name
(self, prefix)
entity_retrieval/aqqu_entity_linker.py:45
Method
prefixed_sparql_name
(self, prefix)
entity_retrieval/aqqu_entity_linker.py:90
Method
prefixed_sparql_name
(self, prefix)
entity_retrieval/aqqu_entity_linker.py:139
Function
preprocess_packed_supervised_dataset
(examples: Dict[str, List[Any]])
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:102
Function
preprocess_pairwise_dataset
(examples)
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:145
Function
preprocess_pretrain_dataset
(examples: Dict[str, List[Any]])
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:36
Function
preprocess_supervised_dataset
(examples: Dict[str, List[Any]])
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:60
Function
preprocess_unsupervised_dataset
(examples: Dict[str, List[Any]])
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:124
Method
preview_eval
(self, *args)
LLMs/LLaMA/src/llmtuner/webui/runner.py:230
Method
preview_train
(self, *args)
LLMs/LLaMA/src/llmtuner/webui/runner.py:222
Function
print_pairwise_dataset_example
(example)
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:180
Function
print_supervised_dataset_example
(example)
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:172
Function
print_unsupervised_dataset_example
(example)
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:188
Function
pyodbc_test
()
executor/sparql_executor.py:784
Function
query_relation_domain_range_label_odbc
(input_path, output_path)
executor/sparql_executor.py:1037
Function
query_two_hop_relations_gmt
(entities_path, output_file)
executor/sparql_executor.py:177
Function
read_abbreviations
Return a set of abbreviations. :param abbreviations_file: :return:
entity_retrieval/aqqu_util.py:26
Function
register_args
(parser)
config.py:26
Function
remove_abbreviations_from_entity_name
(entity_name, abbreviations)
entity_retrieval/aqqu_util.py:39
Method
reset
(self)
LLMs/LLaMA/src/llmtuner/extras/logging.py:11
Method
run_eval
(self, *args)
LLMs/LLaMA/src/llmtuner/webui/runner.py:264
Method
run_train
(self, *args)
LLMs/LLaMA/src/llmtuner/webui/runner.py:238
Function
same_logical_form
(form1: str, form2: str)
executor/logic_form_util_cwq.py:76
Function
same_logical_form
(form1: str, form2: str)
executor/logic_form_util.py:76
Function
save_config
(lang: str, model_name: str, model_path: str)
LLMs/LLaMA/src/llmtuner/webui/common.py:35
Function
save_model
( lang: str, model_name: str, checkpoints: List[str], finetuning_type: str, template: str,
LLMs/LLaMA/src/llmtuner/webui/utils.py:119
Method
save_to_json
r"""Saves the content of this instance in JSON format inside `json_path`.
LLMs/LLaMA/src/llmtuner/hparams/finetuning_args.py:76
Method
set_abort
(self)
LLMs/LLaMA/src/llmtuner/webui/runner.py:30
Function
set_seed
(args)
config.py:15
Method
sparql_name
Returns an id w/o sparql prefix.
entity_retrieval/aqqu_entity_linker.py:21
Method
sparql_name
(self)
entity_retrieval/aqqu_entity_linker.py:42
Method
sparql_name
(self)
entity_retrieval/aqqu_entity_linker.py:87
Method
sparql_name
(self)
entity_retrieval/aqqu_entity_linker.py:136
Function
status
(port)
Freebase-Setup/virtuoso.py:113
← previous
next →
301–400 of 419, ranked by callers