Upload folder using huggingface_hub
Browse files- README.md +2 -2
- predict.py +2 -2
README.md
CHANGED
|
@@ -4,7 +4,7 @@ tags:
|
|
| 4 |
- enzyme
|
| 5 |
- leaderboard
|
| 6 |
---
|
| 7 |
-
# Enzyme classification: DIAMOND homology + learned EC re-ranker (
|
| 8 |
|
| 9 |
Submission for the Leak CURBER enzyme classification task (`leak-curber-enzyme-classification`). Only the provided `train.parquet` is used. No external labelled data.
|
| 10 |
|
|
@@ -40,7 +40,7 @@ These numbers cover queries that have at least one hit. About 5% of held-out que
|
|
| 40 |
- Tested under `ulimit -f 16384 -n 256 -u 128 -s 10240`: the output is identical to an unrestricted run, in about 3 minutes.
|
| 41 |
- `predict.py` logs environment diagnostics: CPU flags, memory and process limits, and mounts.
|
| 42 |
- Each DIAMOND binary is smoke-tested before use: first the official release binary, then a generic, fully static build of DIAMOND v2.1.10 (`bin/diamond-generic`, compiled with `-march=x86-64`). A crash is logged with its signal.
|
| 43 |
-
- A watchdog stops DIAMOND at 420 s.
|
| 44 |
- If DIAMOND cannot run, a pure numpy/scipy 3-mer TF-IDF nearest-neighbour fallback (`kmer_knn.py`) predicts every input. It scores about 0.39 L4 locally.
|
| 45 |
|
| 46 |
## Runtime
|
|
|
|
| 4 |
- enzyme
|
| 5 |
- leaderboard
|
| 6 |
---
|
| 7 |
+
# Enzyme classification: DIAMOND homology + learned EC re-ranker (v6)
|
| 8 |
|
| 9 |
Submission for the Leak CURBER enzyme classification task (`leak-curber-enzyme-classification`). Only the provided `train.parquet` is used. No external labelled data.
|
| 10 |
|
|
|
|
| 40 |
- Tested under `ulimit -f 16384 -n 256 -u 128 -s 10240`: the output is identical to an unrestricted run, in about 3 minutes.
|
| 41 |
- `predict.py` logs environment diagnostics: CPU flags, memory and process limits, and mounts.
|
| 42 |
- Each DIAMOND binary is smoke-tested before use: first the official release binary, then a generic, fully static build of DIAMOND v2.1.10 (`bin/diamond-generic`, compiled with `-march=x86-64`). A crash is logged with its signal.
|
| 43 |
+
- A watchdog stops DIAMOND at 420 s. In v6 the ultra-sensitive second pass runs when the first pass finishes within 215 s. Under the sandbox limits the whole run takes about 300 s.
|
| 44 |
- If DIAMOND cannot run, a pure numpy/scipy 3-mer TF-IDF nearest-neighbour fallback (`kmer_knn.py`) predicts every input. It scores about 0.39 L4 locally.
|
| 45 |
|
| 46 |
## Runtime
|
predict.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
"""Offline CPU inference: DIAMOND homology search + learned EC re-ranker (
|
| 2 |
|
| 3 |
1. Search every unique input against the training set (diamond blastp
|
| 4 |
--very-sensitive, 50 hits).
|
|
@@ -253,7 +253,7 @@ def homology_predictions(seqs, labels, freq):
|
|
| 253 |
weak = [i for i in range(n) if i not in hits or hits[i][0][1] <= WEAK_PID]
|
| 254 |
log(f'main search ({mode}, {cfg[0][0]}) done: {len(hits)}/{n} with hits, {len(weak)} weak')
|
| 255 |
# The second pass costs about as much as the first, so run it only with a wide margin.
|
| 256 |
-
if weak and len(weak) <= 3000 and t1 <
|
| 257 |
try:
|
| 258 |
extra = run_diamond(write_chunks(((i, seqs[i]) for i in weak), workdir, 'b'),
|
| 259 |
'ultra-sensitive', cfg, workdir)
|
|
|
|
| 1 |
+
"""Offline CPU inference: DIAMOND homology search + learned EC re-ranker (v6).
|
| 2 |
|
| 3 |
1. Search every unique input against the training set (diamond blastp
|
| 4 |
--very-sensitive, 50 hits).
|
|
|
|
| 253 |
weak = [i for i in range(n) if i not in hits or hits[i][0][1] <= WEAK_PID]
|
| 254 |
log(f'main search ({mode}, {cfg[0][0]}) done: {len(hits)}/{n} with hits, {len(weak)} weak')
|
| 255 |
# The second pass costs about as much as the first, so run it only with a wide margin.
|
| 256 |
+
if weak and len(weak) <= 3000 and t1 < 215 and cfg[0][0] == 'official':
|
| 257 |
try:
|
| 258 |
extra = run_diamond(write_chunks(((i, seqs[i]) for i in weak), workdir, 'b'),
|
| 259 |
'ultra-sensitive', cfg, workdir)
|