Skip to content

Matrixmax/GRACE

Repository files navigation

GRACE

GRACE: Graph-guided Repository-Aware Code Completion through Hierarchical Code Fusion

整体代码流程

1. 数据获取

  1. repoeval_updated 数据集:运行代码 data_process/from_repobench_v1.1_donwload_repos.py 下载对应的 repo。cceval数据集不用获取

2. graph 构建

  1. 运行代码 data_process/multilevel_graph_builder.py 生成对应的 graph

3. 运行 RAG 流程

  1. 运行代码 model/coderag_pipeline.py ,拿到 search_result

4. 运行generate.py

根据search_result,运行generate.py,得到代码生成之后的结果

5. 指标计算

  1. 运行代码 model/metrics.py 进行测试。

现在新的整体的流程

1. 数据获取

  1. repoeval_updated 数据集:运行代码 data_process/from_repobench_v1.1_donwload_repos.py 下载对应的 repo。cceval数据集不用获取

2. graph 构建

  1. 运行代码 data_process/multilevel_graph_builder.py 生成对应的 graph

3. 运行 RAG 流程

  1. 运行代码 model/coderag_pipeline.py ,拿到 生成之后的结果

4. 指标计算

  1. 运行代码 GRACE_eval.py 进行测试。

'json\n{\n "completed_code": "return held_text, False, full_prompt + built_response, utilized_prompt + built_response, built_response",\n "explanation": "The method returns a tuple containing the partial response, whether it is an end-of-stream marker, the full prompt, the utilized prompt, and the built response. This matches the expected return type of the `stream` function based on the function signature provided.",\n "confidence_score": 0.9,\n "referenced_nodes": ["3", "23"]\n}\n'

About

GRACE: Graph-guided Repository-Aware Code Completion through Hierarchical Code Fusion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •