act-plus-plus
act-plus-plus copied to clipboard
[fix] ValueError: low >= high
If you met this:
...
File ".../.conda/envs/aloha/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 623, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File ".../act-plus-plus-main/utils.py", line 216, in BatchSampler
step_idx = np.random.randint(sum_dataset_len_l[episode_idx], sum_dataset_len_l[episode_idx + 1])
File "mtrand.pyx", line 765, in numpy.random.mtrand.RandomState.randint
File "_bounded_integers.pyx", line 1247, in numpy.random._bounded_integers._rand_int64
ValueError: low >= high
comment the data that not in public datasets:
# cabinet
'aloha_mobile_cabinet':{
'dataset_dir': [
DATA_DIR + '/aloha_mobile_cabinet',
# DATA_DIR + '/aloha_mobile_cabinet_handles', # 200 <--
# DATA_DIR + '/aloha_mobile_cabinet_grasp_pots', # 200 <--
], # only the first dataset_dir is used for val
'stats_dir': [
DATA_DIR + '/aloha_mobile_cabinet',
],
# 'sample_weights': [6, 1, 1], <--
'train_ratio': 0.99, # ratio of train data from the first dataset_dir
'episode_len': 1500,
'camera_names': ['cam_high', 'cam_left_wrist', 'cam_right_wrist']
},