omnigenome 0.3.1a0__py3-none-any.whl → 0.3.3a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of omnigenome might be problematic. Click here for more details.
- omnigenome/__init__.py +252 -266
- {omnigenome-0.3.1a0.dist-info → omnigenome-0.3.3a0.dist-info}/METADATA +9 -9
- omnigenome-0.3.3a0.dist-info/RECORD +7 -0
- omnigenome/auto/__init__.py +0 -3
- omnigenome/auto/auto_bench/__init__.py +0 -11
- omnigenome/auto/auto_bench/auto_bench.py +0 -494
- omnigenome/auto/auto_bench/auto_bench_cli.py +0 -230
- omnigenome/auto/auto_bench/auto_bench_config.py +0 -216
- omnigenome/auto/auto_bench/config_check.py +0 -34
- omnigenome/auto/auto_train/__init__.py +0 -12
- omnigenome/auto/auto_train/auto_train.py +0 -429
- omnigenome/auto/auto_train/auto_train_cli.py +0 -222
- omnigenome/auto/bench_hub/__init__.py +0 -11
- omnigenome/auto/bench_hub/bench_hub.py +0 -25
- omnigenome/cli/__init__.py +0 -12
- omnigenome/cli/commands/__init__.py +0 -12
- omnigenome/cli/commands/base.py +0 -83
- omnigenome/cli/commands/bench/__init__.py +0 -12
- omnigenome/cli/commands/bench/bench_cli.py +0 -202
- omnigenome/cli/commands/rna/__init__.py +0 -12
- omnigenome/cli/commands/rna/rna_design.py +0 -177
- omnigenome/cli/omnigenome_cli.py +0 -128
- omnigenome/src/__init__.py +0 -11
- omnigenome/src/abc/__init__.py +0 -11
- omnigenome/src/abc/abstract_dataset.py +0 -641
- omnigenome/src/abc/abstract_metric.py +0 -114
- omnigenome/src/abc/abstract_model.py +0 -690
- omnigenome/src/abc/abstract_tokenizer.py +0 -269
- omnigenome/src/dataset/__init__.py +0 -16
- omnigenome/src/dataset/omni_dataset.py +0 -437
- omnigenome/src/lora/__init__.py +0 -12
- omnigenome/src/lora/lora_model.py +0 -300
- omnigenome/src/metric/__init__.py +0 -15
- omnigenome/src/metric/classification_metric.py +0 -184
- omnigenome/src/metric/metric.py +0 -199
- omnigenome/src/metric/ranking_metric.py +0 -142
- omnigenome/src/metric/regression_metric.py +0 -191
- omnigenome/src/misc/__init__.py +0 -3
- omnigenome/src/misc/utils.py +0 -503
- omnigenome/src/model/__init__.py +0 -19
- omnigenome/src/model/augmentation/__init__.py +0 -11
- omnigenome/src/model/augmentation/model.py +0 -219
- omnigenome/src/model/classification/__init__.py +0 -11
- omnigenome/src/model/classification/model.py +0 -638
- omnigenome/src/model/embedding/__init__.py +0 -11
- omnigenome/src/model/embedding/model.py +0 -263
- omnigenome/src/model/mlm/__init__.py +0 -11
- omnigenome/src/model/mlm/model.py +0 -177
- omnigenome/src/model/module_utils.py +0 -232
- omnigenome/src/model/regression/__init__.py +0 -11
- omnigenome/src/model/regression/model.py +0 -781
- omnigenome/src/model/regression/resnet.py +0 -483
- omnigenome/src/model/rna_design/__init__.py +0 -11
- omnigenome/src/model/rna_design/model.py +0 -476
- omnigenome/src/model/seq2seq/__init__.py +0 -11
- omnigenome/src/model/seq2seq/model.py +0 -44
- omnigenome/src/tokenizer/__init__.py +0 -16
- omnigenome/src/tokenizer/bpe_tokenizer.py +0 -226
- omnigenome/src/tokenizer/kmers_tokenizer.py +0 -247
- omnigenome/src/tokenizer/single_nucleotide_tokenizer.py +0 -249
- omnigenome/src/trainer/__init__.py +0 -14
- omnigenome/src/trainer/accelerate_trainer.py +0 -747
- omnigenome/src/trainer/hf_trainer.py +0 -75
- omnigenome/src/trainer/trainer.py +0 -591
- omnigenome/utility/__init__.py +0 -3
- omnigenome/utility/dataset_hub/__init__.py +0 -12
- omnigenome/utility/dataset_hub/dataset_hub.py +0 -178
- omnigenome/utility/ensemble.py +0 -324
- omnigenome/utility/hub_utils.py +0 -517
- omnigenome/utility/model_hub/__init__.py +0 -11
- omnigenome/utility/model_hub/model_hub.py +0 -232
- omnigenome/utility/pipeline_hub/__init__.py +0 -11
- omnigenome/utility/pipeline_hub/pipeline.py +0 -483
- omnigenome/utility/pipeline_hub/pipeline_hub.py +0 -129
- omnigenome-0.3.1a0.dist-info/RECORD +0 -78
- {omnigenome-0.3.1a0.dist-info → omnigenome-0.3.3a0.dist-info}/WHEEL +0 -0
- {omnigenome-0.3.1a0.dist-info → omnigenome-0.3.3a0.dist-info}/entry_points.txt +0 -0
- {omnigenome-0.3.1a0.dist-info → omnigenome-0.3.3a0.dist-info}/licenses/LICENSE +0 -0
- {omnigenome-0.3.1a0.dist-info → omnigenome-0.3.3a0.dist-info}/top_level.txt +0 -0
omnigenome/__init__.py
CHANGED
|
@@ -1,266 +1,252 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# file: __init__.py
|
|
3
|
-
# time: 14:53 06/04/2024
|
|
4
|
-
# author: YANG, HENG <hy345@exeter.ac.uk> (杨恒)
|
|
5
|
-
# github: https://github.com/yangheng95
|
|
6
|
-
# huggingface: https://huggingface.co/yangheng
|
|
7
|
-
# google scholar: https://scholar.google.com/citations?user=NPq5a_0AAAAJ&hl=en
|
|
8
|
-
# Copyright (C) 2019-2024. All Rights Reserved.
|
|
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
|
-
from .auto.auto_bench.
|
|
41
|
-
from .auto.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
from .
|
|
45
|
-
from .
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
from .src.abc.
|
|
52
|
-
from .src.abc.
|
|
53
|
-
from .src.abc.
|
|
54
|
-
from .src.abc.abstract_tokenizer import OmniTokenizer
|
|
55
|
-
|
|
56
|
-
# Import dataset classes
|
|
57
|
-
from .src.dataset.omni_dataset import
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
from .
|
|
104
|
-
|
|
105
|
-
# Import
|
|
106
|
-
from .
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
from .
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
from .
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
from .src.model import
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
""
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
art_dna_color_map = {
|
|
254
|
-
"*": "blue", # Bases represented by '*'
|
|
255
|
-
"@": "white", # Bases represented by '@'
|
|
256
|
-
"-": "yellow", # Hydrogen bonds, assuming '-' represents a bond
|
|
257
|
-
"=": "light_cyan", # Hydrogen bonds, assuming '=' represents a bond
|
|
258
|
-
"+": "yellow", # '+' symbols in cyan
|
|
259
|
-
" ": "black", # Use red for undefined characters
|
|
260
|
-
}
|
|
261
|
-
import random
|
|
262
|
-
|
|
263
|
-
LOGO = random.choice([LOGO1, LOGO2])
|
|
264
|
-
print(LOGO)
|
|
265
|
-
|
|
266
|
-
clean_temp_dir_pt_files()
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# file: __init__.py
|
|
3
|
+
# time: 14:53 06/04/2024
|
|
4
|
+
# author: YANG, HENG <hy345@exeter.ac.uk> (杨恒)
|
|
5
|
+
# github: https://github.com/yangheng95
|
|
6
|
+
# huggingface: https://huggingface.co/yangheng
|
|
7
|
+
# google scholar: https://scholar.google.com/citations?user=NPq5a_0AAAAJ&hl=en
|
|
8
|
+
# Copyright (C) 2019-2024. All Rights Reserved.
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
OmniGenome - Alias package for omnigenbench
|
|
12
|
+
===========================================
|
|
13
|
+
|
|
14
|
+
This package provides the same functionality as omnigenbench but with the omnigenome name.
|
|
15
|
+
All imports are redirected to the omnigenbench package.
|
|
16
|
+
|
|
17
|
+
For backward compatibility, this package maintains the same API as omnigenbench.
|
|
18
|
+
"""
|
|
19
|
+
from omnigenbench import __version__
|
|
20
|
+
|
|
21
|
+
# Package metadata (define locally to avoid circular imports)
|
|
22
|
+
__name__ = "omnigenome"
|
|
23
|
+
__version__ = __version__
|
|
24
|
+
__author__ = "Yang, Heng"
|
|
25
|
+
__email__ = "yangheng2021@gmail.com"
|
|
26
|
+
__license__ = "Apache-2.0"
|
|
27
|
+
|
|
28
|
+
import warnings
|
|
29
|
+
|
|
30
|
+
warnings.warn(
|
|
31
|
+
"The 'omnigenome' package is deprecated, please use omnigenbench package instead. "
|
|
32
|
+
"e.g., from omnigenome import * -> from omnigenbench import *\n"
|
|
33
|
+
"All imports from omnigenome will be redirected to omnigenbench. ",
|
|
34
|
+
DeprecationWarning,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
# Import strategy: Try to import from omnigenbench with proper error handling
|
|
38
|
+
try:
|
|
39
|
+
# Import core auto components
|
|
40
|
+
from omnigenbench.auto.auto_bench.auto_bench import AutoBench
|
|
41
|
+
from omnigenbench.auto.config.auto_config import AutoConfig
|
|
42
|
+
from omnigenbench.auto.bench_hub.bench_hub import BenchHub
|
|
43
|
+
from omnigenbench.auto.auto_train.auto_train import AutoTrain
|
|
44
|
+
from omnigenbench.auto.auto_bench.auto_bench_cli import run_bench, bench_command
|
|
45
|
+
from omnigenbench.auto.auto_train.auto_train_cli import run_train, train_command
|
|
46
|
+
|
|
47
|
+
# Import source modules
|
|
48
|
+
from omnigenbench.src import dataset, metric, model, tokenizer
|
|
49
|
+
|
|
50
|
+
# Import abstract base classes
|
|
51
|
+
from omnigenbench.src.abc.abstract_dataset import OmniDataset
|
|
52
|
+
from omnigenbench.src.abc.abstract_metric import OmniMetric
|
|
53
|
+
from omnigenbench.src.abc.abstract_model import OmniModel
|
|
54
|
+
from omnigenbench.src.abc.abstract_tokenizer import OmniTokenizer
|
|
55
|
+
|
|
56
|
+
# Import dataset classes
|
|
57
|
+
from omnigenbench.src.dataset.omni_dataset import (
|
|
58
|
+
OmniDatasetForSequenceClassification,
|
|
59
|
+
OmniDatasetForSequenceRegression,
|
|
60
|
+
OmniDatasetForTokenClassification,
|
|
61
|
+
OmniDatasetForTokenRegression,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# Import metric classes
|
|
65
|
+
from omnigenbench.src.metric import (
|
|
66
|
+
ClassificationMetric,
|
|
67
|
+
RegressionMetric,
|
|
68
|
+
RankingMetric,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Import utility functions
|
|
72
|
+
from omnigenbench.src.misc.utils import (
|
|
73
|
+
clean_temp_dir_pt_files,
|
|
74
|
+
fprint,
|
|
75
|
+
seed_everything,
|
|
76
|
+
save_args,
|
|
77
|
+
naive_secondary_structure_repair,
|
|
78
|
+
check_bench_version,
|
|
79
|
+
clean_temp_checkpoint,
|
|
80
|
+
print_args,
|
|
81
|
+
env_meta_info,
|
|
82
|
+
RNA2StructureCache,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# Import model classes
|
|
86
|
+
from omnigenbench.src.model import (
|
|
87
|
+
OmniModelForSequenceClassification,
|
|
88
|
+
OmniModelForMultiLabelSequenceClassification,
|
|
89
|
+
OmniModelForTokenClassification,
|
|
90
|
+
OmniModelForSequenceRegression,
|
|
91
|
+
OmniModelForTokenRegression,
|
|
92
|
+
OmniModelForStructuralImputation,
|
|
93
|
+
OmniModelForMatrixRegression,
|
|
94
|
+
OmniModelForMatrixClassification,
|
|
95
|
+
OmniModelForMLM,
|
|
96
|
+
OmniModelForSeq2Seq,
|
|
97
|
+
OmniModelForRNADesign,
|
|
98
|
+
OmniModelForEmbedding,
|
|
99
|
+
OmniModelForAugmentation,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Import LoRA model
|
|
103
|
+
from omnigenbench.src.lora.lora_model import OmniLoraModel
|
|
104
|
+
|
|
105
|
+
# Import tokenizer classes
|
|
106
|
+
from omnigenbench.src.tokenizer import (
|
|
107
|
+
OmniBPETokenizer,
|
|
108
|
+
OmniKmersTokenizer,
|
|
109
|
+
OmniSingleNucleotideTokenizer,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
# Import trainer classes
|
|
113
|
+
from omnigenbench.src.trainer.hf_trainer import HFTrainer
|
|
114
|
+
from omnigenbench.src.trainer.trainer import Trainer
|
|
115
|
+
from omnigenbench.src.trainer.accelerate_trainer import AccelerateTrainer
|
|
116
|
+
|
|
117
|
+
# Import hub utilities
|
|
118
|
+
from omnigenbench.utility.hub_utils import (
|
|
119
|
+
download_benchmark,
|
|
120
|
+
download_model,
|
|
121
|
+
download_pipeline,
|
|
122
|
+
query_models_info,
|
|
123
|
+
)
|
|
124
|
+
from omnigenbench.utility import hub_utils
|
|
125
|
+
|
|
126
|
+
# Import hub classes
|
|
127
|
+
from omnigenbench.utility.model_hub.model_hub import ModelHub
|
|
128
|
+
from omnigenbench.utility.dataset_hub.dataset_hub import load_benchmark_datasets
|
|
129
|
+
from omnigenbench.utility.pipeline_hub.pipeline import Pipeline
|
|
130
|
+
from omnigenbench.utility.pipeline_hub.pipeline_hub import PipelineHub
|
|
131
|
+
|
|
132
|
+
# Import module utilities
|
|
133
|
+
from omnigenbench.src.model.module_utils import OmniPooling
|
|
134
|
+
from omnigenbench.utility.ensemble import VoteEnsemblePredictor
|
|
135
|
+
|
|
136
|
+
# For backward compatibility version 0.2.7alpha and earlier
|
|
137
|
+
from omnigenbench.auto.config.auto_config import AutoBenchConfig
|
|
138
|
+
|
|
139
|
+
# Create backward compatibility aliases
|
|
140
|
+
OmniGenomeTokenizer = OmniTokenizer
|
|
141
|
+
OmniGenomeKmersTokenizer = OmniKmersTokenizer
|
|
142
|
+
OmniGenomeSingleNucleotideTokenizer = OmniSingleNucleotideTokenizer
|
|
143
|
+
OmniGenomeBPETokenizer = OmniBPETokenizer
|
|
144
|
+
OmniGenomeDataset = OmniDataset
|
|
145
|
+
OmniGenomeMetric = OmniMetric
|
|
146
|
+
OmniGenomeModel = OmniModel
|
|
147
|
+
OmniGenomeDatasetForSequenceClassification = OmniDatasetForSequenceClassification
|
|
148
|
+
OmniGenomeDatasetForSequenceRegression = OmniDatasetForSequenceRegression
|
|
149
|
+
OmniGenomeDatasetForTokenClassification = OmniDatasetForTokenClassification
|
|
150
|
+
OmniGenomeDatasetForTokenRegression = OmniDatasetForTokenRegression
|
|
151
|
+
OmniGenomeLoraModel = OmniLoraModel
|
|
152
|
+
OmniGenomeModelForSequenceClassification = OmniModelForSequenceClassification
|
|
153
|
+
OmniGenomeModelForMultiLabelSequenceClassification = (
|
|
154
|
+
OmniModelForMultiLabelSequenceClassification
|
|
155
|
+
)
|
|
156
|
+
OmniGenomeModelForTokenClassification = OmniModelForTokenClassification
|
|
157
|
+
OmniGenomeModelForSequenceRegression = OmniModelForSequenceRegression
|
|
158
|
+
OmniGenomeModelForTokenRegression = OmniModelForTokenRegression
|
|
159
|
+
OmniGenomeModelForStructuralImputation = OmniModelForStructuralImputation
|
|
160
|
+
OmniGenomeModelForMatrixRegression = OmniModelForMatrixRegression
|
|
161
|
+
OmniGenomeModelForMatrixClassification = OmniModelForMatrixClassification
|
|
162
|
+
OmniGenomeModelForMLM = OmniModelForMLM
|
|
163
|
+
OmniGenomeModelForSeq2Seq = OmniModelForSeq2Seq
|
|
164
|
+
OmniGenomeModelForRNADesign = OmniModelForRNADesign
|
|
165
|
+
OmniGenomeModelForEmbedding = OmniModelForEmbedding
|
|
166
|
+
OmniGenomeModelForAugmentation = OmniModelForAugmentation
|
|
167
|
+
|
|
168
|
+
# Define __all__ for explicit exports
|
|
169
|
+
__all__ = [
|
|
170
|
+
"load_benchmark_datasets",
|
|
171
|
+
"OmniDataset",
|
|
172
|
+
"OmniModel",
|
|
173
|
+
"OmniMetric",
|
|
174
|
+
"OmniTokenizer",
|
|
175
|
+
"OmniKmersTokenizer",
|
|
176
|
+
"OmniSingleNucleotideTokenizer",
|
|
177
|
+
"OmniBPETokenizer",
|
|
178
|
+
"ModelHub",
|
|
179
|
+
"Pipeline",
|
|
180
|
+
"PipelineHub",
|
|
181
|
+
"BenchHub",
|
|
182
|
+
"AutoBench",
|
|
183
|
+
"AutoTrain",
|
|
184
|
+
"AutoConfig",
|
|
185
|
+
"ClassificationMetric",
|
|
186
|
+
"RegressionMetric",
|
|
187
|
+
"RankingMetric",
|
|
188
|
+
"Trainer",
|
|
189
|
+
"HFTrainer",
|
|
190
|
+
"AccelerateTrainer",
|
|
191
|
+
"AutoBenchConfig",
|
|
192
|
+
"download_benchmark",
|
|
193
|
+
"download_model",
|
|
194
|
+
"download_pipeline",
|
|
195
|
+
"VoteEnsemblePredictor",
|
|
196
|
+
"clean_temp_dir_pt_files",
|
|
197
|
+
"fprint",
|
|
198
|
+
"seed_everything",
|
|
199
|
+
"save_args",
|
|
200
|
+
"naive_secondary_structure_repair",
|
|
201
|
+
"check_bench_version",
|
|
202
|
+
"clean_temp_checkpoint",
|
|
203
|
+
"print_args",
|
|
204
|
+
"env_meta_info",
|
|
205
|
+
"RNA2StructureCache",
|
|
206
|
+
# OmniGenome* aliases for backward compatibility
|
|
207
|
+
"OmniGenomeTokenizer",
|
|
208
|
+
"OmniGenomeKmersTokenizer",
|
|
209
|
+
"OmniGenomeSingleNucleotideTokenizer",
|
|
210
|
+
"OmniGenomeBPETokenizer",
|
|
211
|
+
"OmniGenomeDataset",
|
|
212
|
+
"OmniGenomeMetric",
|
|
213
|
+
"OmniGenomeModel",
|
|
214
|
+
"OmniGenomeDatasetForSequenceClassification",
|
|
215
|
+
"OmniGenomeDatasetForSequenceRegression",
|
|
216
|
+
"OmniGenomeDatasetForTokenClassification",
|
|
217
|
+
"OmniGenomeDatasetForTokenRegression",
|
|
218
|
+
"OmniGenomeLoraModel",
|
|
219
|
+
"OmniGenomeModelForSequenceClassification",
|
|
220
|
+
"OmniGenomeModelForMultiLabelSequenceClassification",
|
|
221
|
+
"OmniGenomeModelForTokenClassification",
|
|
222
|
+
"OmniGenomeModelForSequenceRegression",
|
|
223
|
+
"OmniGenomeModelForTokenRegression",
|
|
224
|
+
"OmniGenomeModelForStructuralImputation",
|
|
225
|
+
"OmniGenomeModelForMatrixRegression",
|
|
226
|
+
"OmniGenomeModelForMatrixClassification",
|
|
227
|
+
"OmniGenomeModelForMLM",
|
|
228
|
+
"OmniGenomeModelForSeq2Seq",
|
|
229
|
+
"OmniGenomeModelForRNADesign",
|
|
230
|
+
"OmniGenomeModelForEmbedding",
|
|
231
|
+
"OmniGenomeModelForAugmentation",
|
|
232
|
+
# Command line functions
|
|
233
|
+
"run_bench",
|
|
234
|
+
"bench_command",
|
|
235
|
+
"run_train",
|
|
236
|
+
"train_command",
|
|
237
|
+
]
|
|
238
|
+
|
|
239
|
+
except ImportError as e:
|
|
240
|
+
import warnings
|
|
241
|
+
|
|
242
|
+
warnings.warn(
|
|
243
|
+
f"Failed to import omnigenbench modules: {e}. "
|
|
244
|
+
"Please ensure omnigenbench is properly installed.\n"
|
|
245
|
+
"You can install it with: pip install omnigenbench\n"
|
|
246
|
+
"and replace all 'omnigenome' with 'omnigenbench' in your code.\n"
|
|
247
|
+
"e.g., from omnigenome import * -> from omnigenbench import *",
|
|
248
|
+
ImportWarning,
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
# Minimal fallback to prevent complete failure
|
|
252
|
+
__all__ = []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omnigenome
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3a0
|
|
4
4
|
Summary: OmniGenome: A comprehensive toolkit for genome analysis.
|
|
5
5
|
Home-page: https://github.com/yangheng95/OmniGenBench
|
|
6
6
|
Author: Yang, Heng
|
|
@@ -20,6 +20,7 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
|
20
20
|
Requires-Python: >=3.10
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
|
+
Requires-Dist: omnigenbench>=0.3.0
|
|
23
24
|
Requires-Dist: findfile>=2.0.0
|
|
24
25
|
Requires-Dist: autocuda>=0.16
|
|
25
26
|
Requires-Dist: metric-visualizer>=0.9.6
|
|
@@ -34,7 +35,6 @@ Requires-Dist: transformers>=4.46.0
|
|
|
34
35
|
Requires-Dist: packaging
|
|
35
36
|
Requires-Dist: peft
|
|
36
37
|
Requires-Dist: dill
|
|
37
|
-
Requires-Dist: accelerate
|
|
38
38
|
Provides-Extra: dev
|
|
39
39
|
Requires-Dist: dill; extra == "dev"
|
|
40
40
|
Requires-Dist: pytest; extra == "dev"
|
|
@@ -54,7 +54,7 @@ Dynamic: summary
|
|
|
54
54
|
|
|
55
55
|

|
|
56
56
|
|
|
57
|
-
<h3 align="center">OmniGenBench
|
|
57
|
+
<h3 align="center">OmniGenBench offers an all-in-one solution for genomic foundation model finetuning, inference, deployment and automated benchmarking, designed for research and applications in genomics.</h3>
|
|
58
58
|
|
|
59
59
|
<div align="center">
|
|
60
60
|
|
|
@@ -104,15 +104,15 @@ Dynamic: summary
|
|
|
104
104
|
## Installation
|
|
105
105
|
|
|
106
106
|
### Requirements
|
|
107
|
-
Before installing
|
|
107
|
+
Before installing OmniGenoBench, you need to install the following dependencies:
|
|
108
108
|
- Python 3.10+
|
|
109
109
|
- PyTorch 2.5+
|
|
110
110
|
- Transformers 4.46.0+
|
|
111
111
|
|
|
112
112
|
### PyPI Installation
|
|
113
|
-
To install
|
|
113
|
+
To install OmniGenoBench, you can use pip:
|
|
114
114
|
```bash
|
|
115
|
-
pip install
|
|
115
|
+
pip install omnigenbench -U
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
### Source Installation
|
|
@@ -136,7 +136,7 @@ You can find a visualization of AutoBench [here](asset/AutoBench.gif).
|
|
|
136
136
|
### Auto-benchmark via Python API
|
|
137
137
|
Or you can use the following python code to run the auto-benchmark:
|
|
138
138
|
```python
|
|
139
|
-
from
|
|
139
|
+
from omnigenbench import AutoBench
|
|
140
140
|
gfm = 'LongSafari/hyenadna-medium-160k-seqlen-hf'
|
|
141
141
|
# benchmark could be "RGB", "GB", "PGB", "GUE", which will be downloaded from the Hugging Face model hub
|
|
142
142
|
benchmark = "RGB"
|
|
@@ -185,7 +185,7 @@ OmniGenBench supports five curated benchmark suites covering both **sequence-lev
|
|
|
185
185
|
### RNA Design
|
|
186
186
|
RNA design is a fundamental problem in synthetic biology,
|
|
187
187
|
where the goal is to design RNA sequences that fold into a target structure.
|
|
188
|
-
In this demo, we show how to use
|
|
188
|
+
In this demo, we show how to use OmniGenoBench to design RNA sequences
|
|
189
189
|
that fold into a target structure using a pre-trained model.
|
|
190
190
|
The tutorials of RNA Design Demo can be found in [RNA_Design_Tutorial.ipynb](examples/rna_design/RNA_Design_Tutorial.ipynb).
|
|
191
191
|
|
|
@@ -195,7 +195,7 @@ You can find a visual example of RNA Design [here](asset/RNA_Design.gif).
|
|
|
195
195
|
|
|
196
196
|
RNA secondary structure prediction is a fundamental problem in computational biology,
|
|
197
197
|
where the goal is to predict the secondary structure of an RNA sequence.
|
|
198
|
-
In this demo, we show how to use
|
|
198
|
+
In this demo, we show how to use OmniGenoBench to predict the secondary structure of RNA sequences using a pre-trained model.
|
|
199
199
|
The tutorials of RNA Secondary Structure Prediction can be found in
|
|
200
200
|
[Secondary_Structure_Prediction_Tutorial.ipynb](examples/rna_secondary_structure_prediction/Secondary_Structure_Prediction_Tutorial.ipynb).
|
|
201
201
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
omnigenome/__init__.py,sha256=Y3th9B_5xrJkzFXgR07FxSWP54NvuxD3XoJ17U5Db7s,9438
|
|
2
|
+
omnigenome-0.3.3a0.dist-info/licenses/LICENSE,sha256=oQoefBV6siHctF0ET-OO3EaSZgtqGtf-wdIAmokS8iY,11560
|
|
3
|
+
omnigenome-0.3.3a0.dist-info/METADATA,sha256=9T-uihVC8WaPa8MuKApPDBHZB9fHqKGP6fAyoMqH2Qg,10314
|
|
4
|
+
omnigenome-0.3.3a0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
|
|
5
|
+
omnigenome-0.3.3a0.dist-info/entry_points.txt,sha256=uu40UgMPxY65ASdRbrhkwH94r7CIYgyG_iDBmqFQbD8,84
|
|
6
|
+
omnigenome-0.3.3a0.dist-info/top_level.txt,sha256=LVFxm_WPaxjj9KnAqdW94W4D4lbOk30gdsaKlJiSzTo,11
|
|
7
|
+
omnigenome-0.3.3a0.dist-info/RECORD,,
|
omnigenome/auto/__init__.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# file: __init__.py
|
|
3
|
-
# time: 18:28 11/04/2024
|
|
4
|
-
# author: YANG, HENG <hy345@exeter.ac.uk> (杨恒)
|
|
5
|
-
# github: https://github.com/yangheng95
|
|
6
|
-
# huggingface: https://huggingface.co/yangheng
|
|
7
|
-
# google scholar: https://scholar.google.com/citations?user=NPq5a_0AAAAJ&hl=en
|
|
8
|
-
# Copyright (C) 2019-2024. All Rights Reserved.
|
|
9
|
-
"""
|
|
10
|
-
This package contains modules for automated benchmarking of models.
|
|
11
|
-
"""
|