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

Problem running GNN with Hydra #4

Open
hildeesch opened this issue Jan 2, 2025 · 0 comments
Open

Problem running GNN with Hydra #4

hildeesch opened this issue Jan 2, 2025 · 0 comments

Comments

@hildeesch
Copy link

Hi! Thanks for your great effort for maintaining this open-source work! I am trying to install and test Hydra-GNN.
I am now working on the step of running GNN with Hydra using the pretrained model on the uHumans2 office scene.
As prescribed, the following command is used:
./bin/room_classification_server server path/to/pretrained/model path/to/hydra/config/uhumans2/uhumans2_office_typology.yaml

Though I am not exactly sure of the topology file, since I can't seem to locate it, I belief this command would be the following in my case:
./bin/room_classification_server server pretrained_models/data_gt60_model ../../catkin_ws/src/hydra/config/label_spaces/uhumans2_office_label_space.yaml

This, however, logs the following error:

model: ModelInfo(homogeneous=False, htree=False, relative_pos=True, use_word2vec=True) model hyper params: {'GAT_concats': [True, True, False], 'GAT_heads': [1, 1, 1], 'GAT_hidden_dims': [32, 32], 'conv_block': 'GAT_edge', 'dropout': 0.4, 'ignored_label': 25, 'input_dim_dict': {'objects': 303, 'rooms': 3}, 'output_dim': 26} ./bin/room_classification_server:204: FutureWarning: You are using torch.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. self.model.load_state_dict(torch.load(weight_path)) Traceback (most recent call last): File "./bin/room_classification_server", line 414, in <module> main() File "/home/hildeesch/.local/bin/hydra_gnn/lib/python3.8/site-packages/click/core.py", line 1161, in __call__ return self.main(*args, **kwargs) File "/home/hildeesch/.local/bin/hydra_gnn/lib/python3.8/site-packages/click/core.py", line 1082, in main rv = self.invoke(ctx) File "/home/hildeesch/.local/bin/hydra_gnn/lib/python3.8/site-packages/click/core.py", line 1697, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/hildeesch/.local/bin/hydra_gnn/lib/python3.8/site-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/hildeesch/.local/bin/hydra_gnn/lib/python3.8/site-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) File "./bin/room_classification_server", line 330, in run model = GnnModel(model_path, typology_path, device=device) File "./bin/room_classification_server", line 204, in __init__ self.model.load_state_dict(torch.load(weight_path)) File "/home/hildeesch/.local/bin/hydra_gnn/lib/python3.8/site-packages/torch/nn/modules/module.py", line 2215, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for HeterogeneousNetwork: Missing key(s) in state_dict: "convs.0.convs.<objects___objects_to_objects___objects>.att_src", "convs.0.convs.<objects___objects_to_objects___objects>.att_dst", "convs.0.convs.<objects___objects_to_objects___objects>.att_edge", "convs.0.convs.<objects___objects_to_objects___objects>.bias", "convs.0.convs.<objects___objects_to_objects___objects>.lin_src.weight", "convs.0.convs.<objects___objects_to_objects___objects>.lin_dst.weight", "convs.0.convs.<objects___objects_to_objects___objects>.lin_edge.weight", "convs.0.convs.<rooms___rooms_to_rooms___rooms>.att_src", "convs.0.convs.<rooms___rooms_to_rooms___rooms>.att_dst", "convs.0.convs.<rooms___rooms_to_rooms___rooms>.att_edge", "convs.0.convs.<rooms___rooms_to_rooms___rooms>.bias", "convs.0.convs.<rooms___rooms_to_rooms___rooms>.lin_src.weight", "convs.0.convs.<rooms___rooms_to_rooms___rooms>.lin_dst.weight", "convs.0.convs.<rooms___rooms_to_rooms___rooms>.lin_edge.weight", "convs.0.convs.<objects___objects_to_rooms___rooms>.att_src", "convs.0.convs.<objects___objects_to_rooms___rooms>.att_dst", "convs.0.convs.<objects___objects_to_rooms___rooms>.att_edge", "convs.0.convs.<objects___objects_to_rooms___rooms>.bias", "convs.0.convs.<objects___objects_to_rooms___rooms>.lin_src.weight", "convs.0.convs.<objects___objects_to_rooms___rooms>.lin_dst.weight", "convs.0.convs.<objects___objects_to_rooms___rooms>.lin_edge.weight", "convs.0.convs.<rooms___rooms_to_objects___objects>.att_src", "convs.0.convs.<rooms___rooms_to_objects___objects>.att_dst", "convs.0.convs.<rooms___rooms_to_objects___objects>.att_edge", "convs.0.convs.<rooms___rooms_to_objects___objects>.bias", "convs.0.convs.<rooms___rooms_to_objects___objects>.lin_src.weight", "convs.0.convs.<rooms___rooms_to_objects___objects>.lin_dst.weight", "convs.0.convs.<rooms___rooms_to_objects___objects>.lin_edge.weight", "convs.1.convs.<objects___objects_to_objects___objects>.att_src", "convs.1.convs.<objects___objects_to_objects___objects>.att_dst", "convs.1.convs.<objects___objects_to_objects___objects>.att_edge", "convs.1.convs.<objects___objects_to_objects___objects>.bias", "convs.1.convs.<objects___objects_to_objects___objects>.lin.weight", "convs.1.convs.<objects___objects_to_objects___objects>.lin_edge.weight", "convs.1.convs.<rooms___rooms_to_rooms___rooms>.att_src", "convs.1.convs.<rooms___rooms_to_rooms___rooms>.att_dst", "convs.1.convs.<rooms___rooms_to_rooms___rooms>.att_edge", "convs.1.convs.<rooms___rooms_to_rooms___rooms>.bias", "convs.1.convs.<rooms___rooms_to_rooms___rooms>.lin.weight", "convs.1.convs.<rooms___rooms_to_rooms___rooms>.lin_edge.weight", "convs.1.convs.<objects___objects_to_rooms___rooms>.att_src", "convs.1.convs.<objects___objects_to_rooms___rooms>.att_dst", "convs.1.convs.<objects___objects_to_rooms___rooms>.att_edge", "convs.1.convs.<objects___objects_to_rooms___rooms>.bias", "convs.1.convs.<objects___objects_to_rooms___rooms>.lin.weight", "convs.1.convs.<objects___objects_to_rooms___rooms>.lin_edge.weight", "convs.1.convs.<rooms___rooms_to_objects___objects>.att_src", "convs.1.convs.<rooms___rooms_to_objects___objects>.att_dst", "convs.1.convs.<rooms___rooms_to_objects___objects>.att_edge", "convs.1.convs.<rooms___rooms_to_objects___objects>.bias", "convs.1.convs.<rooms___rooms_to_objects___objects>.lin.weight", "convs.1.convs.<rooms___rooms_to_objects___objects>.lin_edge.weight", "convs.2.convs.<objects___objects_to_objects___objects>.att_src", "convs.2.convs.<objects___objects_to_objects___objects>.att_dst", "convs.2.convs.<objects___objects_to_objects___objects>.att_edge", "convs.2.convs.<objects___objects_to_objects___objects>.bias", "convs.2.convs.<objects___objects_to_objects___objects>.lin.weight", "convs.2.convs.<objects___objects_to_objects___objects>.lin_edge.weight", "convs.2.convs.<rooms___rooms_to_rooms___rooms>.att_src", "convs.2.convs.<rooms___rooms_to_rooms___rooms>.att_dst", "convs.2.convs.<rooms___rooms_to_rooms___rooms>.att_edge", "convs.2.convs.<rooms___rooms_to_rooms___rooms>.bias", "convs.2.convs.<rooms___rooms_to_rooms___rooms>.lin.weight", "convs.2.convs.<rooms___rooms_to_rooms___rooms>.lin_edge.weight", "convs.2.convs.<objects___objects_to_rooms___rooms>.att_src", "convs.2.convs.<objects___objects_to_rooms___rooms>.att_dst", "convs.2.convs.<objects___objects_to_rooms___rooms>.att_edge", "convs.2.convs.<objects___objects_to_rooms___rooms>.bias", "convs.2.convs.<objects___objects_to_rooms___rooms>.lin.weight", "convs.2.convs.<objects___objects_to_rooms___rooms>.lin_edge.weight", "convs.2.convs.<rooms___rooms_to_objects___objects>.att_src", "convs.2.convs.<rooms___rooms_to_objects___objects>.att_dst", "convs.2.convs.<rooms___rooms_to_objects___objects>.att_edge", "convs.2.convs.<rooms___rooms_to_objects___objects>.bias", "convs.2.convs.<rooms___rooms_to_objects___objects>.lin.weight", "convs.2.convs.<rooms___rooms_to_objects___objects>.lin_edge.weight". Unexpected key(s) in state_dict: "convs.0.convs.objects__objects_to_objects__objects.att_src", "convs.0.convs.objects__objects_to_objects__objects.att_dst", "convs.0.convs.objects__objects_to_objects__objects.att_edge", "convs.0.convs.objects__objects_to_objects__objects.bias", "convs.0.convs.objects__objects_to_objects__objects.lin_src.weight", "convs.0.convs.objects__objects_to_objects__objects.lin_dst.weight", "convs.0.convs.objects__objects_to_objects__objects.lin_edge.weight", "convs.0.convs.rooms__rooms_to_rooms__rooms.att_src", "convs.0.convs.rooms__rooms_to_rooms__rooms.att_dst", "convs.0.convs.rooms__rooms_to_rooms__rooms.att_edge", "convs.0.convs.rooms__rooms_to_rooms__rooms.bias", "convs.0.convs.rooms__rooms_to_rooms__rooms.lin_src.weight", "convs.0.convs.rooms__rooms_to_rooms__rooms.lin_dst.weight", "convs.0.convs.rooms__rooms_to_rooms__rooms.lin_edge.weight", "convs.0.convs.objects__objects_to_rooms__rooms.att_src", "convs.0.convs.objects__objects_to_rooms__rooms.att_dst", "convs.0.convs.objects__objects_to_rooms__rooms.att_edge", "convs.0.convs.objects__objects_to_rooms__rooms.bias", "convs.0.convs.objects__objects_to_rooms__rooms.lin_src.weight", "convs.0.convs.objects__objects_to_rooms__rooms.lin_dst.weight", "convs.0.convs.objects__objects_to_rooms__rooms.lin_edge.weight", "convs.0.convs.rooms__rooms_to_objects__objects.att_src", "convs.0.convs.rooms__rooms_to_objects__objects.att_dst", "convs.0.convs.rooms__rooms_to_objects__objects.att_edge", "convs.0.convs.rooms__rooms_to_objects__objects.bias", "convs.0.convs.rooms__rooms_to_objects__objects.lin_src.weight", "convs.0.convs.rooms__rooms_to_objects__objects.lin_dst.weight", "convs.0.convs.rooms__rooms_to_objects__objects.lin_edge.weight", "convs.1.convs.objects__objects_to_objects__objects.att_src", "convs.1.convs.objects__objects_to_objects__objects.att_dst", "convs.1.convs.objects__objects_to_objects__objects.att_edge", "convs.1.convs.objects__objects_to_objects__objects.bias", "convs.1.convs.objects__objects_to_objects__objects.lin_src.weight", "convs.1.convs.objects__objects_to_objects__objects.lin_dst.weight", "convs.1.convs.objects__objects_to_objects__objects.lin_edge.weight", "convs.1.convs.rooms__rooms_to_rooms__rooms.att_src", "convs.1.convs.rooms__rooms_to_rooms__rooms.att_dst", "convs.1.convs.rooms__rooms_to_rooms__rooms.att_edge", "convs.1.convs.rooms__rooms_to_rooms__rooms.bias", "convs.1.convs.rooms__rooms_to_rooms__rooms.lin_src.weight", "convs.1.convs.rooms__rooms_to_rooms__rooms.lin_dst.weight", "convs.1.convs.rooms__rooms_to_rooms__rooms.lin_edge.weight", "convs.1.convs.objects__objects_to_rooms__rooms.att_src", "convs.1.convs.objects__objects_to_rooms__rooms.att_dst", "convs.1.convs.objects__objects_to_rooms__rooms.att_edge", "convs.1.convs.objects__objects_to_rooms__rooms.bias", "convs.1.convs.objects__objects_to_rooms__rooms.lin_src.weight", "convs.1.convs.objects__objects_to_rooms__rooms.lin_dst.weight", "convs.1.convs.objects__objects_to_rooms__rooms.lin_edge.weight", "convs.1.convs.rooms__rooms_to_objects__objects.att_src", "convs.1.convs.rooms__rooms_to_objects__objects.att_dst", "convs.1.convs.rooms__rooms_to_objects__objects.att_edge", "convs.1.convs.rooms__rooms_to_objects__objects.bias", "convs.1.convs.rooms__rooms_to_objects__objects.lin_src.weight", "convs.1.convs.rooms__rooms_to_objects__objects.lin_dst.weight", "convs.1.convs.rooms__rooms_to_objects__objects.lin_edge.weight", "convs.2.convs.objects__objects_to_objects__objects.att_src", "convs.2.convs.objects__objects_to_objects__objects.att_dst", "convs.2.convs.objects__objects_to_objects__objects.att_edge", "convs.2.convs.objects__objects_to_objects__objects.bias", "convs.2.convs.objects__objects_to_objects__objects.lin_src.weight", "convs.2.convs.objects__objects_to_objects__objects.lin_dst.weight", "convs.2.convs.objects__objects_to_objects__objects.lin_edge.weight", "convs.2.convs.rooms__rooms_to_rooms__rooms.att_src", "convs.2.convs.rooms__rooms_to_rooms__rooms.att_dst", "convs.2.convs.rooms__rooms_to_rooms__rooms.att_edge", "convs.2.convs.rooms__rooms_to_rooms__rooms.bias", "convs.2.convs.rooms__rooms_to_rooms__rooms.lin_src.weight", "convs.2.convs.rooms__rooms_to_rooms__rooms.lin_dst.weight", "convs.2.convs.rooms__rooms_to_rooms__rooms.lin_edge.weight", "convs.2.convs.objects__objects_to_rooms__rooms.att_src", "convs.2.convs.objects__objects_to_rooms__rooms.att_dst", "convs.2.convs.objects__objects_to_rooms__rooms.att_edge", "convs.2.convs.objects__objects_to_rooms__rooms.bias", "convs.2.convs.objects__objects_to_rooms__rooms.lin_src.weight", "convs.2.convs.objects__objects_to_rooms__rooms.lin_dst.weight", "convs.2.convs.objects__objects_to_rooms__rooms.lin_edge.weight", "convs.2.convs.rooms__rooms_to_objects__objects.att_src", "convs.2.convs.rooms__rooms_to_objects__objects.att_dst", "convs.2.convs.rooms__rooms_to_objects__objects.att_edge", "convs.2.convs.rooms__rooms_to_objects__objects.bias", "convs.2.convs.rooms__rooms_to_objects__objects.lin_src.weight", "convs.2.convs.rooms__rooms_to_objects__objects.lin_dst.weight", "convs.2.convs.rooms__rooms_to_objects__objects.lin_edge.weight".

Any recommendations are appreciated!

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