Unify hierarchical mesh edge level metadata#66
Unify hierarchical mesh edge level metadata#66SIDDHANTCOOKIE wants to merge 5 commits intomllam:mainfrom
Conversation
|
Thanks @SIDDHANTCOOKIE for this PR. Please use the entire PR template, it helps us to keep a better overview about the process. |
|
@observingClouds Thanks for the clarification, I've updated the description with everything that was missing. |
|
Hey @observingClouds CI notebook was failing due to the earlier metadata rename. |
|
@observingClouds how should I proceed with this? |
|
Hi @SIDDHANTCOOKIE thanks for asking. Please document the changes in the CHANGELOG.md and we will put this PR on the milestone for the next release |
|
Hey @observingClouds I've added the entry to Also, I was curious on how to contribute further. Should I wait for existing issues to be assigned, or should I open new ones as I discover improvements in the codebase? If there are other repositories in the MLLAM ecosystem that currently need help, I’d be happy to contribute there as well. Looking forward to your guidance. Thank you! |
| data.pop("level", None) | ||
| data.pop("levels", None) |
There was a problem hiding this comment.
(Same as earlier) Do we actually add these keys now? Or why do we need to drop them here instead of not adding them to begin with?
There was a problem hiding this comment.
Thanks for pointing this out, those data.pop("level", None) / data.pop("levels", None) For G_up(hierarchial.py), we copy edge metadata from G_down, in current flow G_down is already normalized, so these keys should not be present. So yes, these two pop lines are redundant now, and I can remove them to keep the code simpler.
There was a problem hiding this comment.
Yea if they do nothing now I think you can drop them
| first_level_graph = split_graph_by_edge_attribute( | ||
| level_subgraph, "level" | ||
| )[0] |
There was a problem hiding this comment.
Here we are splitting on "level" again. Will this work?
There was a problem hiding this comment.
Yes, this works.
That split on "level" is only in the non-hierarchical fallback branch (when edges do not have from_level/to_level). Hierarchical graphs take the branch above and use direction + from_level/to_level, so they don’t rely on "level" there.
There was a problem hiding this comment.
Also @joeloskarsson I forgot to run precommit in my last commit that caused the CI to fail. I've resolved it in my latest commit
|
Thinking a bit more about this, does it make sense to restrict the scope of this to only hierarchical graphs? Or are we creating another inconsistency now between hierarchical graphs and flat (potentially multi-scale graphs)? In my view we could always view a flat graph as a hierarchical one with I am thinking that it would make sense to make these attributes consistent across all graphs really. |
|
I agree, @joeloskarsson . Restricting this to hierarchical graphs leaves us with two schemas ( I can extend this so all mesh edges use a consistent schema:
For
|
|
|
||
| ### Fixed | ||
|
|
||
| - Fix issue #45 about inconsistent edge metadata and improves compatibility |
There was a problem hiding this comment.
It would be helpful if you summarised what the attributes that have been removed are and what they have been replaced with
Maybe we just do away with any notion of |
|
@SIDDHANTCOOKIE are you still looking at this? |
|
Hey so sorry I had my uni exams and totally forgot about it can you please tell me what should be the next steps |
No worries! You should absolutely concentrate foremost on your exams! Once you are ready the first steps would be to engage with the ongoing discussions :) For example the question I asked in #66 (comment), and this one #66 (comment). Thank you! |
Description
Hey @leifdenby @observingClouds @joeloskarsson
This PR standardizes hierarchical mesh edge level metadata to avoid mixed edge attribute keys/types that can cause downstream conversion issues.
Main changes:
levelon same-level edges vslevels/on cross-level edges) with a consistent schema on all hierarchical meshedges:from_level: intto_level: intdirection: str(existing, retained)connection: str(derived, e.g."1>0")level,levels) from hierarchical mesh edges.same-level mesh edges using
direction/from_level/to_level.test_hierarchical_edges_have_consistent_level_metadatato verify:
sameedges satisfyfrom_level == to_levelIssue Link
Fixes issue #45
Type of change
Checklist before requesting a review
pullwith--rebaseoption if possible).Checklist for reviewers
Each PR comes with its own improvements and flaws. The reviewer should check the following:
Author checklist after completed review
reflecting type of change (add section where missing):
Checklist for assignee