Correspondance from Legacy to Trainer#

If you are already familiar with the Legacy YAML specification and just want to find out how to specify a specific parameter in the Trainer YAML specification, please refer to the tables below.

eval_input#

Legacy Specification

Trainer Specification

eval_input:
  ...
trainer:
  fit:
    val_dataloader:
      ...
trainer:
  validate:
    val_dataloader:
      ...
trainer:
  validate_all:
    val_dataloaders:
      ...

eval_input.micro_batch_size#

Legacy Specification

Trainer Specification

eval_input:
  micro_batch_size: ...
trainer:
  init:
    callbacks:
    - ScopedValidateFlags:
        csx.performance.micro_batch_size: ...

model#

Legacy Specification

Trainer Specification

model:
  ...
trainer:
  init:
    model:
      ...

model.fp16_type#

Legacy Specification

Trainer Specification

model:
  fp16_type: ...
trainer:
  init:
    precision:
      fp16_type: ...

Note

Some models expect this parameter and thus should be specified under trainer.init.model as well.

model.mixed_precision#

Legacy Specification

Trainer Specification

model:
  mixed_precision: ...
trainer:
  init:
    precision:
      enabled: ...

Note

Some models expect this parameter and thus should be specified under trainer.init.model as well.

optimizer#

Legacy Specification

Trainer Specification

optimizer:
  ...
trainer:
  init:
    optimizer:
      ...

optimizer.grad_accum_steps#

Legacy Specification

Trainer Specification

optimizer:
  grad_accum_steps: ...
trainer:
  init:
    loop:
      grad_accum_steps: ...

optimizer.initial_loss_scale#

Legacy Specification

Trainer Specification

optimizer:
  initial_loss_scale: ...
trainer:
  init:
    precision:
      initial_loss_scale: ...

optimizer.learning_rate#

Legacy Specification

Trainer Specification

optimizer:
  learning_rate:
    ...
trainer:
  init:
    schedulers:
      ...

optimizer.log_summaries#

Legacy Specification

Trainer Specification

optimizer:
  log_summaries: ...
trainer:
  init:
    callbacks:
    - ComputeNorm: ...
trainer:
  init:
    precision:
      log_loss_scale: ...

optimizer.loss_scaling_factor#

Legacy Specification

Trainer Specification

optimizer:
  loss_scaling_factor: ...
trainer:
  init:
    precision:
      loss_scaling_factor: ...

optimizer.max_gradient_norm#

Legacy Specification

Trainer Specification

optimizer:
  max_gradient_norm: ...
trainer:
  init:
    precision:
      max_gradient_norm: ...

optimizer.max_gradient_value#

Legacy Specification

Trainer Specification

optimizer:
  max_gradient_value: ...
trainer:
  init:
    precision:
      max_gradient_value: ...

optimizer.max_loss_scale#

Legacy Specification

Trainer Specification

optimizer:
  max_loss_scale: ...
trainer:
  init:
    precision:
      max_loss_scale: ...

optimizer.min_loss_scale#

Legacy Specification

Trainer Specification

optimizer:
  min_loss_scale: ...
trainer:
  init:
    precision:
      min_loss_scale: ...

optimizer.steps_per_increase#

Legacy Specification

Trainer Specification

optimizer:
  steps_per_increase: ...
trainer:
  init:
    precision:
      steps_per_increase: ...

runconfig.act_memory_gi#

Legacy Specification

Trainer Specification

runconfig:
  act_memory_gi: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.act_memory_gi: ...

runconfig.autoload_last_checkpoint#

Legacy Specification

Trainer Specification

runconfig:
  autoload_last_checkpoint: ...
trainer:
  init:
    checkpoint:
      autoload_last_checkpoint: ...

runconfig.check_loss_values#

Legacy Specification

Trainer Specification

runconfig:
  check_loss_values: ...
trainer:
  init:
    callbacks:
    - CheckLoss: ...

runconfig.checkpoint_path#

Legacy Specification

Trainer Specification

runconfig:
  checkpoint_path: ...
trainer:
  fit:
    ckpt_path: ...
trainer:
  validate:
    ckpt_path: ...
