micm_nlp.training

Training: the run driver, Trainer subclasses, callbacks, collators and batching.

  • runner — TRAINER: builds the HuggingFace Trainer from the config — arguments, collator, callbacks, evaluation — and runs it.

  • run_output — RunOutput: the run’s output directory, the resolved config.yml, info.json and the model / wandb links. The trainer is the only writer.

  • trainers — CustomTrainerMixin and RandomTaskExclusionBatchSampler; custom_trainer_class_factory mixes the former into whichever Trainer class trainer.cls names.

  • callbacks — CustomEarlyStoppingCallback, ParamNormLogger, NormalizePromptEncoderEmbeddings, DownstreamFineTuningCallback, EmptyCudaCacheCallback.

  • batching — TokenBudgetBatchSampler and calibrate_token_budget, for batching by token count rather than by row count.

  • data_collators — collators for PLM, seq2seq-with-shifted-labels, and task-id-decorated batches.

  • logits_processors — ConstrainedPrefixLogitsProcessor, applied at generation time.

Submodules