Skip to content

Commit aad1bca

Browse files
committed
only import the constants instead of submodule
1 parent 37ce960 commit aad1bca

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/export_constants.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
import json
22

3-
import chebai.preprocessing.reader as dr
3+
from chebai.preprocessing.reader import (
4+
CLS_TOKEN,
5+
EMBEDDING_OFFSET,
6+
MASK_TOKEN_INDEX,
7+
PADDING_TOKEN_INDEX,
8+
)
49

510
# Define the constants you want to export
611
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,
12+
"EMBEDDING_OFFSET": EMBEDDING_OFFSET,
13+
"CLS_TOKEN": CLS_TOKEN,
14+
"PADDING_TOKEN_INDEX": PADDING_TOKEN_INDEX,
15+
"MASK_TOKEN_INDEX": MASK_TOKEN_INDEX,
1116
}
1217

1318
# Write constants to a JSON file

0 commit comments

Comments
 (0)