advsecurenet.trainer package


advsecurenet.trainer.ddp_trainer module

class advsecurenet.trainer.ddp_trainer.DDPTrainer(config: TrainConfig, rank: int, world_size: int)

Bases: DDPBaseTask, Trainer

DDPTrainer module is specialized module for training a model using DistributedDataParallel in a multi-GPU setting.

Parameters:
  • config (TrainConfig) – The train config.

  • rank (int) – The rank of the current process.

  • world_size (int) – The total number of processes.

Examples

>>> trainer = DDPTrainer(config, rank, world_size)
>>> trainer.train()

advsecurenet.trainer.trainer module

class advsecurenet.trainer.trainer.Trainer(config: TrainConfig)

Bases: object

Base trainer module for training a model.

train() None

Public method for training the model.