trainer:
  validate_all:
    ckpt_paths: ...

runconfig.checkpoint_steps#

Legacy Specification

Trainer Specification

runconfig:
  checkpoint_steps: ...
trainer:
  init:
    checkpoint:
      steps: ...

runconfig.cmd_memory_gi#

Legacy Specification

Trainer Specification

runconfig:
  cmd_memory_gi: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.cmd_memory_gi: ...

runconfig.compile_crd_memory_gi#

Legacy Specification

Trainer Specification

runconfig:
  compile_crd_memory_gi: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.compile_crd_memory_gi: ...

runconfig.compile_dir#

Legacy Specification

Trainer Specification

runconfig:
  compile_dir: ...
trainer:
  init:
    backend:
      compile_dir: ...

runconfig.compile_only#

Legacy Specification

Trainer Specification

runconfig:
  compile_only: ...
trainer:
  init:
    backend:
      compile_only: ...

runconfig.credentials_path#

Legacy Specification

Trainer Specification

runconfig:
  credentials_path: ...
trainer:
  init:
    backend:
      cluster_config:
        credentials_path: ...

runconfig.debug_args#

Legacy Specification

Trainer Specification

runconfig:
  debug_args:
    ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.debug_args:
          ...

runconfig.debug_args_path#

Legacy Specification

Trainer Specification

runconfig:
  debug_args_path: ...
trainer:
  init:
    callbacks:
    - DebugArgsPath:
        debug_args_path: ...

runconfig.disable_strict_checkpoint_loading#

Legacy Specification

Trainer Specification

runconfig:
  disable_strict_checkpoint_loading: ...
trainer:
  init:
    checkpoint:
      disable_strict_checkpoint_loading: ...

runconfig.disable_version_check#

Legacy Specification

Trainer Specification

runconfig:
  disable_version_check: ...
trainer:
  init:
    backend:
      cluster_config:
        disable_version_check: ...

runconfig.dist_backend#

Legacy Specification

Trainer Specification

runconfig:
  dist_backend: ...
trainer:
  init:
    backend:
      dist_backend: ...

runconfig.drop_data#

Legacy Specification

Trainer Specification

runconfig:
  drop_data: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.drop_data: ...

runconfig.dump_activations#

Legacy Specification

Trainer Specification

runconfig:
  dump_activations: ...
trainer:
  init:
    callbacks:
    - DumpActivations: ...

runconfig.enable_act_frequency#

Legacy Specification

Trainer Specification

runconfig:
  enable_act_frequency: ...
trainer:
  init:
    logging:
      enable_act_frequency: ...

runconfig.enable_distributed#

Legacy Specification

Trainer Specification

runconfig:
  enable_distributed: ...
trainer:
  init:
    backend:
      enable_distributed: ...

runconfig.eval_frequency#

Legacy Specification

Trainer Specification

runconfig:
  eval_frequency: ...
trainer:
  init:
    loop:
      eval_frequency: ...

runconfig.eval_steps#

Legacy Specification

Trainer Specification

runconfig:
  eval_steps: ...
trainer:
  init:
    loop:
      eval_steps: ...

runconfig.execute_crd_memory_gi#

Legacy Specification

Trainer Specification

runconfig:
  execute_crd_memory_gi: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.execute_crd_memory_gi: ...

runconfig.experimental.listeners#

Legacy Specification

Trainer Specification

runconfig:
  experimental:
    listeners:
      ...
trainer:
  init:
    callbacks:
    - Listener:
        listeners:
          ...

runconfig.init_method#

Legacy Specification

Trainer Specification

runconfig:
  init_method: ...
trainer:
  init:
    backend:
      init_method: ...

runconfig.job_labels#

Legacy Specification

Trainer Specification

runconfig:
  job_labels:
    ...
trainer:
  init:
    backend:
      cluster_config:
        job_labels:
          ...

runconfig.job_priority#

Legacy Specification

Trainer Specification

runconfig:
  job_priority: ...
trainer:
  init:
    backend:
      cluster_config:
        job_priority: ...

runconfig.job_time_sec#

Legacy Specification

Trainer Specification

