Open M-Lampert opened 2 months ago
The function Graph.from_edge_index
now accepts a parameter num_nodes
I do not quite follow at which point this issue occurs, i.e. where the specification of num_nodes in the MultiOrderModel
class is missing. This does not seem to be related to the Graph class
?
Could you create a minimal example that reproduces the error, so I can debug this?
The issue was here: https://github.com/pathpy/pathpyG/blob/da86884751540e91e63233a3fb02af1eb3d883ef/src/pathpyG/core/MultiOrderModel.py#L51
MultiOrderModel.lift_order_edge_index(...)
requires the num_nodes
parameter and if it is set correctly, then everything works as expected. But @VincenzoPerri 's problem was that he specified the number of edges instead. I took this as a precedent that the current implementation is not as user-friendly as it could be. But I am unsure of what to change.
Currently the method
MultiOrderModel.lift_order_edge_index(...)
requiresnum_nodes
as argument. If you set this incorrectly, you will get an error as follows:This happened to @VincenzoPerri and will probably also happen to other users in the future. We should think about doing some kind of check and a warning or setting a default for easier usability.