opendilab / InterFuser

[CoRL 2022] InterFuser: Safety-Enhanced Autonomous Driving Using Interpretable Sensor Fusion Transformer
Apache License 2.0
514 stars 42 forks source link

AttributeError: type object 'CarlaDataProvider' has no attribute 'set_random_seed' #60

Open chengjie-lu opened 11 months ago

chengjie-lu commented 11 months ago

Hello author,

I tried to evaluate your pre-trained model today using the following command:

CUDA_VISIBLE_DEVICES=0 ./leaderboard/scripts/run_evaluation.sh

But I encountered an error saying

AttributeError: type object 'CarlaDataProvider' has no attribute 'set_random_seed'.

And the problem is with leaderboard_evaluator.py line 218.

After checking the leaderboard_evaluator.py file in Carla official repository, I found CarlaDataProvider doesn't have set_random_seed: https://github.com/carla-simulator/leaderboard/blob/master/leaderboard/leaderboard_evaluator.py#L208.

Did you implement "set_random_seed" yourself? And do you know how should I solve this issue?

Thanks!

Console output:

pygame 2.1.2 (SDL 2.0.16, Python 3.7.16)
Hello from the pygame community. https://www.pygame.org/contribute.html

========= Preparing RouteScenario_16 (repetition 0) =========
> Setting up the agent
load model: leaderboard/team_code/interfuser.pth.tar
routes_town05_long_08_14_23_04_08
> Loading the world

The scenario could not be loaded:
> type object 'CarlaDataProvider' has no attribute 'set_random_seed'

Traceback (most recent call last):
  File "leaderboard/leaderboard/leaderboard_evaluator.py", line 313, in _load_and_run_scenario
    self._load_and_wait_for_world(args, config.town, config.ego_vehicles)
  File "leaderboard/leaderboard/leaderboard_evaluator.py", line 218, in _load_and_wait_for_world
    CarlaDataProvider.set_random_seed(int(args.carlaProviderSeed))
AttributeError: type object 'CarlaDataProvider' has no attribute 'set_random_seed'
> Registering the route statistics
deepcs233 commented 11 months ago

Hi!

Our repo provides this function: https://github.com/opendilab/InterFuser/blob/e4f0314482124bb06a475c3f6fb4bfe3a2701c4d/scenario_runner/srunner/scenariomanager/carla_data_provider.py#L759

Please export out scenario_runner as SCENARIO_RUNNER path