diff --git a/scenarionet/converter/utils.py b/scenarionet/converter/utils.py index 5e40d71..ec3997f 100644 --- a/scenarionet/converter/utils.py +++ b/scenarionet/converter/utils.py @@ -6,11 +6,13 @@ import math import os import pickle import shutil -from scenarionet.common_utils import save_summary_anda_mapping + import numpy as np import tqdm from metadrive.scenario import ScenarioDescription as SD +from scenarionet.common_utils import save_summary_anda_mapping + logger = logging.getLogger(__file__) @@ -81,7 +83,8 @@ def write_to_directory( if force_overwrite: delay_remove = save_path else: - raise ValueError("Directory already exists! Abort") + raise ValueError("Directory already exists! Abort." + "\n Try setting force_overwrite=True or using --overwrite") summary_file = SD.DATASET.SUMMARY_FILE mapping_file = SD.DATASET.MAPPING_FILE diff --git a/scenarionet/scripts/convert_nuplan.py b/scenarionet/scripts/convert_nuplan.py index 7278e5f..db863f2 100644 --- a/scenarionet/scripts/convert_nuplan.py +++ b/scenarionet/scripts/convert_nuplan.py @@ -15,7 +15,7 @@ if __name__ == '__main__': help="Dataset name, will be used to generate scenario files") parser.add_argument("--dataset_path", "-d", default=os.path.join(SCENARIONET_DATASET_PATH, "nuplan"), help="The path of the dataset") - parser.add_argument("--version", "-v", default='v1.1', required=True, help="version") + parser.add_argument("--version", "-v", default='v1.1', help="version") parser.add_argument("--overwrite", action="store_true", help="If the dataset_path exists, overwrite it") args = parser.parse_args() diff --git a/scenarionet/scripts/convert_nuscenes.py b/scenarionet/scripts/convert_nuscenes.py index d8a42a4..263fb58 100644 --- a/scenarionet/scripts/convert_nuscenes.py +++ b/scenarionet/scripts/convert_nuscenes.py @@ -15,7 +15,7 @@ if __name__ == '__main__': help="Dataset name, will be used to generate scenario files") parser.add_argument("--dataset_path", "-d", default=os.path.join(SCENARIONET_DATASET_PATH, "nuscenes"), help="The path of the dataset") - parser.add_argument("--version", "-v", default='v1.0-mini', required=True, help="version") + parser.add_argument("--version", "-v", default='v1.0-mini', help="version") parser.add_argument("--overwrite", action="store_true", help="If the dataset_path exists, overwrite it") args = parser.parse_args() diff --git a/scenarionet/scripts/convert_pg.py b/scenarionet/scripts/convert_pg.py index ce6e35a..6c53650 100644 --- a/scenarionet/scripts/convert_pg.py +++ b/scenarionet/scripts/convert_pg.py @@ -15,7 +15,7 @@ if __name__ == '__main__': help="Dataset name, will be used to generate scenario files") parser.add_argument("--dataset_path", "-d", default=os.path.join(SCENARIONET_DATASET_PATH, "pg"), help="The path of the dataset") - parser.add_argument("--version", "-v", default=metadrive.constants.DATA_VERSION, required=True, help="version") + parser.add_argument("--version", "-v", default=metadrive.constants.DATA_VERSION, help="version") parser.add_argument("--overwrite", action="store_true", help="If the dataset_path exists, overwrite it") args = parser.parse_args() diff --git a/scenarionet/scripts/convert_waymo.py b/scenarionet/scripts/convert_waymo.py index faeba64..ad0f4d6 100644 --- a/scenarionet/scripts/convert_waymo.py +++ b/scenarionet/scripts/convert_waymo.py @@ -14,7 +14,7 @@ if __name__ == '__main__': help="Dataset name, will be used to generate scenario files") parser.add_argument("--dataset_path", "-d", default=os.path.join(SCENARIONET_DATASET_PATH, "waymo"), help="The path of the dataset") - parser.add_argument("--version", "-v", default='v1.2', required=True, help="version") + parser.add_argument("--version", "-v", default='v1.2', help="version") parser.add_argument("--overwrite", action="store_true", help="If the dataset_path exists, overwrite it") args = parser.parse_args()