peal.adaptors.group_distributionally_robust_optimization.GroupDROConfig

class peal.adaptors.group_distributionally_robust_optimization.GroupDROConfig[source]

Bases: AdaptorConfig

Config template for running the DRO adaptor.

Methods

Attributes

adaptor_type

The config template for an adaptor

alpha

btl

gamma

generalization_adjustment

is_robust

Parameters for the Gorup_DRO loss computer

kwargs

A dict containing all variables that could not be given with the current config structure

minimum_variational_weight

model_path

The path where the model is to be stored.

predictor

The config of the predictor to be adapted.

replication_dataset

Use paper's datasets.

reset_weights

Resets weights of the model if true.

reweight_groups

Reweights groups during training so the training set is balanced.

robust_step_size

scheduler

Use ReduceLROnPlateau scheduler if true.

seed

Sets the seed of the run.

use_normalized_loss

adaptor_type: str = 'GroupDRO'

The config template for an adaptor

predictor: PredictorConfig = None

The config of the predictor to be adapted.

is_robust: bool = False

Parameters for the Gorup_DRO loss computer

alpha: float = None
gamma: float = 0.1
generalization_adjustment: float = 0.0
minimum_variational_weight: float = 0.0
robust_step_size: float = 0.01
use_normalized_loss: bool = False
btl: bool = False
reweight_groups: bool = False

Reweights groups during training so the training set is balanced.

replication_dataset: str = None

Use paper’s datasets. Only accepts “celebA”, “waterbirds” and None, with None indicating to not use the paper’s datasets, but rather the one specified in predictor’s data config.

reset_weights: bool = True

Resets weights of the model if true.

scheduler: bool = False

Use ReduceLROnPlateau scheduler if true.

model_path: str = None

The path where the model is to be stored. Explicitly overwrites model_path in predictor.

seed: int = 0

Sets the seed of the run. Expliticly overwrites the seed parameter in predictor.

kwargs: dict = {}

A dict containing all variables that could not be given with the current config structure