Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Incorrect "save_name" Key in Stored JSON File #136

Open
curryqka opened this issue Feb 6, 2025 · 2 comments
Open

Issue: Incorrect "save_name" Key in Stored JSON File #136

curryqka opened this issue Feb 6, 2025 · 2 comments

Comments

@curryqka
Copy link

curryqka commented Feb 6, 2025

Description

The save_name key stored in the JSON file does not correctly match the path of the generated closed-loop evaluation folder. This inconsistency causes a mismatch when attempting to read the corresponding files, leading to errors.

Error Message

When running the following command:

python tools/efficiency_smoothness_benchmark.py -f vad_b2d_traj/merged.json -m /home/shitianyu/Carla/Bench2Drive/eval_bench2drive220_vad_traj

The following error occurs:

Traceback (most recent call last):
  File "tools/efficiency_smoothness_benchmark.py", line 281, in <module>
    all_data, driving_efficiency_list = read_from_json(args.file, args.metric_dir)
  File "tools/efficiency_smoothness_benchmark.py", line 251, in read_from_json
    with open(filepath, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'Bench2Drive/eval_bench2drive220_vad_traj/RouteScenario_3048_rep0_Town12_MergerIntoSlowTraffic_1_0_02_06_11_37_52/metric_info.json'

Expected Behavior

The script should be able to correctly locate and read the metric_info.json file based on the save_name key in the provided JSON file.

Steps to Reproduce

  1. Run the script using the specified command:
    python tools/efficiency_smoothness_benchmark.py -f vad_b2d_traj/merged.json -m /home/shitianyu/Carla/Bench2Drive/eval_bench2drive220_vad_traj
  2. Observe the error message indicating that the file could not be found at the specified path.

Possible Solution(I wonder how to resize the key "save_name"?)

  • Check the save_name key in the JSON file to ensure it correctly reflects the intended path.
  • Verify that the paths are consistent between the JSON file and the actual file locations.

Environment

  • Python Version: [3.8]
  • Carla Version: [0.9.15]
@jayyoung0802
Copy link
Member

Hi @curryqka, please check if the metric_info.json exists.

@curryqka
Copy link
Author

curryqka commented Feb 7, 2025

Hi @curryqka, please check if the metric_info.json exists.
@jayyoung0802
I confirm that the metric_info.json file exists. The issue arises because the key "save_name" is set to "RouteScenario_3048_rep0_Town12_MergerIntoSlowTraffic_1_0_02_06_11_37_52", whereas the actual saved folder name is "bench2drive220_0_...[]". This inconsistency causes the problem.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants