test filter

This commit is contained in:
QuanyiLi
2023-05-07 19:13:51 +01:00
parent b7fe44d472
commit 1747772fed
3 changed files with 4 additions and 4 deletions

View File

@@ -52,7 +52,7 @@ def combine_multiple_dataset(output_path, *dataset_paths,
:param try_generate_missing_file: If dataset_summary.pkl and mapping.pkl are missing, whether to try generating them
:param dataset_paths: Path of each dataset
:param filters: a set of filters to choose which scenario to be selected and added into this combined dataset
:return:
:return: summary, mapping
"""
filters = filters or []
output_abs_path = osp.abspath(output_path)

View File

@@ -8,7 +8,7 @@ from scenarionet.verifier.utils import verify_loading_into_metadrive
def test_combine_multiple_dataset():
dataset_name = "nuscenes"
original_dataset_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "_test_dataset", dataset_name)
original_dataset_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "test_dataset", dataset_name)
dataset_paths = [original_dataset_path + "_{}".format(i) for i in range(5)]
output_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "combine")
@@ -22,7 +22,7 @@ def test_combine_multiple_dataset():
for scenario_file in sorted_scenarios:
read_scenario(os.path.join(dataset_path, mapping[scenario_file], scenario_file))
success, result = verify_loading_into_metadrive(dataset_path,
result_save_dir="_test_dataset",
result_save_dir="test_dataset",
steps_to_run=300)
assert success

View File

@@ -9,7 +9,7 @@ from metadrive.type import MetaDriveType
def test_filter_dataset():
dataset_name = "nuscenes"
original_dataset_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "_test_dataset", dataset_name)
original_dataset_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "test_dataset", dataset_name)
dataset_paths = [original_dataset_path + "_{}".format(i) for i in range(5)]
output_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "combine")