We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba800d9 commit 32ff64bCopy full SHA for 32ff64b
.github/workflows/export_constants.py
@@ -0,0 +1,22 @@
1
+import json
2
+
3
+from chebai.preprocessing.reader import (
4
+ CLS_TOKEN,
5
+ EMBEDDING_OFFSET,
6
+ MASK_TOKEN_INDEX,
7
+ PADDING_TOKEN_INDEX,
8
+)
9
10
+# Define the constants you want to export
11
+# Any changes in the key names here should also follow the same change in verify_constants.yml code
12
+constants = {
13
+ "EMBEDDING_OFFSET": EMBEDDING_OFFSET,
14
+ "CLS_TOKEN": CLS_TOKEN,
15
+ "PADDING_TOKEN_INDEX": PADDING_TOKEN_INDEX,
16
+ "MASK_TOKEN_INDEX": MASK_TOKEN_INDEX,
17
+}
18
19
+if __name__ == "__main__":
20
+ # Write constants to a JSON file
21
+ with open("constants.json", "w") as f:
22
+ json.dump(constants, f)
0 commit comments