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

Excuse me, there are some operational problems about "python TCP/train.py --gpus" #25

Open
luoyexx opened this issue Feb 17, 2023 · 8 comments

Comments

@luoyexx
Copy link

luoyexx commented Feb 17, 2023

Excuse me, there are some operational problems about "python TCP/train.py --gpus"

python TCP/train.py --gpus 1
Traceback (most recent call last):
File "TCP/train.py", line 171, in
train_set = CARLA_Data(root=config.root_dir_all, data_folders=config.train_data, img_aug = config.img_aug)
File "/home/zjy/TCP/TCP/TCP/data.py", line 49, in init
data = np.load(os.path.join(sub_root, "packed_data.npy"), allow_pickle=True).item()
File "/home/zjy/anaconda3/envs/TCP/lib/python3.7/site-packages/numpy/lib/npyio.py", line 416, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'Tcp/tcp_carla_data/town01/packed_data.npy'

@penghao-wu
Copy link
Collaborator

Hi, you should set the root_dir_all variable in config.py to the actual directory of your data.

@luoyexx
Copy link
Author

luoyexx commented Feb 18, 2023

So sorry, I have set the root_dir_all variable for dataset in config.py. I use the Baidu Cloud dataset provided by you. I found that there is no packed_ data.npy in this dataset.

@penghao-wu
Copy link
Collaborator

Sorry about this problem. Those files might get ignored for the Baidu Cloud zip file. You can use tools/gen_data.py to generate packed_data.npy files.

@luoyexx
Copy link
Author

luoyexx commented Feb 22, 2023

Sorry about this problem. Those files might get ignored for the Baidu Cloud zip file. You can use tools/gen_data.py to generate packed_data.npy files.

Thank. And another question.
(TCP) zjy@wp:~/TCP$ python TCP/train.py
0
0
Traceback (most recent call last):
File "TCP/train.py", line 177, in
dataloader_val = DataLoader(val_set, batch_size=args.batch_size, shuffle=True, num_workers=8)
File "/home/zjy/anaconda3/envs/TCP/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 268, in init
sampler = RandomSampler(dataset, generator=generator)
File "/home/zjy/anaconda3/envs/TCP/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 103, in init
"value, but got num_samples={}".format(self.num_samples))

ValueError: num_samples should be a positive integer value, but got num_samples=0

@penghao-wu
Copy link
Collaborator

Could you please check the content of the packed_data.npy to see if it is correctly generated?

@luoyexx
Copy link
Author

luoyexx commented Mar 8, 2023

Exception ignored in: <function LeaderboardEvaluator.del at 0x7f81f5933200>
Traceback (most recent call last):
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 150, in del
self._cleanup()
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 162, in _cleanup
if self.manager and self.manager.get_running_status()
AttributeError: 'LeaderboardEvaluator' object has no attribute 'manager'
Traceback (most recent call last):
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 529, in
main()
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 525, in main
del leaderboard_evaluator
UnboundLocalError: local variable 'leaderboard_evaluator' referenced before assignment

@penghao-wu
Copy link
Collaborator

Could you please provide all the error information? Usually, this del leaderboard_evaluator error happens after some other exceptions or errors.

@SExpert12
Copy link

Are you able to solve this error? I run

sh leaderboard/scripts/data_collection.sh

and I get this error:

init statistics_manager
begin
Traceback (most recent call last):
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 519, in main
leaderboard_evaluator = LeaderboardEvaluator(arguments, statistics_manager)
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 123, in init
self.module_agent = importlib.import_module(module_name)
File "/home/ryzen/miniconda3/envs/TCPagent/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/ryzen/TCP/leaderboard/team_code/roach_ap_agent.py", line 17, in
from roach.criteria import run_stop_sign
ModuleNotFoundError: No module named 'roach'
Exception ignored in: <function LeaderboardEvaluator.del at 0x7f1d54cd43b0>
Traceback (most recent call last):
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 150, in del
self._cleanup()
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 162, in _cleanup
if self.manager and self.manager.get_running_status()
AttributeError: 'LeaderboardEvaluator' object has no attribute 'manager'
Traceback (most recent call last):
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 529, in
main()
File "leaderboard/leaderboard/leaderboard_evaluator.py", line 525, in main
del leaderboard_evaluator
UnboundLocalError: local variable 'leaderboard_evaluator' referenced before assignment

How to resolve 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

3 participants