From 37a7d8608ed1482f2690c63a36cea573944bb170 Mon Sep 17 00:00:00 2001 From: QuanyiLi Date: Mon, 8 May 2023 16:31:35 +0100 Subject: [PATCH] add dataset to gitignore --- .gitignore | 1 + scenarionet/tests/local_test/_test_combine_dataset_local.py | 4 ++-- scenarionet/tests/local_test/_test_filter_local.py | 4 ++-- .../tests/local_test/_test_generate_from_error_file.py | 2 +- scenarionet/tests/script/run_env.py | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 7204134..c69ffb2 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ dataset/* **/failed_scenarios/ **/passed_scenarios/ **/waymo_origin +/dataset/ diff --git a/scenarionet/tests/local_test/_test_combine_dataset_local.py b/scenarionet/tests/local_test/_test_combine_dataset_local.py index 21b8852..e7c9301 100644 --- a/scenarionet/tests/local_test/_test_combine_dataset_local.py +++ b/scenarionet/tests/local_test/_test_combine_dataset_local.py @@ -1,6 +1,6 @@ import os -from scenarionet import SCENARIONET_DATASET_PATH +from scenarionet import SCENARIONET_DATASET_PATH, SCENARIONET_PACKAGE_PATH from scenarionet.builder.utils import combine_multiple_dataset from scenarionet.verifier.utils import verify_loading_into_metadrive @@ -13,7 +13,7 @@ def _test_combine_dataset(): os.path.join(SCENARIONET_DATASET_PATH, "pg") ] - combine_path = os.path.join(SCENARIONET_DATASET_PATH, "combined_dataset") + combine_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "tmp", "combine") combine_multiple_dataset(combine_path, *dataset_paths, force_overwrite=True, try_generate_missing_file=True) # os.makedirs("verify_results", exist_ok=True) # verify_loading_into_metadrive(combine_path, "verify_results") diff --git a/scenarionet/tests/local_test/_test_filter_local.py b/scenarionet/tests/local_test/_test_filter_local.py index 1f02a4c..b3b83c3 100644 --- a/scenarionet/tests/local_test/_test_filter_local.py +++ b/scenarionet/tests/local_test/_test_filter_local.py @@ -3,7 +3,7 @@ import os.path from metadrive.type import MetaDriveType -from scenarionet import SCENARIONET_DATASET_PATH +from scenarionet import SCENARIONET_DATASET_PATH, SCENARIONET_PACKAGE_PATH from scenarionet.builder.filters import ScenarioFilter from scenarionet.builder.utils import combine_multiple_dataset @@ -17,7 +17,7 @@ def test_filter_dataset(): dataset_paths.append(os.path.join(SCENARIONET_DATASET_PATH, "waymo")) dataset_paths.append(os.path.join(SCENARIONET_DATASET_PATH, "pg")) - output_path = os.path.join(SCENARIONET_DATASET_PATH, "combined_dataset") + output_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "tmp", "combine") # ========================= test 1 ========================= # nuscenes data has no light diff --git a/scenarionet/tests/local_test/_test_generate_from_error_file.py b/scenarionet/tests/local_test/_test_generate_from_error_file.py index 04db6be..9f14ed2 100644 --- a/scenarionet/tests/local_test/_test_generate_from_error_file.py +++ b/scenarionet/tests/local_test/_test_generate_from_error_file.py @@ -24,7 +24,7 @@ def test_generate_from_error(): os.path.join(SCENARIONET_DATASET_PATH, "pg") ] - dataset_path = os.path.join(SCENARIONET_DATASET_PATH, "combined_dataset") + dataset_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "tmp", "combine") combine_multiple_dataset(dataset_path, *dataset_paths, force_overwrite=True, try_generate_missing_file=True) summary, sorted_scenarios, mapping = read_dataset_summary(dataset_path) diff --git a/scenarionet/tests/script/run_env.py b/scenarionet/tests/script/run_env.py index 94a89ef..48410f7 100644 --- a/scenarionet/tests/script/run_env.py +++ b/scenarionet/tests/script/run_env.py @@ -4,7 +4,7 @@ from metadrive.envs.scenario_env import ScenarioEnv from metadrive.policy.replay_policy import ReplayEgoCarPolicy from metadrive.scenario.utils import get_number_of_scenarios -from scenarionet import SCENARIONET_DATASET_PATH +from scenarionet import SCENARIONET_DATASET_PATH, SCENARIONET_PACKAGE_PATH from scenarionet.builder.utils import combine_multiple_dataset if __name__ == '__main__': @@ -13,7 +13,7 @@ if __name__ == '__main__': dataset_paths.append(os.path.join(SCENARIONET_DATASET_PATH, "waymo")) dataset_paths.append(os.path.join(SCENARIONET_DATASET_PATH, "pg")) - combine_path = os.path.join(SCENARIONET_DATASET_PATH, "combined_dataset") + combine_path = os.path.join(SCENARIONET_PACKAGE_PATH, "tests", "tmp", "combine") combine_multiple_dataset(combine_path, *dataset_paths, force_overwrite=True, try_generate_missing_file=True) env = ScenarioEnv(