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

NameError: name 'planning_evaluation_strategy' is not defined #193

Open
Wright-bit opened this issue Jul 14, 2024 · 7 comments
Open

NameError: name 'planning_evaluation_strategy' is not defined #193

Wright-bit opened this issue Jul 14, 2024 · 7 comments

Comments

@Wright-bit
Copy link

Wright-bit commented Jul 14, 2024

Traceback (most recent call last):
File "./tools/test.py", line 263, in
main()
File "./tools/test.py", line 124, in main
cfg = Config.fromfile(args.config)
File "/root/miniconda3/envs/uniad/lib/python3.8/site-packages/mmcv/utils/config.py", line 331, in fromfile
cfg_dict, cfg_text = Config._file2dict(filename,
File "/root/miniconda3/envs/uniad/lib/python3.8/site-packages/mmcv/utils/config.py", line 206, in _file2dict
mod = import_module(temp_module_name)
File "/root/miniconda3/envs/uniad/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 "/tmp/tmpeeoo014y/tmpabpc6m4u.py", line 580, in
NameError: name 'planning_evaluation_strategy' is not defined
Exception ignored in: <function _TemporaryFileCloser.del at 0x7fd66ae52280>
Traceback (most recent call last):
File "/root/miniconda3/envs/uniad/lib/python3.8/tempfile.py", line 456, in del
self.close()
File "/root/miniconda3/envs/uniad/lib/python3.8/tempfile.py", line 452, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpeeoo014y/tmpabpc6m4u.py'
/root/miniconda3/envs/uniad/lib/python3.8/site-packages/torch/distributed/launch.py:178: FutureWarning: The module torch.distributed.launch is deprecated
and will be removed in future. Use torch.distributed.run.
Note that --use_env is set by default in torch.distributed.run.
If your script expects --local_rank argument to be set, please
change it to read from os.environ['LOCAL_RANK'] instead. See
https://pytorch.org/docs/stable/distributed.html#launch-utility for
further instructions

warnings.warn(
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 4267) of binary: /root/miniconda3/envs/uniad/bin/python
Traceback (most recent call last):
File "/root/miniconda3/envs/uniad/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/root/miniconda3/envs/uniad/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/miniconda3/envs/uniad/lib/python3.8/site-packages/torch/distributed/launch.py", line 193, in
main()
File "/root/miniconda3/envs/uniad/lib/python3.8/site-packages/torch/distributed/launch.py", line 189, in main
launch(args)
File "/root/miniconda3/envs/uniad/lib/python3.8/site-packages/torch/distributed/launch.py", line 174, in launch
run(args)
File "/root/miniconda3/envs/uniad/lib/python3.8/site-packages/torch/distributed/run.py", line 689, in run
elastic_launch(
File "/root/miniconda3/envs/uniad/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 116, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/root/miniconda3/envs/uniad/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 244, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:


     ./tools/test.py FAILED        

=======================================
Root Cause:
[0]:
time: 2024-07-14_10:12:51
rank: 0 (local_rank: 0)
exitcode: 1 (pid: 4267)
error_file: <N/A>
msg: "Process failed with exitcode 1"

Other Failures:
<NO_OTHER_FAILURES>


I run ./tools/uniad_dist_eval.sh ./projects/configs/stage1_track_map/base_track_map.py ./ckpts/uniad_base_track_map.pth 8。But the above error occurred, and then the following code was found in base_track_map.py:
evaluation = dict( interval=6, pipeline=test_pipeline, planning_evaluation_strategy=planning_evaluation_strategy, )
and no definition of planning_evaluation_strategy found in file

@YTEP-ZHI
Copy link
Collaborator

@Wright-bit Hi, try to comment out or remove the planning_evaluation_strategy=planning_evaluation_strategy, line in the config. If the removal resolves this issue, please let me know and I will fix the code accordingly. Thanks.

@leafandme3
Copy link

Hi, I meet the same error. name 'planning_evaluation_strategy' is not defined. I try to comment out or remove the planning_evaluation_strategy=planning_evaluation_strategy, line in the config. But it does not work.
How should I do?

@SubicLovePython
Copy link

image
I meet the issue, too. It could be a mistask that defining "planning_evaluation_strategy" as "planning_metric_strategy".

@YTEP-ZHI
Copy link
Collaborator

YTEP-ZHI commented Jul 16, 2024

image I meet the issue, too. It could be a mistask that defining "planning_evaluation_strategy" as "planning_metric_strategy".

Hi @SubicLovePython. After this fix, does it work normally for evaluation? Please let me know.

@SubicLovePython
Copy link

image I meet the issue, too. It could be a mistask that defining "planning_evaluation_strategy" as "planning_metric_strategy".

Hi @SubicLovePython. After this fix, does it work normally for evaluation? Please let me know.

yes, about 1 hour, evaluation over.
image

@YTEP-ZHI
Copy link
Collaborator

YTEP-ZHI commented Jul 16, 2024

@Wright-bit @leafandme3 I think a minor fix can address this, check this commit: f2bf070

@SongCASIA
Copy link

Hi, I fixed this in base_track_map.py but it still got a typeERROR:
[>>>>>>>>>>>>>>>>>>>>>>>>>] 6019/6019, 0.5 task/s, elapsed: 12817s, ETA: 0s
writing results to output/results.pkl
Traceback (most recent call last):
File "./tools/test.py", line 261, in
main()
File "./tools/test.py", line 257, in main
print(dataset.evaluate(outputs, **eval_kwargs))
TypeError: evaluate() got an unexpected keyword argument 'planning_evaluation_strategy'

It seems like the evaluate() func in mmdet.datasets.dataset_wrappers.ConcatDataset doesnt have this keyword, how to fix this?

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

5 participants