test filter
This commit is contained in:
@@ -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 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 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
|
: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 []
|
filters = filters or []
|
||||||
output_abs_path = osp.abspath(output_path)
|
output_abs_path = osp.abspath(output_path)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from scenarionet.verifier.utils import verify_loading_into_metadrive
|
|||||||
|
|
||||||
def test_combine_multiple_dataset():
|
def test_combine_multiple_dataset():
|
||||||
dataset_name = "nuscenes"
|
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)]
|
dataset_paths = [original_dataset_path + "_{}".format(i) for i in range(5)]
|
||||||
|
|
||||||
output_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "combine")
|
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:
|
for scenario_file in sorted_scenarios:
|
||||||
read_scenario(os.path.join(dataset_path, mapping[scenario_file], scenario_file))
|
read_scenario(os.path.join(dataset_path, mapping[scenario_file], scenario_file))
|
||||||
success, result = verify_loading_into_metadrive(dataset_path,
|
success, result = verify_loading_into_metadrive(dataset_path,
|
||||||
result_save_dir="_test_dataset",
|
result_save_dir="test_dataset",
|
||||||
steps_to_run=300)
|
steps_to_run=300)
|
||||||
assert success
|
assert success
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from metadrive.type import MetaDriveType
|
|||||||
|
|
||||||
def test_filter_dataset():
|
def test_filter_dataset():
|
||||||
dataset_name = "nuscenes"
|
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)]
|
dataset_paths = [original_dataset_path + "_{}".format(i) for i in range(5)]
|
||||||
|
|
||||||
output_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "combine")
|
output_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "combine")
|
||||||
|
|||||||
Reference in New Issue
Block a user