# Autogenerated via:
# python ~/code/watch/dev/maintain/mirror_package_geowatch.py
from watch.tasks.rutgers_material_change_detection.predict import parser, parser, parser, parser, parser, parser, parser, parser, parser, evaluator


def __getattr__(key):
    import watch.tasks.rutgers_material_change_detection.predict as mirror
    return getattr(mirror, key)


def __dir__():
    import watch.tasks.rutgers_material_change_detection.predict as mirror
    return dir(mirror)


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("model_path", type=str, help="Path to the .pth.tar file ")
    parser.add_argument(
        "input_kwcoco_dir",
        type=str,
        help="Path to a directory that contains a vali.kwcoco.json file to get input data from.",
    )
    parser.add_argument(
        "output_kwcoco_file_path", type=str, help="Output predictions placed in a .kwcoco.json at this path."
    )
    parser.add_argument(
        "--device",
        type=str,
        default="cuda",
        choices=["cuda", "cpu"],
        help="The type of hardware to process data with model.",
    )
    parser.add_argument("--n_workers", type=int, default=4, help="Number of CPU processes to load data into model.")
    parser.add_argument("--batch_size", type=int, default=8)
    parser.add_argument("--split", default="valid", help="TODO: Remove this")
    parser.add_argument("--stride", type=int, default=None, help="Set the step that crops are created.")
    parser.add_argument(
        "--heatmap_pred_channel_names",
        type=str,
        default="not_salient|salient",
        help="Overwrite the name of heatmap predictions in the produced kwcoco file.",
    )
    # parser.add_argument(
    #     "--ignore_material_features",
    #     default=False,
    #     action="store_true",
    #     help="Do not add material features to output kwcoco file.",
    # )
    # parser.add_argument(
    #     "--ignore_heatmaps",
    #     default=False,
    #     action="store_true",
    #     help="Do not add confidence heatmaps to output kwcoco file.",
    # )
    # parser.add_argument(
    #     "--ignore_material_change_mask",
    #     default=False,
    #     action="store_true",
    #     help="Do not add material change mask to output kwcoco file.",
    # )
    args = parser.parse_args()

    evaluator = Evaluator(args)
    evaluator.gen_kwcoco_file()
