class_docstr: This class mirrors deepspeed functionality. Not all changes are implemented in this version.
  
  See TorchEngineFull for more modifications.
class_docstr_tok: ["This","class","mirrors","deepspeed","functionality",".","Not","all","changes","are","implemented","in","this","version",".","See","TorchEngineFull","for","more","modifications","."]
docstr: Optionally implement linear sequence lengths curriculum.
docstr_tok: ["Optionally","implement","linear","sequence","lengths","curriculum","."]
code: def schedule_curriculum(self):
      """Optionally implement linear sequence lengths curriculum."""
      if self.sequence_curriculum:
          # Sequence curriculum should be a dict of two lists:
          # lengths (needs to be monotone ascending integers)
          # triggers (needs to be monotone ascending floats between 0 and 1)
          # and a keyword unfold = True/False
          elapsed_hours = (time.time() - self.initial_time) / 60 / 60
          fraction_elapsed = elapsed_hours / self.cfg_train.budget
          lengths = self.cfg_train.sequence_curriculum.lengths
          triggers = self.cfg_train.sequence_curriculum.triggers
          for trigger, length in zip(triggers, lengths):
              if fraction_elapsed > trigger:
                  self.current_seq_length = length
  
imports: import torch
  import torch._inductor.utils
  import os
  import json
  from omegaconf import OmegaConf
  from functools import partial
  from contextlib import nullcontext
  import time
  import logging
  import transformers
  from safetensors.torch import load_file, save_file
  from transformers.utils.generic import working_or_temp_dir
  from torch.distributed.optim import ZeroRedundancyOptimizer
  from .utils import group_parameters, prepare_pretraining_dataloader, update_ema, updated_latest_weight_average
  from .optimizers.schedulers import get_schedule_fn
  from .optimizers import Adahessian, AdamWScale, Shampoo, LARS, SAM, ProgressiveBatching, AGD, Sophia
  import warnings
label_desc: Use image node_id 5 for calling the TorchEngineFull obj's underlying member method code with example usage: obj.schedule_curriculum() without return types