runconfig:
  job_time_sec: ...
trainer:
  init:
    backend:
      cluster_config:
        job_time_sec: ...

runconfig.lazy_initialization#

Legacy Specification

Trainer Specification

runconfig:
  lazy_initialization: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.lazy_initialization: ...

runconfig.load_checkpoint_states#

Legacy Specification

Trainer Specification

runconfig:
  load_checkpoint_states: ...
trainer:
  init:
    callbacks:
    - LoadCheckpointStates:
        load_checkpoint_states: ...

runconfig.log_initialization#

Legacy Specification

Trainer Specification

runconfig:
  log_initialization: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.log_initialization: ...

runconfig.log_input_summaries#

Legacy Specification

Trainer Specification

runconfig:
  log_input_summaries: ...
trainer:
  init:
    callbacks:
    - LogInputSummaries: ...

runconfig.log_steps#

Legacy Specification

Trainer Specification

runconfig:
  log_steps: ...
trainer:
  init:
    logging:
      log_steps: ...

runconfig.logging#

Legacy Specification

Trainer Specification

runconfig:
  logging: ...
trainer:
  init:
    logging:
      log_level: ...

runconfig.main_process_id#

Legacy Specification

Trainer Specification

runconfig:
  main_process_id: ...
trainer:
  init:
    backend:
      main_process_id: ...

runconfig.max_checkpoints#

Legacy Specification

Trainer Specification

runconfig:
  max_checkpoints: ...
trainer:
  init:
    callbacks:
    - KeepNCheckpoints:
        n: ...

runconfig.max_steps#

Legacy Specification

Trainer Specification

runconfig:
  max_steps: ...
trainer:
  init:
    loop:
      max_steps: ...

runconfig.mgmt_address#

Legacy Specification

Trainer Specification

runconfig:
  mgmt_address: ...
trainer:
  init:
    backend:
      cluster_config:
        mgmt_address: ...

runconfig.mgmt_namespace#

Legacy Specification

Trainer Specification

runconfig:
  mgmt_namespace: ...
trainer:
  init:
    backend:
      cluster_config:
        mgmt_namespace: ...

runconfig.model_dir#

Legacy Specification

Trainer Specification

runconfig:
  model_dir: ...
trainer:
  init:
    model_dir: ...

runconfig.mount_dirs#

Legacy Specification

Trainer Specification

runconfig:
  mount_dirs:
    ...
trainer:
  init:
    backend:
      cluster_config:
        mount_dirs:
          ...

runconfig.num_act_servers#

Legacy Specification

Trainer Specification

runconfig:
  num_act_servers: ...
trainer:
  init:
    backend:
      cluster_config:
        max_act_per_csx: ...

runconfig.num_csx#

Legacy Specification

Trainer Specification

runconfig:
  num_csx: ...
trainer:
  init:
    backend:
      cluster_config:
        num_csx: ...

runconfig.num_epochs#

Legacy Specification

Trainer Specification

runconfig:
  num_epochs: ...
trainer:
  init:
    loop:
      num_epochs: ...

runconfig.num_steps#

Legacy Specification

Trainer Specification

runconfig:
  num_steps: ...
trainer:
  init:
    loop:
      num_steps: ...

runconfig.num_wgt_servers#

Legacy Specification

Trainer Specification

runconfig:
  num_wgt_servers: ...
trainer:
  init:
    backend:
      cluster_config:
        max_wgt_servers: ...

runconfig.num_workers_per_csx#

Legacy Specification

Trainer Specification

runconfig:
  num_workers_per_csx: ...
trainer:
  init:
    backend:
      cluster_config:
        num_workers_per_csx: ...

runconfig.op_profiler_config#

Legacy Specification

Trainer Specification

runconfig:
  op_profiler_config:
    ...
trainer:
  init:
    callbacks:
    - OpProfiler:
        ...

runconfig.precision_opt_level#

Legacy Specification

Trainer Specification

runconfig:
  precision_opt_level: ...
trainer:
  init:
    precision:
      precision_opt_level: ...

runconfig.python_paths#

Legacy Specification

Trainer Specification

