def update_fine_tune_checkpoint_type(train_config):
  """Set `fine_tune_checkpoint_type` using `from_detection_checkpoint`.

  `train_config.from_detection_checkpoint` field is deprecated. For backward
  compatibility, this function sets `train_config.fine_tune_checkpoint_type`
  based on `train_config.from_detection_checkpoint`.

  Args:
    train_config: train_pb2.TrainConfig proto object.

  """
  if not train_config.fine_tune_checkpoint_type:
    if train_config.from_detection_checkpoint:
      train_config.fine_tune_checkpoint_type = "detection"
    else:
      train_config.fine_tune_checkpoint_type = "classification"
Set `fine_tune_checkpoint_type` using `from_detection_checkpoint`.

  `train_config.from_detection_checkpoint` field is deprecated. For backward
  compatibility, this function sets `train_config.fine_tune_checkpoint_type`
  based on `train_config.from_detection_checkpoint`.

  Args:
    train_config: train_pb2.TrainConfig proto object.

  
inference_api/src/main/object_detection/utils/config_util.py