def set_filenames(base_models, training_name, chosen_model):
    """Set filename values needed for object detection training.

    Args:
        base_models (dict) - possible pre-trained models
        training_name (str) - user-selected name for model
        chosen_model (str) - the user-selected pre-trained model

    Returns:
        filepaths (dict) - keys are names, values are filenames
    """
    filepaths = {}

    # intermediate variables needed later for filename construction
    base_pipeline_file = base_models[chosen_model]["base_pipeline_file"]
    model_name = base_models[chosen_model]["model_name"]

    # set all filepath key-value pairs
    filepaths["train_record_file"] = (
        "/tf/dataset-export/" + training_name + "/train/tf.records"
    )
    filepaths["val_record_file"] = (
        "/tf/dataset-export/" + training_name + "/val/tf.records"
    )
    filepaths["val_export_dir"] = "/tf/dataset-export/" + training_name + "/val/"
    filepaths["train_export_dir"] = "/tf/dataset-export/" + training_name + "/train/"
    filepaths["model_export_dir"] = "/tf/model-export/" + training_name + "/"
    filepaths["image_tensor_model_export_dir"] = (
        "/tf/model-export/" + training_name + "/image_tensor_saved_model/"
    )
    filepaths["label_map_file"] = (
        "/tf/dataset-export/" + training_name + "/label_map.pbtxt"
    )
    filepaths["model_dir"] = "/tf/training/" + training_name + "/"
    filepaths["pretrained_checkpoint"] = base_models[chosen_model][
        "pretrained_checkpoint"
    ]
    filepaths["fine_tune_checkpoint"] = (
        "/tf/models/research/deploy/" + model_name + "/checkpoint/ckpt-0"
    )
    filepaths["base_pipeline_file"] = base_pipeline_file
    filepaths["base_pipeline_dir"] = "/tf/models/research/deploy/"
    filepaths["pipeline_file"] = (
        "/tf/dataset-export/" + training_name + "/pipeline_file.config"
    )

    return filepaths