class_docstr: Registers metrics with XManager.
class_docstr_tok: ["Registers","metrics","with","XManager","."]
code: def on_epoch_end(
      self, epoch: int, logs: Optional[Dict[str, Any]] = None
  ):
      if logs:
          for metric_name, metric_value in logs.items():
              measurements = self.work_unit.get_measurement_series(
                  label=metric_name
              )
              measurements.create_measurement(metric_value, step=epoch)
  
imports: import gc
  import os
  import re
  from typing import Any, Dict, Optional, Tuple
  import warnings
  from absl import app
  from absl import flags
  from absl import logging
  from ml_collections.config_flags import config_flags
  import tensorflow
  import tensorflow_addons
  from deepvariant import data_providers
  from deepvariant import dv_constants
  from deepvariant import dv_utils
  from deepvariant import keras_modeling
  from deepvariant.average_model_checkpoint_patched import AverageModelCheckpointPatched
  from third_party.nucleus.io import sharded_file_utils
  from official.modeling import optimization
label_desc: Use image node_id 2 for calling the XManagerCallback obj's underlying member method code with example usage: obj.on_epoch_end(epoch, logs) without return types