runconfig:
  python_paths:
    ...
trainer:
  init:
    backend:
      cluster_config:
        python_paths:
          ...

runconfig.retrace_every_iteration#

Legacy Specification

Trainer Specification

runconfig:
  retrace_every_iteration: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.retrace_every_iteration: ...

runconfig.save_initial_checkpoint#

Legacy Specification

Trainer Specification

runconfig:
  save_initial_checkpoint: ...
trainer:
  init:
    checkpoint:
      save_initial_checkpoint: ...

runconfig.seed#

Legacy Specification

Trainer Specification

runconfig:
  seed: ...
trainer:
  init:
    seed: ...

runconfig.steps_per_epoch#

Legacy Specification

Trainer Specification

runconfig:
  steps_per_epoch: ...
trainer:
  init:
    loop:
      steps_per_epoch: ...

runconfig.sync_batchnorm#

Legacy Specification

Trainer Specification

runconfig:
  sync_batchnorm: ...
trainer:
  init:
    backend:
      sync_batchnorm: ...

runconfig.target_device#

Legacy Specification

Trainer Specification

runconfig:
  target_device: ...
trainer:
  init:
    backend:
      backend_type: ...

runconfig.transfer_processes#

Legacy Specification

Trainer Specification

runconfig:
  transfer_processes: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.performance.transfer_processes: ...

runconfig.validate_only#

Legacy Specification

Trainer Specification

runconfig:
  validate_only: ...
trainer:
  init:
    backend:
      validate_only: ...

runconfig.wgt_memory_gi#

Legacy Specification

Trainer Specification

runconfig:
  wgt_memory_gi: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.wgt_memory_gi: ...

runconfig.wrk_memory_gi#

Legacy Specification

Trainer Specification

runconfig:
  wrk_memory_gi: ...
trainer:
  init:
    callbacks:
    - GlobalFlags:
        csx.debug.wrk_memory_gi: ...

runconfig.wsc_log_level#

Legacy Specification

Trainer Specification

runconfig:
  wsc_log_level:
    ...
trainer:
  init:
    logging:
      wsc_log_level:
        ...

sparsity#

Legacy Specification

Trainer Specification

sparsity: ...
trainer:
  init:
    sparsity:
      sparsity: ...

sparsity#

Legacy Specification

Trainer Specification

sparsity:
  ...
trainer:
  init:
    sparsity:
      ...

sparsity.add_summaries#

Legacy Specification

Trainer Specification

sparsity:
  add_summaries: ...
trainer:
  init:
    callbacks:
    - LogSparsity: ...

train_input#

Legacy Specification

Trainer Specification

train_input:
  ...
trainer:
  fit:
    train_dataloader:
      ...

train_input.micro_batch_size#

Legacy Specification

Trainer Specification

train_input:
  micro_batch_size: ...
trainer:
  init:
    callbacks:
    - ScopedTrainFlags:
        csx.performance.micro_batch_size: ...

wandb.group#

Legacy Specification

Trainer Specification

wandb:
  group: ...
trainer:
  init:
    loggers:
    - WandbLogger:
        group: ...

wandb.job_type#

Legacy Specification

Trainer Specification

wandb:
  job_type: ...
trainer:
  init:
    loggers:
    - WandbLogger:
        job_type: ...

wandb.project#

Legacy Specification

Trainer Specification

wandb:
  project: ...
trainer:
  init:
    loggers:
    - WandbLogger:
        project: ...

wandb.resume#

Legacy Specification

Trainer Specification

wandb:
  resume: ...
trainer:
  init:
    loggers:
    - WandbLogger:
        resume: ...

wandb.run_id#

Legacy Specification

Trainer Specification

wandb:
  run_id: ...
trainer:
  init:
    loggers:
    - WandbLogger:
        run_id: ...

wandb.run_name#

Legacy Specification

Trainer Specification

wandb:
  run_name: ...
trainer:
  init:
    loggers:
    - WandbLogger:
        run_name: ...

wandb.tags#

Legacy Specification

Trainer Specification

wandb:
  tags: ...
trainer:
  init:
    loggers:
    - WandbLogger:
        tags: ...