class_docstr: Controller class for optimization. Mostly a thin
  wrapper for `optim`, but also useful for implementing
  rate scheduling beyond what is currently available.
  Also implements necessary methods for training RNNs such
  as grad manipulations.
  
  Args:
      optimizer: A ``torch.optim.Optimizer`` instance.
      learning_rate: The initial learning rate.
      learning_rate_decay_fn: An optional callable taking the current step
          as argument and return a learning rate scaling factor.
      max_grad_norm: Clip gradients to this global norm.
class_docstr_tok: ["Controller","class","for","optimization",".","Mostly","a","thin","wrapper","for","`","optim","`",",","but","also","useful","for","implementing","rate","scheduling","beyond","what","is","currently","available",".","Also","implements","necessary","methods","for","training","RNNs","such","as","grad","manipulations",".","Args",":","optimizer",":","A","``","torch.optim.Optimizer","``","instance",".","learning_rate",":","The","initial","learning","rate",".","learning_rate_decay_fn",":","An","optional","callable","taking","the","current","step","as","argument","and","return","a","learning","rate","scaling","factor",".","max_grad_norm",":","Clip","gradients","to","this","global","norm","."]
docstr: The current training step.
docstr_tok: ["The","current","training","step","."]
code: def training_step(self):
      """The current training step."""
      return self._training_step
  
imports: import torch
  import torch.optim
  from torch.nn.utils import clip_grad_norm_
  import operator
  import functools
  from copy import copy
  from math import sqrt
  import types
  import os
  import importlib
  from onmt.utils.misc import fn_args
label_desc: Use image node_id 3 for calling the Optimizer obj's underlying member method code with example usage: obj.training_step() and returns: self