Commit
•
beb62a4
1
Parent(s):
2e06f1a
Refactored token dictionary loading and encapsulated dictionary (#398)
Browse files- Refactored token dictionary loading and encapsulated dictionary (fad91b8ccc1ad2931ed53fcb30902a04f6f30f90)
Co-authored-by: Madhavan Venkatesh <[email protected]>
- geneformer/mtl/__init__.py +11 -0
geneformer/mtl/__init__.py
CHANGED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ruff: noqa: F401
|
2 |
+
from .. import TOKEN_DICTIONARY_FILE
|
3 |
+
import pickle
|
4 |
+
|
5 |
+
def load_token_dictionary():
|
6 |
+
with open(TOKEN_DICTIONARY_FILE, 'rb') as f:
|
7 |
+
return pickle.load(f)
|
8 |
+
|
9 |
+
TOKEN_DICTIONARY = load_token_dictionary()
|
10 |
+
|
11 |
+
__all__ = ["TOKEN_DICTIONARY"]
|