Fine-tuning training parameters

⚠️

Check This First!

This article refers to BaseModel accessed via Docker container. Please refer to Snowflake Native App section if you are using BaseModel as SF GUI application.


Training parameters defined at foundation model training stage get loaded and are used by default when training the scenario model. Thus, the scenario model target location (the checkpoint_dir parameter) is the only mandatory parameter in scenario model training script.

However, all stored constructor parameters for PyTorch Lightning Trainer can be overwriten by providing them as input to training_params declaration. Please refer to this article for the full list of modifiable parameters.


Example

The example provided below demonstrates training parameters. In addition to specifying the scenario model location, some parameters have been overwritten or added.

training_params = TrainingParams(
    checkpoint_dir='/location/to/save/your/scenario/model'
    epochs=1,
    learning_rate=0.0005,
    overwrite=True,
    devices=[2],
    limit_train_batches=10
)