peal.training.interfaces.TrainingConfig¶
- class peal.training.interfaces.TrainingConfig[source]¶
Bases:
BaseModelHyper-parameters and switches of one predictor training run.
Besides
max_epochs,learning_rate,dropout,optimizerand the three batch sizes, the config holds theModelTrainerswitches for adversarial training (adv_training,attack_epsilon,attack_num_steps,input_noise_std), mixup and label smoothing, class balancing, diffusion-based augmentation (diffusion_augmentedwithsampling_time_fraction/num_discretization_steps) and theearly_stopping_goalmetric the best checkpoint is picked by.steps_per_epochenables theDataloaderMixerepisode length;epoch,global_train_stepandglobal_validation_stepare counters the trainer and logger increment during training.Methods
Attributes
The dropout rate the model is trained with.
The current epoch of the model training.
Logs how many steps the model was trained with already.
Logs how many steps the model was validated for.
The learning rate the model is trained with.
The learning rate the model is trained with.
DataLoader worker processes for the loaders built from this config.
The optimizer used for training the model.
The number of iterations per episode when using DataloaderMixer.
The test batch size.
The train batch size.
The val batch size.
- max_epochs: pydantic.PositiveInt = 15¶
The learning rate the model is trained with.
- num_workers: int = 0¶
DataLoader worker processes for the loaders built from this config. 0 keeps loading in the training process (the historical behaviour); see
peal.data.dataloaders.resolve_num_workersfor the$PEAL_NUM_WORKERSoverride and the reason the default is conservative.
- train_batch_size: pydantic.PositiveInt = 1¶
The train batch size. Can either be set manually or be left empty and calculated by adaptive batch_size.
- val_batch_size: pydantic.PositiveInt = 1¶
The val batch size. Can either be set manually or be left empty and calculated by adaptive batch_size.
- test_batch_size: pydantic.PositiveInt = 1¶
The test batch size. Can either be set manually or be left empty and calculated by adaptive batch_size.