Skip to main content

plugins.hf_seq_classification.module_classes

HfSeqClassificationModule Objects#

class HfSeqClassificationModule(PluginModuleInterface)

Task specific ModuleInterface used with a trainer. The data and model properties must be set.

Arguments:

  • ModuleInterface [type] - [description]

__init__#

def __init__(args: ModuleInterfaceArguments,
data: HfSeqClassificationDataInterface)

Initialize training module.

Arguments:

  • args arguments.ModuleArguments - Dataclass
  • data HfSeqClassificationDataInterface - PyMarlin data interfsce

on_end_val_epoch#

@rank_zero_only
def on_end_val_epoch(global_step, *values, key="default")

Compute metrics at the end of each val epoch. Metric function is specified by args.metric. values contains all values returned by val_step all_gathered over all processes and all steps