Skip to content

Commit fca8c30

Browse files
committed
add py script to export constants to json
1 parent 1b1d7b7 commit fca8c30

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import json
2+
3+
import chebai.preprocessing.reader as dr
4+
5+
# Define the constants you want to export
6+
constants = {
7+
"EMBEDDING_OFFSET": dr.EMBEDDING_OFFSET,
8+
"CLS_TOKEN": dr.CLS_TOKEN,
9+
"PADDING_TOKEN_INDEX": dr.PADDING_TOKEN_INDEX,
10+
"MASK_TOKEN_INDEX": dr.MASK_TOKEN_INDEX,
11+
}
12+
13+
# Write constants to a JSON file
14+
with open("constants.json", "w") as f:
15+
json.dump(constants, f)

0 commit comments

Comments
 (0)