-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrain.py
More file actions
44 lines (40 loc) · 905 Bytes
/
train.py
File metadata and controls
44 lines (40 loc) · 905 Bytes
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
# -*- coding: utf-8 -*-
"""
Entry script for the Gated Query Pooling (GQP) peptide predictor.
The implementation is split across the gqp package for readability.
"""
from gqp import (
TrainConfig,
set_seed,
resolve_device,
decode_input_ids,
prepare_from_npz,
load_jsonl_sequences,
load_jsonl_multitask,
End2EndClassifier,
train_gqp,
evaluate_gqp,
load_checkpoint,
save_checkpoint,
fit_temperature_and_threshold,
)
from gqp.cli import build_argparser, main
__all__ = [
"TrainConfig",
"set_seed",
"resolve_device",
"decode_input_ids",
"prepare_from_npz",
"load_jsonl_sequences",
"load_jsonl_multitask",
"End2EndClassifier",
"train_gqp",
"evaluate_gqp",
"load_checkpoint",
"save_checkpoint",
"fit_temperature_and_threshold",
"build_argparser",
"main",
]
if __name__ == "__main__":
main()