File size: 3,585 Bytes
9a3640a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Initial Commit Contents

This file defines the deployed contents of the lightweight ENCODE Space and its
separate private runtime-artifact bucket.

## Application and deployment

- `README.md` β€” project overview and Hugging Face Space metadata.
- `COMMIT_CONTENTS.md` β€” this auditable release inventory.
- `Dockerfile` β€” CPU-only backend container listening on port 7860.
- `netlify.toml` and `deploy/` β€” Netlify build/Drop package that proxies the
  static frontend's API requests to the Hugging Face Space backend.
- `.dockerignore` β€” excludes development-only files from container builds.
- `.gitignore` β€” excludes raw data, archives, experiments, profiles, and caches.
- `src/requirements.txt` β€” pinned Python runtime dependencies.

## Backend

- `src/backend/app.py` β€” FastAPI application and HTTP endpoints.
- `src/backend/codesearch.py` β€” medical-code retrieval.
- `src/backend/retriever.py` β€” phenotype retrieval using Vidul's fine-tuned
  embeddings.
- `src/backend/encode.py` β€” annotation and response handling.
- `src/backend/graph.py` β€” phenotype detail graph construction.
- `src/backend/rxnav.py` β€” conservative, cached RxNAV/RxNorm completion for
  medication mappings that are absent from packaged artifacts.
- `src/backend/__init__.py` β€” backend package marker.

## Frontend

- `src/frontend/index.html` β€” browser application shell.
- `src/frontend/app.js` β€” search, review, and annotation behavior.
- `src/frontend/styles.css` β€” application styling.

## Private bucket: runtime model and indexes

- `artifacts/vidul/BGE_FT_VA/` β€” Vidul's fine-tuned model weights, tokenizer,
  and configuration.
- `artifacts/vidul/icd_index/` β€” diagnosis FAISS index and metadata.
- `artifacts/vidul/med_index/` β€” medication FAISS index and metadata.
- `artifacts/vidul/ndc_index/` β€” NDC FAISS index and metadata.
- `artifacts/vidul/labchem_index/` β€” LOINC/lab FAISS index and metadata.
- `artifacts/vidul/cpt_index/` β€” procedure FAISS index and metadata.
- `artifacts/part_a_embeddings/code.npy`
- `artifacts/part_a_embeddings/code_meta.json`
- `artifacts/part_a_embeddings/config.json`
- `artifacts/part_a_embeddings/metadata.npy`
- `artifacts/part_a_embeddings/metadata_ids.json`

## Private bucket: runtime phenotype records

- `artifacts/part_a_canonical/algorithm_components.jsonl`
- `artifacts/part_a_canonical/canonical_phenotypes.jsonl`
- `artifacts/part_a_canonical/cipher_links.jsonl`
- `artifacts/part_a_canonical/code_descriptions.jsonl`
- `artifacts/part_a_canonical/loinc_terms.jsonl`
- `artifacts/part_a_canonical/med_ingredient_map.jsonl`
- `artifacts/part_a_canonical/rxcui_ingredient_map.jsonl`

## Verification

- `tests/test_retrieval.py` β€” focused tests for the retained dense-retrieval
  path.
- `tests/test_rxnav_and_deployment.py` β€” RxNAV provenance and Netlify Drop
  deployment checks.

## Explicitly excluded

- Raw VA source data and local data exports.
- Source ZIPs, including the original application bundle, plus LOINC and RxNorm
  distribution archives.
- Training, evaluation, reranker, extracted-facet, and profiling outputs.
- Historical documentation, retired scripts, generated demos, and caches.
- Local environments, credentials, editor settings, and annotations.

The release contains one retrieval path: Vidul's fine-tuned model, prebuilt
embeddings, and exact dense search. Large runtime assets are stored in
`hf://buckets/hiasgnpsadgd/encode-artifacts` and mounted read-only at
`/home/user/app/artifacts`; they are not committed to the Space repository or
copied into the Docker image.