version: "3.8" services: bert_classifier: container_name: bert_classifier image: heartexlabs/label-studio-ml-backend:bertclass-master build: context: . args: TEST_ENV: ${TEST_ENV} environment: # Essential Training Settings # Controls how much the model updates its weights in response to errors # - Lower (1e-5): More stable but slower learning # - Higher (3e-5): Faster learning but might be unstable # - Default (2e-5): Good balance for BERT fine-tuning - LEARNING_RATE=2e-5 # Number of complete passes through the training data # - Lower (1): Faster training but might underfit # - Higher (3+): Better learning but might overfit # - Default (2): Good balance for small datasets - NUM_TRAIN_EPOCHS=3 # Prevents model weights from growing too large (regularization) # - Lower (0.001): Less regularization, might overfit # - Higher (0.1): More regularization, might underfit # - Default (0.01): Standard value for BERT fine-tuning - WEIGHT_DECAY=0.01 # Number of annotations before starting training # - Set to 1 for testing (train after each annotation) # - Recommended (5-10) for production (more stable training) - START_TRAINING_EACH_N_UPDATES=1 ports: - "9090:9090" volumes: - "./data/server:/data" - "./data/.cache:/root/.cache"