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

AttributeError: 'GraphModule' object has no attribute 'eval_graph #2

Open
KimNaser opened this issue Dec 13, 2024 · 0 comments
Open

Comments

@KimNaser
Copy link

KimNaser commented Dec 13, 2024

hi, author.
First of all, thank you for your work.

I got this error:

python3 scripts/scene_editor.py --results_root_dir ./out/orca_mixed_out --num_scenes_per_batch 1 --policy_ckpt_dir ./ckpt/trace/orca_mixed --policy_ckpt_key iter40000 --eval_class Diffuser --render_img --config_file ./configs/eval/orca/target_pos.json /home/redhwan/.local/lib/python3.8/site-packages/transformers/utils/generic.py:311: FutureWarning: torch.utils._pytree._register_pytree_nodeis deprecated. Please usetorch.utils._pytree.register_pytree_nodeinstead. torch.utils._pytree._register_pytree_node( 2024-12-13 17:20:03.089076: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/x86_64-linux-gnu:/opt/ros/foxy/lib::/usr/local/lib 2024-12-13 17:20:03.089107: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. { "name": "orca_map_open_loop_target_pos", "env": "trajdata", "dataset_path": null, "eval_class": "Diffuser", "seed": 0, "num_scenes_per_batch": 1, "num_scenes_to_evaluate": 100, "num_episode_repeats": 1, "start_frame_index_each_episode": null, "seed_each_episode": null, "ego_only": false, "ckpt_root_dir": "checkpoints/", "experience_hdf5_path": "./out/orca_mixed_out/orca_map_open_loop_target_pos/data.hdf5", "results_dir": "./out/orca_mixed_out/orca_map_open_loop_target_pos", "ckpt": { "policy": { "ckpt_dir": "./ckpt/trace/orca_mixed", "ckpt_key": "iter40000", "ngc_job_id": null } }, "policy": { "num_action_samples": 20, "guide_as_filter_only": false, "guide_with_gt": false, "class_free_guide_w": 0.0, "guide_clean": true }, "metrics": { "compute_analytical_metrics": true }, "edits": { "editing_source": [ "heuristic" ], "guidance_config": [], "heuristic_config": [ { "name": "target_pos", "weight": 30000.0, "params": { "target_time": 40 } } ], "constraint_config": [] }, "agent_eval_class": null, "trajdata_cache_location": "~/.unified_data_cache", "trajdata_rebuild_cache": false, "trajdata_source_test": [ "orca_maps-test" ], "trajdata_data_dirs": { "orca_maps": "./datasets/orca_sim", "orca_no_maps": "./datasets/orca_sim" }, "eval_scenes": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ], "n_step_action": 50, "num_simulation_steps": 50, "skip_first_n": 0, "num_sim_per_scene": 1 } saving results to ./out/orca_mixed_out/orca_map_open_loop_target_pos Checkpoint path: ./ckpt/trace/orca_mixed/iter40000.ckpt Config path: ./ckpt/trace/orca_mixed/config.json /home/redhwan/.local/lib/python3.8/site-packages/lightning_fabric/utilities/cloud_io.py:51: FutureWarning: You are usingtorch.loadwithweights_only=False(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value forweights_onlywill be flipped toTrue. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=Truefor any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. return torch.load(f, map_location=map_location) # type: ignore[arg-type] Lightning automatically upgraded your loaded checkpoint from v1.7.7 to v2.0.0. To apply the upgrade to your files permanently, runpython -m pytorch_lightning.utilities.upgrade_checkpoint --file ckpt/trace/orca_mixed/iter40000.ckptDIFFUSER: Dropping map input conditioning with p = 0.100000 during training... DIFFUSER: Dropping neighbor traj input conditioning with p = 0.100000 during training... [ models/temporal ] Channel dimensions: [(38, 64), (64, 128), (128, 256)] DIFFUSER: using EMA... val and get_action will use ema model Traceback (most recent call last): File "scripts/scene_editor.py", line 415, in <module> run_scene_editor( File "scripts/scene_editor.py", line 53, in run_scene_editor policy, exp_config = composer.get_policy() File "/home/redhwan/3/Trace/tbsim/evaluation/policy_composers.py", line 42, in get_policy policy = DiffuserTrafficModel.load_from_checkpoint( File "/home/redhwan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 2475, in eval return self.train(False) File "/home/redhwan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 2456, in train module.train(mode) File "/home/redhwan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 2456, in train module.train(mode) File "/home/redhwan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 2456, in train module.train(mode) File "/home/redhwan/.local/lib/python3.8/site-packages/torchvision/models/feature_extraction.py", line 330, in train self.graph = self.eval_graph File "/home/redhwan/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1729, in __getattr__ raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") AttributeError: 'GraphModule' object has no attribute 'eval_graph'

How do we fix this issue?

my system is:

`/usr/bin/python3.8 /home/redhwan/3/learn.py
cuda 12.1

torch 2.4.1+cu121

torchvision 0.19.1+cu124

pytorch_lightning 2.0.0
`

Note: I tried to install pytorch_lightning 1.6.4, but the system adjusted it to 2.0

Thanks

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

1 participant