README: add HF download snippet, document 2-column CSV input, swap example paths to released checkpoint
Browse files
README.md
CHANGED
|
@@ -116,13 +116,50 @@ python train_ppiDCE.py \
|
|
| 116 |
- `--checkpoint path.pth`: Resume from a saved checkpoint
|
| 117 |
- `--suppress_warnings`: Suppress tokenizer truncation warnings
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
### Inference
|
| 120 |
|
| 121 |
```bash
|
| 122 |
python inference_ppiDCE.py \
|
| 123 |
-
--model_path
|
| 124 |
--model_config facebook/esm1b_t33_650M_UR50S \
|
| 125 |
-
--input_file
|
| 126 |
--output_file predictions.csv \
|
| 127 |
--batch_size 4 \
|
| 128 |
--max_length 1024 \
|
|
|
|
| 116 |
- `--checkpoint path.pth`: Resume from a saved checkpoint
|
| 117 |
- `--suppress_warnings`: Suppress tokenizer truncation warnings
|
| 118 |
|
| 119 |
+
### Quick start: fetch the checkpoint from Hugging Face
|
| 120 |
+
|
| 121 |
+
The released MED4 checkpoint (`checkpoints/ppiDCE_epoch8.pth`, 12-layer)
|
| 122 |
+
lives on this Hugging Face repo. Pull it without cloning the GitHub mirror:
|
| 123 |
+
|
| 124 |
+
```python
|
| 125 |
+
from huggingface_hub import hf_hub_download
|
| 126 |
+
|
| 127 |
+
ckpt_path = hf_hub_download(
|
| 128 |
+
repo_id="kouroshSA/ppiDCE",
|
| 129 |
+
filename="checkpoints/ppiDCE_epoch8.pth",
|
| 130 |
+
)
|
| 131 |
+
print(ckpt_path) # pass this string to --model_path
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
`inference_ppiDCE.py` takes the checkpoint path as a direct `--model_path`
|
| 135 |
+
argument, so no rename or specific directory layout is required — point
|
| 136 |
+
it straight at the file you just downloaded.
|
| 137 |
+
|
| 138 |
+
### Input file format
|
| 139 |
+
|
| 140 |
+
The inference script expects a CSV with two columns of plain amino-acid
|
| 141 |
+
sequences (one protein pair per row — no delimiter tokens, no length
|
| 142 |
+
markers, no chevrons):
|
| 143 |
+
|
| 144 |
+
```
|
| 145 |
+
seq1,seq2
|
| 146 |
+
MKLR...QSH,MSEDF...VKN
|
| 147 |
+
MQAG...PIA,MTRRL...EEP
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
A ready-made example is shipped with the repo:
|
| 151 |
+
[`MED4-PPIs-low-confidence_ppiTEPM_prompts.csv`](MED4-PPIs-low-confidence_ppiTEPM_prompts.csv).
|
| 152 |
+
The labeled PRS/RRS reference sets (`MED4_PRS_100.csv`, `MED4_RRS_100.csv`)
|
| 153 |
+
include a third label column, which the inference script ignores — only
|
| 154 |
+
the first two columns are read.
|
| 155 |
+
|
| 156 |
### Inference
|
| 157 |
|
| 158 |
```bash
|
| 159 |
python inference_ppiDCE.py \
|
| 160 |
+
--model_path checkpoints/ppiDCE_epoch8.pth \
|
| 161 |
--model_config facebook/esm1b_t33_650M_UR50S \
|
| 162 |
+
--input_file MED4-PPIs-low-confidence_ppiTEPM_prompts.csv \
|
| 163 |
--output_file predictions.csv \
|
| 164 |
--batch_size 4 \
|
| 165 |
--max_length 1024 \
|