TCP icon indicating copy to clipboard operation
TCP copied to clipboard

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

Open luoyexx opened this issue 2 years ago • 8 comments

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'

luoyexx avatar Feb 17 '23 06:02 luoyexx

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

penghao-wu avatar Feb 18 '23 06:02 penghao-wu

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.

luoyexx avatar Feb 18 '23 14:02 luoyexx

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.

penghao-wu avatar Feb 19 '23 07:02 penghao-wu

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

luoyexx avatar Feb 22 '23 08:02 luoyexx

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

penghao-wu avatar Feb 24 '23 05:02 penghao-wu

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

luoyexx avatar Mar 08 '23 14:03 luoyexx

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

penghao-wu avatar Mar 14 '23 23:03 penghao-wu

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?

SExpert12 avatar Jun 27 '24 05:06 SExpert12