doublelei / VIHE

3 stars 0 forks source link

Issue while running the training script:AttributeError: 'MVT' object has no attribute 'rot_offset' #1

Closed Silence1471 closed 4 months ago

Silence1471 commented 5 months ago

Hi! Thank you for your great works!

I downloaded and decompressed the data and replay, when I executed the training script python tools/train.py agent=vihe , after running an epoch I encountered a AttributeError: 'MVT' object has no attribute 'rot_offset'

config/config.yaml:

defaults:

  • agent: peract with_eval: false exp_id: "test" tasks: ["close_jar","open_drawer","push_buttons","reach_and_drag","sweep_to_dustpan_of_size","insert_onto_square_peg","place_cups","put_groceries_in_cupboard","slide_block_to_color_target","turn_tap","light_bulb_in","place_shape_in_shape_sorter","put_item_in_drawer","stack_blocks","meat_off_grill","place_wine_at_rack_location","put_money_in_safe","stack_cups"] device: [0] epochs: 20 sample_distribution_mode: "transition_uniform" replay_buffer_sample: "uniform" log_dir: "runs" eval: headless: true datafolder: "/share/home/HCI/liaozhao/ogsp/vihe/VIHE/data/RLbench/test/" episode_length: 25 episodes: 10 save_video: false log_name: "last" replay_ground_truth: false dataset: cameras: ["front", "left_shoulder", "right_shoulder", "wrist"] batch_size: 16 voxel_size: [100] timesteps: 1 image_size: [128, 128] rot_and_grip_indicies_size: 4 trans_indicies_size: 3 gripper_pose_size: 7 ignore_collisions_size: 1 max_token_seq_len: 77 lang_feat_dim: 1024 lang_emb_dim: 512 low_dim_state: 4 disk_saving: True replay_capacity: 1000000 train_replay_dir: "/share/home/HCI/liaozhao/ogsp/vihe/VIHE/data/replay/train" eposides_folder_train: "/share/home/HCI/liaozhao/ogsp/vihe/VIHE/data/RLbench/train/{}/all_variations/episodes" eposides_folder_test: "/share/home/HCI/liaozhao/ogsp/vihe/VIHE/data/RLbench/test/{}/all_variations/episodes" num_demos: 1 keypoint_method: 'heuristic' replay_buffer_sample_policy: 'uniform' replay_buffer_sample_freq: 10 demo_augmentation: True num_workers: 3 sample_distribution_mode: 'task_uniform' scene_bounds: [-0.3, -0.5, 0.6, 0.7, 0.5, 1.6] rotation_resolution: 5 refresh_replay: false

log:

Total loss: 23.488: 99%|███████████████████████████████████████████████████████████████████████████████▏| 99/100 [03:21<00:02, 2.04s/it]

Traceback (most recent call last):

File "tools/train.py", line 180, in main experiment(0, cfg, cfg.device, port) File "tools/train.py", line 163, in experiment out = train(agent, train_dataset, TRAINING_ITERATIONS, rank) File "tools/train.py", line 61, in train return_out = agent.update(**update_args) File "/share/home/HCI/liaozhao/ogsp/vihe/VIHE/VIHE/models/rvtpp_agent.py", line 933, in update pred_W_E_H_4x4, pred_wpt_local, predeuler, ,_ = forward_stage( File "/share/home/HCI/liaozhao/ogsp/vihe/VIHE/VIHE/models/rvtpp_agent.py", line 912, in forward_stage if self._net_mod.mvt1.rot_offset and stage > 0: # invert rotaion to be action File "/share/home/HCI/liaozhao/anaconda3/envs/vihe/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1207, in getattr raise AttributeError("'{}' object has no attribute '{}'".format(

AttributeError: 'MVT' object has no attribute 'rot_offset'

Looking forward to your reply~

doublelei commented 5 months ago

Hi, thanks for bringing this up, there is a minor typo when cleaning the code, and it's fixed in the commit. Let me know if you encounter any further problems

Silence1471 commented 4 months ago

Thank you! That works.