class_docstr: Callback to implement model averaging strategies. Selects the checkpoints
  with the best loss values and computes the model average or weighted model
  average depending on the chosen avg_strategy.
  
  Parameters
  ----------
  avg_strategy
      AveragingStrategy, one of SelectNBestSoftmax or SelectNBestMean from
      gluonts.mx.trainer.model_averaging.
class_docstr_tok: ["Callback","to","implement","model","averaging","strategies",".","Selects","the","checkpoints","with","the","best","loss","values","and","computes","the","model","average","or","weighted","model","average","depending","on","the","chosen","avg_strategy",".","Parameters","--","--","--","--","--","avg_strategy","AveragingStrategy",",","one","of","SelectNBestSoftmax","or","SelectNBestMean","from","gluonts.mx.trainer.model_averaging","."]
code: def on_train_end(
      self,
      training_network: nn.HybridBlock,
      temporary_dir: str,
      ctx: mx.context.Context = None,
  ) -> None:
      logging.info("Computing averaged parameters.")
      averaged_params_path = self.avg_strategy.apply(temporary_dir)
  
      logging.info("Loading averaged parameters.")
      training_network.load_parameters(averaged_params_path, ctx)
  
imports: import glob
  import json
  import logging
  from typing import Dict, List, Tuple
  import mxnet
  import mxnet.gluon.nn
  import numpy
  from gluonts.core.component import validated
  from .callback import Callback
label_desc: Use image node_id 2 for calling the ModelAveraging obj's underlying member method code with example usage: obj.on_train_end(training_network, temporary_dir, ctx) without return types