RAMP_CONFIG = {
    "experiment_name": "HOT-OSM Efficient-Unet Finetune Model",
    "discard_experiment": False,
    "logging": {
        "log_experiment": True,
        "experiment_log_path": "ramp-data/TRAIN/fAIr-experiments.csv",
        "experiment_notes": "Multi Mask model, batchsize 20, 8 epochs on HOT-OSM datasets Multizoom, finetuning from RAMP saved model",
        "fields_to_log": [
            "experiment_name",
            "experiment_notes",
            "timestamp",
            "num_epochs",
            "batch_size",
            "output_img_shape",
            "input_img_shape",
            "get_loss_fn_name",
            "use_saved_model",
            "use_aug",
            "use_early_stopping",
            "use_clr",
            "random_seed",
            "num_classes",
            "get_optimizer_fn_name",
            "tb_logs_dir",
            "get_model_fn_name",
            "backbone",
            "train_img_dir",
            "train_mask_dir",
            "val_img_dir",
            "val_mask_dir",
        ],
    },
    "datasets": {
        "train_img_dir": "ramp-data/TRAIN/HOTOSM/1/chips",
        "train_mask_dir": "ramp-data/TRAIN/HOTOSM/1/multimasks",
        "val_img_dir": "ramp-data/TRAIN/HOTOSM/1/val-chips",
        "val_mask_dir": "ramp-data/TRAIN/HOTOSM/1/val-multimasks",
    },
    "num_classes": 4,
    "num_epochs": 20,
    "batch_size": 8,
    "input_img_shape": [256, 256],
    "output_img_shape": [256, 256],
    "loss": {
        "get_loss_fn_name": "get_sparse_categorical_crossentropy_fn",
        "loss_fn_parms": {},
    },
    "metrics": {
        "use_metrics": True,
        "get_metrics_fn_names": ["get_sparse_categorical_accuracy_fn"],
        "metrics_fn_parms": [{}],
    },
    "optimizer": {
        "get_optimizer_fn_name": "get_adam_optimizer",
        "optimizer_fn_parms": {"learning_rate": 3e-04},
    },
    "model": {
        "get_model_fn_name": "get_effunet_model",
        "model_fn_parms": {
            "backbone": "efficientnetb0",
            "classes": ["background", "buildings", "boundary", "close_contact"],
        },
    },
    "saved_model": {
        "use_saved_model": True,
        "saved_model_path": "ramp-code/ramp/checkpoint.tf",
        "save_optimizer_state": False,
    },
    "augmentation": {
        "use_aug": True,
        "get_augmentation_fn_name": "get_augmentation_fn",
        "aug_list": ["Rotate", "ColorJitter"],
        "aug_parms": [
            {
                "border_mode": "BORDER_CONSTANT",
                "interpolation": "INTER_NEAREST",
                "value": [0.0, 0.0, 0.0],
                "mask_value": 0,
                "p": 0.7,
            },
            {"p": 0.7},
        ],
    },
    "early_stopping": {
        "use_early_stopping": True,
        "early_stopping_parms": {
            "monitor": "val_loss",
            "min_delta": 0.005,
            "patience": 50,
            "verbose": 0,
            "mode": "auto",
            "restore_best_weights": False,
        },
    },
    "cyclic_learning_scheduler": {
        "use_clr": False,
        "get_clr_callback_fn_name": "get_clr_callback_fn",
        "clr_callback_parms": {
            "mode": "triangular2",
            "stepsize": 8,
            "max_lr": 1e-4,
            "base_lr": 3.25e-6,
        },
        "clr_plot_dir": "ramp-data/TRAIN/HOTOSM/1/plots",
    },
    "tensorboard": {
        "use_tb": True,
        "tb_logs_dir": "ramp-data/TRAIN/HOTOSM/1/logs",
        "get_tb_callback_fn_name": "get_tb_callback_fn",
        "tb_callback_parms": {"histogram_freq": 1, "update_freq": "batch"},
    },
    "prediction_logging": {
        "use_prediction_logging": True,
        "get_prediction_logging_fn_name": "get_pred_logging_callback_fn",
    },
    "model_checkpts": {
        "use_model_checkpts": True,
        "model_checkpts_dir": "ramp-data/TRAIN/HOTOSM/1/model-checkpts",
        "get_model_checkpt_callback_fn_name": "get_model_checkpt_callback_fn",
        "model_checkpt_callback_parms": {"mode": "max", "save_best_only": False},
    },
    "feedback": {"freeze_layers": False},
    "random_seed": 20220523,
}
