Open shitlesh opened 1 week ago
Thanks, I'm not sure which script you are talking about about. Note that those related to BERT, where meant as customizations to address specific limitations in the Google code they are based on (i.e., not meant to be general replacements).
In addition, the Tensorflow-based API they use is becoming obsolete, so I recommend a solution based on Hugging Face.
Without a proper configuration for hyperparameters, users are forced to hardcode values or manually modify the script each time they need to adjust parameters for different environments or experiments.
Extend the config.py file to include additional hyperparameters for machine learning tasks, such as MAX_SEQ_LENGTH, BATCH_SIZE, LEARNING_RATE, and EPOCHS. These hyperparameters should be configurable through environment variables, providing both default values and the flexibility to override them dynamically.
Example Code:
Hyperparameters
MAX_SEQ_LENGTH = system.getenv_int( "MAX_SEQ_LENGTH", 128, description="Maximum sequence length for training")
BATCH_SIZE = system.getenv_int( "BATCH_SIZE", 32, description="Batch size for training")
LEARNING_RATE = system.getenv_float( "LEARNING_RATE", 3e-5, description="Learning rate for optimizer")
EPOCHS = system.getenv_int( "EPOCHS", 10, description="Number of epochs for training")