feat(models): feature encoding for assembly graph nodes and edges #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implement
solver/models/features.pywith functions to convert raw datagen example dicts into fixed-dimension tensor features for GNN consumption.Node features (22-dim per body)
body_positions[i]body_orientations[i]body_id / n_bodieslog(n_bodies)Edge features (22-dim per joint)
JointTypeenum ordinals 0-10body_positions[body_b] - body_positions[body_a]JointType.dofvalueFunctions
encode_node_features(example) -> Tensor[n_bodies, 22]encode_edge_features(example) -> Tensor[n_joints, 22]encode_targets(example) -> dict[str, Tensor]— extracts edge_labels, graph_label, joint_type_labels, dof_target, per_body_dofFiles
solver/models/features.pytests/models/__init__.pytests/models/test_features.pyAcceptance criteria
(n_bodies, 22)and(n_joints, 22)encode_targetsproduces correct label tensors