MCPcopy Create free account

hub / github.com/danielpatrickhug/GitModel / functions

Functions80 in github.com/danielpatrickhug/GitModel

↓ 4 callersFunctiongaussian_kernel_torch
Computes the Gaussian kernel matrix between two sets of embeddings using PyTorch. :param embs_a: Tensor of shape (batch_size_a, embedding_dim
src/ml_models/graph_networks/kernels.py:8
↓ 3 callersMethodcompose_inference
(self, text_block, messages)
src/ml_models/transformers/semantic_graph_context_generator.py:49
↓ 3 callersFunctioncos_sim
Computes the cosine similarity cos_sim(a[i], b[j]) for all i and j. :return: Matrix with res[i][j] = cos_sim(a[i], b[j])
src/ml_models/graph_networks/kernels.py:40
↓ 3 callersMethodprocess_transcript
(self, segments, file_name, git_repo_path, output_file_path, system_prompt, task, code_type)
src/ml_models/transformers/semantic_graph_context_generator.py:58
↓ 3 callersMethodrun
Run the pipeline.
src/pipeline.py:66
↓ 2 callersFunctioncompose_inference
(text_block, messages)
src/ml_models/transformers/category_decomposition.py:27
↓ 2 callersFunctioncompute_kernel_by_type
(embs, threshold=0.65, kernel_type="cosine", sigma=1.0)
src/ml_models/graph_networks/kernels.py:121
↓ 2 callersFunctioncreate_prompt_message_template
(text, role="user")
src/ml_models/transformers/category_decomposition.py:21
↓ 2 callersMethodcreate_prompt_message_template
(self, text, role="user")
src/ml_models/transformers/semantic_graph_context_generator.py:44
↓ 2 callersMethodfrom_yaml
(cls, yaml_path)
src/config.py:12
↓ 2 callersFunctionk_hop_message_passing_sparse
Compute the k-hop adjacency matrix and aggregated features using message passing. Parameters: A (numpy array or scipy sparse matrix): Th
src/ml_models/graph_networks/message_passing.py:32
↓ 1 callersMethod__init__
(self, in_features, out_features, dropout=0.0)
src/ml_models/graph_networks/gnn_head.py:176
↓ 1 callersFunctionchat_gpt_inference
(messages: list)
src/ml_models/transformers/category_decomposition.py:11
↓ 1 callersMethodchat_gpt_inference
(self, messages: list)
src/ml_models/transformers/semantic_graph_context_generator.py:35
↓ 1 callersFunctionclone_and_create_context_folder
(repo_name: str, id_name: str)
src/fetch_repo.py:6
↓ 1 callersFunctioncombine_graphs_with_gat
Combine a list of graphs using the Graph Attention Network. Parameters: graphs (List of Tuple): List of tuples where each tuple contains
src/ml_models/graph_networks/gnn_head.py:195
↓ 1 callersFunctioncommunity_detection
(A)
src/community_detection/extract_connected_components.py:5
↓ 1 callersMethodcompute_hierarchical_topic_tree
(self, topic_model, data, key="query")
src/ml_models/topic_modeling/topic_model.py:66
↓ 1 callersMethodcompute_kernel_matrix
Compute the kernel matrix using the specified kernel function. Parameters: node_features (numpy array): The feature matrix o
src/ml_models/graph_networks/gnn_head.py:24
↓ 1 callersMethoddecompose_repo
(self, contents, git_repo_path, name_id, topic_tree, out_path)
src/pipeline.py:118
↓ 1 callersFunctiondegree_matrix
compute degree matrix using adjacency distance matrix from pairwise distances :A: nxn size matrix embedding minmaxed using mu sigma and pairw
src/ml_models/graph_networks/kernels.py:152
↓ 1 callersFunctiondfs
Depth-first search algorithm.
src/community_detection/extract_connected_components.py:46
↓ 1 callersMethodembed_data
Embed the sentences/text using the MiniLM language model (which uses mean pooling)
src/ml_models/graph_networks/gnn_head.py:49
↓ 1 callersMethodencode
(self)
src/ml_models/graph_networks/gnn_head.py:134
↓ 1 callersFunctionextract_questions
(prompt_output)
src/system_prompts/format_system_prompts.py:20
↓ 1 callersMethodfind_files_with_substring
(self, root_dir, substring)
src/pipeline.py:44
↓ 1 callersFunctionformat_system_prompts
(git_repo_path, file_name)
src/system_prompts/format_system_prompts.py:4
↓ 1 callersFunctionformat_system_prompts_with_tree
(git_repo_path, file_name, topic_tree)
src/system_prompts/format_system_prompts.py:29
↓ 1 callersMethodgenerate_graph
Generate a graph using the kernel function and message passing. Parameters: node_features (numpy array): The feature matrix
src/ml_models/graph_networks/gnn_head.py:93
↓ 1 callersFunctionget_methods
(class_or_str)
src/ast_parsers/python_ast_parser.py:35
↓ 1 callersMethodget_repo_contents
(self, git_repo_path)
src/ml_models/transformers/semantic_graph_context_generator.py:21
↓ 1 callersMethodget_representative_docs
(self, topic_model)
src/ml_models/topic_modeling/topic_model.py:43
↓ 1 callersMethodget_topic_info
(self, topic_model)
src/ml_models/topic_modeling/topic_model.py:36
↓ 1 callersFunctiongraph_laplacian
compute graph laplacian using degree and adjacency matrix from pairwise distances :A: nxn size matrix embedding minmaxed using mu sigma and p
src/ml_models/graph_networks/kernels.py:165
↓ 1 callersFunctioninstantiate_class_from_config
(config: Config)
src/dynamic_import.py:10
↓ 1 callersFunctionk_hop_message_passing
Compute the k-hop adjacency matrix and aggregated features using message passing. Parameters: A (numpy array): The adjacency matrix of t
src/ml_models/graph_networks/message_passing.py:6
↓ 1 callersFunctionlinearly_sum_gnn_heads
Linearly sum a list of adjacency matrices and normalize the result. Also computes the average of the node embeddings and checks that the numb
src/ml_models/graph_networks/gnn_head.py:225
↓ 1 callersMethodload_jsonl
(self, filepaths)
src/pipeline.py:50
↓ 1 callersFunctionparse_github_repo
(local_dir)
src/ast_parsers/python_ast_parser.py:47
↓ 1 callersFunctionparse_python_file
(file_path)
src/ast_parsers/python_ast_parser.py:7
↓ 1 callersMethodprepare_attention_input
(self, Wh)
src/ml_models/graph_networks/gnn_head.py:163
↓ 1 callersFunctionreportWebVitals
(onPerfEntry)
git-frontend/src/reportWebVitals.js:1
↓ 1 callersFunctionrun_migrations_offline
Run migrations in 'offline' mode. This configures the context with just a URL and not an Engine, though an Engine is acceptable here as w
src/alembic/env.py:29
↓ 1 callersFunctionrun_migrations_online
Run migrations in 'online' mode. In this scenario we need to create an Engine and associate a connection with the context.
src/alembic/env.py:53
Method__init__
(self, pipeline_settings, semantic_graph_context_generator, gnn_heads, topic_model)
src/config.py:5
Method__init__
(self, config: Config)
src/config.py:19
Method__init__
(self, config: Config)
src/pipeline.py:24
Method__init__
(self, config)
src/ml_models/topic_modeling/topic_model.py:26
Method__init__
(self, config: Config)
src/ml_models/transformers/semantic_graph_context_generator.py:15
Method__init__
(self, config: Config)
src/ml_models/graph_networks/gnn_head.py:18
Method__init__
(self, config: Config)
src/ml_models/graph_networks/gnn_head.py:123
Method__init__
(self, in_features, out_features, dropout=0.0)
src/ml_models/graph_networks/gnn_head.py:143
Method__repr__
(self)
src/config.py:22
Method__repr__
(self)
src/ml_models/topic_modeling/topic_model.py:29
Method__repr__
(self)
src/ml_models/transformers/semantic_graph_context_generator.py:18
Method__repr__
(self)
src/ml_models/graph_networks/gnn_head.py:21
Method__repr__
(self)
src/ml_models/graph_networks/gnn_head.py:126
Functionanalyze_repo
(input_data: AnalyzeRepoInput)
main.py:29
Functioncategory_generation
Decompose a category into its constituent parts. Args: category (str): The category to decompose. Returns: list: The list of
src/ml_models/transformers/category_decomposition.py:37
Functioncompute_kernel
(embs)
src/ml_models/graph_networks/kernels.py:145
Functioncompute_kernel_with_activation_fn
(embs, activation_fn=F.relu, kernel_type="cosine", sigma=1.0)
src/ml_models/graph_networks/kernels.py:134
Functionconnected_components
Find connected components in a graph represented by an adjacency matrix.
src/community_detection/extract_connected_components.py:55
Functioncos_sim_torch
Computes the cosine similarity cos_sim(a[i], b[j]) for all i and j. Using torch.nn.functional.cosine_similarity :return: Matrix with res[
src/ml_models/graph_networks/kernels.py:62
Methoddecompose_repo
(self, git_repo_path, name_id, out_path, skip_graph_generation=False)
src/ml_models/transformers/semantic_graph_context_generator.py:107
Functionestimate_pdf
estimate scores probability density function :scores: list of distance scores from topic features to topic centroid :return: distribution
src/ml_models/graph_networks/kernels.py:31
Methodfit_topic_model
(self, topic_model, data, embeddings, key="query")
src/ml_models/topic_modeling/topic_model.py:32
Methodforward
(self, h, adj)
src/ml_models/graph_networks/gnn_head.py:153
Methodforward
(self, embs, adj_matrices)
src/ml_models/graph_networks/gnn_head.py:188
Methodfrom_config
(cls, config: Config)
src/pipeline.py:36
Methodfrom_yaml
(cls, yaml_path)
src/pipeline.py:40
Methodget_repo_contents
(self, git_repo_path)
src/pipeline.py:114
FunctionhandleOpenaiSecretChange
(event)
git-frontend/src/App.js:25
FunctionhandleRepoUrlChange
(event)
git-frontend/src/App.js:21
FunctionhandleSubmit
()
git-frontend/src/App.js:29
Methodmean_pooling
(self, model_output, attention_mask)
src/ml_models/graph_networks/gnn_head.py:129
Functionprint_communities
(data, A)
src/community_detection/extract_connected_components.py:21
Functionprune_ref_docs
Drops unnecessary documents from the reference embeddings and updates the list of reference documents, and then recomputes the adjacency matr
src/ml_models/graph_networks/kernels.py:83
Methodreduce_outliers
(self, topic_model, data, topics, probs, key="query", strategy="c-tf-idf")
src/ml_models/topic_modeling/topic_model.py:46
Methodreduce_topics
(self, topic_model, data, nr_topics, key="query")
src/ml_models/topic_modeling/topic_model.py:39
Methodrun
Run the topic modeling.
src/ml_models/topic_modeling/topic_model.py:71