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

运行bash leaderboard/scripts/run_evaluation_debug.sh 时,报No module named 'Bench2DriveZoo' #140

Open
liuanhui opened this issue Feb 8, 2025 · 3 comments

Comments

@liuanhui
Copy link

liuanhui commented Feb 8, 2025

bash leaderboard/scripts/run_evaluation_debug.sh
leaderboard/leaderboard/leaderboard_evaluator.py:21: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
/home/liuanhui/carla/CarlaUE4.sh -RenderOffScreen -nosound -carla-rpc-port=30000 -graphicsadapter=3 None
4.26.2-0+++UE4+Release-4.26 522 0
Disabling core dumps.
load_world success , attempts=0
traffic_manager init success, try_time=0
leaderboard/leaderboard/leaderboard_evaluator.py:115: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(dist.version) < LooseVersion('0.9.10'):
Traceback (most recent call last):
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 564, in
main()
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 553, in main
leaderboard_evaluator = LeaderboardEvaluator(arguments, statistics_manager)
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 121, in init
self.module_agent = importlib.import_module(module_name)
File "/home/liuanhui/anaconda3/envs/b2d_zoo/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/liuanhui/Bench2Drive/leaderboard/team_code/vad_b2d_agent.py", line 17, in
from Bench2DriveZoo.team_code.pid_controller import PIDController
ModuleNotFoundError: No module named 'Bench2DriveZoo'。

我的run_evaluation_debug.sh 文件如下:
#!/bin/bash
BASE_PORT=30000
BASE_TM_PORT=50000
IS_BENCH2DRIVE=True
BASE_ROUTES=leaderboard/data/bench2drive220
TEAM_AGENT=leaderboard/team_code/vad_b2d_agent.py
#TEAM_CONFIG=your_team_agent_ckpt.pth # for TCP and ADMLP
TEAM_CONFIG=your_team_agent_config.py+your_team_agent_ckpt.pth # for UniAD and VAD

BASE_CHECKPOINT_ENDPOINT=eval
SAVE_PATH=./eval_v1/
PLANNER_TYPE=only_traj

GPU_RANK=3
PORT=$BASE_PORT
TM_PORT=$BASE_TM_PORT
ROUTES="${BASE_ROUTES}.xml"
CHECKPOINT_ENDPOINT="${BASE_CHECKPOINT_ENDPOINT}.json"
bash leaderboard/scripts/run_evaluation.sh $PORT $TM_PORT $IS_BENCH2DRIVE $ROUTES $TEAM_AGENT $TEAM_CONFIG $CHECKPOINT_ENDPOINT $SAVE_PATH $PLANNER_TYPE $GPU_RANK

@liuanhui
Copy link
Author

liuanhui commented Feb 8, 2025

TEAM_CONFIG=your_team_agent_config.py+your_team_agent_ckpt.pth # for UniAD and VAD
关于这个里面的your_team_agent_config.py是自己要创建一个config文件吗,里面包含哪些内容

@timmao955
Copy link

官方提供的Bnech2DriveZoo里面有
Bench2DriveZoo/adzoo/vad/configs/VAD里的VAD_base_e2e_b2d.py是your_team_agent_config.py
这里下vad_b2d_base.pth是your_team_agent_ckpt.pth

@curryqka
Copy link

curryqka commented Feb 9, 2025

import sys
sys.path.append("..") in the [xx_b2d_agent.py]

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

3 participants