peal.adaptors.group_dro_v2.GroupDROv2Config¶
- class peal.adaptors.group_dro_v2.GroupDROv2Config[source]¶
Bases:
AdaptorConfigConfig for
GroupDROv2.- Parameters:
model_path (
str) –torch.load-able classifier to repair.base_dir (
str) – Run directory; an existing one is renamed with a timestamp suffix.data (
DataConfig) – Training/validation data, which must provide group labels.unpoisoned_data (
DataConfig, optional) – Second dataset whose test split is used for the unbiased evaluation.training (
TrainingConfig) – Supplieslearning_rate,max_epochs,test_batch_sizeandearly_stopping_goal("worst_group_accuracy"or"average_group_accuracy").task (
TaskConfig) – Task of the classifier, passed on to the test dataloader.alpha (
float, optional) – Tail fraction of the BTL/greedy weighting. Default 0.2.generalization_adjustment (
floatorlistoffloat, optional) – Per-group adjustmentC_g; a scalar is broadcast to all 4 groups.automatic_adjustment (
bool, optional) – Re-estimate the adjustment after every epoch from the train/validation generalization gap.robust_step_size (
float, optional) – Step size of the adversarial weight update. Default 0.01.use_normalized_loss – Forwarded to
GroupDroLossComputer.btl – Forwarded to
GroupDroLossComputer.gamma – Forwarded to
GroupDroLossComputer.minimum_variational_weight – Forwarded to
GroupDroLossComputer.weight_decay (
float, optional) – L2 penalty of the SGD optimizer. Default 5e-5.track_test_acc (
int, optional) – Evaluate on the unpoisoned test split everynepochs;Nonedisables the intermediate test passes.save_intermediate (
bool, optional) – Writecheckpoints/model_epoch<n>.cplafter every epoch.
Methods
Attributes
adaptor_typeThe type of adaptor that shall be used.
- data: DataConfig¶
- unpoisoned_data: DataConfig = None¶
- training: TrainingConfig¶
- task: TaskConfig¶