Skip to content

Commit

Permalink
only import the constants instead of submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya0by0 committed Oct 30, 2024
1 parent 37ce960 commit aad1bca
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/export_constants.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import json

import chebai.preprocessing.reader as dr
from chebai.preprocessing.reader import (
CLS_TOKEN,
EMBEDDING_OFFSET,
MASK_TOKEN_INDEX,
PADDING_TOKEN_INDEX,
)

# Define the constants you want to export
constants = {
"EMBEDDING_OFFSET": dr.EMBEDDING_OFFSET,
"CLS_TOKEN": dr.CLS_TOKEN,
"PADDING_TOKEN_INDEX": dr.PADDING_TOKEN_INDEX,
"MASK_TOKEN_INDEX": dr.MASK_TOKEN_INDEX,
"EMBEDDING_OFFSET": EMBEDDING_OFFSET,
"CLS_TOKEN": CLS_TOKEN,
"PADDING_TOKEN_INDEX": PADDING_TOKEN_INDEX,
"MASK_TOKEN_INDEX": MASK_TOKEN_INDEX,
}

# Write constants to a JSON file
Expand Down

0 comments on commit aad1bca

Please sign in to comment.