Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RepoET

RepoET is an experimental repository-level code retrieval project. Its core capability is a multi-stage retrieval pipeline that retrieves relevant files and code snippets for code tasks.

This README keeps only the minimal public-facing setup and usage instructions, and documents a single launch method only: starting with a config file via --params.

Requirements

  • Python >=3.10
  • uv is recommended

Install dependencies:

uv sync

Data Directory

RepoET expects a benchmark directory, defaulting to ./data/. The current code assumes the following layout:

data/
  artifacts/
    swebench_lite.json
    repoqa.json
  repositories/
    <org>/<repo>/
  repocommits/
    <repo>__<sha8>/

Notes:

  • artifacts/ stores benchmark JSON files
  • repositories/ stores original repositories
  • repocommits/ stores repository snapshots split by commit

Start With a Config File

Use configs/config_template.json as the template.

Before running, update these fields for your environment:

  • benchmark
  • start_index
  • end_index
  • num_proc
  • workflow
  • repoet_config.CACHE_DIRECTORY_PATH
  • repoet_config.BENCHMARK_DIRECTORY_PATH
  • repoet_config.LLM_MODEL
  • repoet_config.LLM_API_BASE
  • repoet_config.LLM_API_KEY

Launch Command

Start only through a config file:

uv run python main.py --params configs/config_template.json

If you create another config file, for example configs/my_run.json, run:

uv run python main.py --params configs/my_run.json

Common Config Fields

  • benchmark: the currently supported benchmarks in this codebase are swe and repoqa
  • workflow: available stages are kws, uqs, fts, topk, preview, snippet_judge, and snippet_select
  • stage_query_modes: controls whether each stage uses query, issue, or another supported input mode

If you are only validating that deployment works, a small first run is recommended:

  • start_index = 0
  • end_index = 1
  • num_proc = 10

Outputs

After running, RepoET creates a run_logs/ directory under the repository root. A typical run includes:

  • command.json
  • params.source.json
  • params.effective.json
  • results.json
  • cost.json
  • per-sample subdirectories with workflow_trace.json

Code Structure

repoet/
  main.py
  run_repoet.py
  config.py
  configs/
  core/
  sweep/
  tests/

Main modules:

  • main.py: benchmark execution entry point
  • run_repoet.py: single retrieval entry point
  • config.py: runtime config loading
  • core/workflows/file_workflow.py: file-level workflow
  • core/workflows/retrieve_workflow.py: snippet-level workflow

About

Code and Dataset for "Streamlining Repository Tasks with Effective Snippet Retrieval" at TOSEM'26

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages