chq1155 commited on
Commit ·
b43a758
1
Parent(s): 7d3c9bf
Add repository contributor guidelines
Browse files
AGENTS.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Repository Guidelines
|
| 2 |
+
|
| 3 |
+
## Project Structure & Module Organization
|
| 4 |
+
|
| 5 |
+
TD3B is a Python 3.10 research codebase for directional peptide-binder generation. Core diffusion components live in `models/`; TD3B losses, scoring, MCTS integration, data utilities, and the direction oracle live in `td3b/`. Training helpers are under `training/`, standalone tree search is in `mcts/`, and comparison methods are in `baselines/`. Configuration objects and YAML settings belong in `configs/`. Pretrained weights are tracked in `checkpoints/`, classifier artifacts in `scoring/functions/classifiers/`, and tokenizer resources in `tokenizer/`. Use `inference.py` and `finetune_multi_target.py` as the main entry points. The notebook in `notebooks/` is the interactive demo. Local datasets should use `data/train.csv` and `data/test.csv`; they are not included in the repository.
|
| 6 |
+
|
| 7 |
+
## Build, Test, and Development Commands
|
| 8 |
+
|
| 9 |
+
Create the supported environment and install the package in editable mode:
|
| 10 |
+
|
| 11 |
+
```bash
|
| 12 |
+
conda env create -f env.yml
|
| 13 |
+
conda activate td3b
|
| 14 |
+
pip install -e .
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
Run inference with `python inference.py --ckpt_path checkpoints/td3b.ckpt --val_csv data/test.csv --save_path results/ --seed 42`. Before training, replace the placeholder paths in `launch_multi_target.sh`, then run `bash launch_multi_target.sh`. Run a baseline through its positional interface, for example `bash baselines/run.sh data/test.csv cg cuda:0 baselines/outputs`.
|
| 18 |
+
|
| 19 |
+
## Coding Style & Naming Conventions
|
| 20 |
+
|
| 21 |
+
Follow the existing Python style: four-space indentation, `snake_case` for modules, functions, and variables, `PascalCase` for classes/config dataclasses, and `UPPER_SNAKE_CASE` for constants. Add type hints and short docstrings to public or non-obvious functions. Keep CLI flags descriptive and lowercase with underscores. No formatter or linter is configured; keep imports grouped as standard library, third-party, then local modules, and avoid unrelated reformatting.
|
| 22 |
+
|
| 23 |
+
## Testing Guidelines
|
| 24 |
+
|
| 25 |
+
There is currently no automated test suite or coverage threshold. For every change, run `python -m compileall models td3b training mcts scoring baselines utils` and exercise the affected CLI with a small input. GPU-dependent changes should document the CUDA device, checkpoint, seed, and command used. Add future tests under `tests/` using `test_<module>.py` and `test_<behavior>` names.
|
| 26 |
+
|
| 27 |
+
## Commit & Pull Request Guidelines
|
| 28 |
+
|
| 29 |
+
Recent commits use short, imperative summaries such as `Add Colab demo notebook section to README` and `Reorganize root modules into ... packages`. Keep commits focused and avoid committing generated results, caches, or machine-specific paths. Pull requests should explain the motivation and implementation, list validation commands, link relevant issues, and note data/checkpoint assumptions. Include sample output or screenshots for notebook or visualization changes.
|