-
Notifications
You must be signed in to change notification settings - Fork 36
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
First Implementation of a Simplex Trie #220
base: main
Are you sure you want to change the base?
Conversation
e07d86b
to
f854940
Compare
@mhajij The tests fail because |
@ffl096 |
This is a draft pull request, it is not to be merged right now regardless :) However, just to clarify: I do not propose to remove the |
we need to create a Data object to be utilized in the higher order context. I think the one available in torch is good enough. This is an example on how it can be used in a higher order DL model https://github.com/pyt-team/TopoModelX/blob/569bd193f81d47e04891376676c034e90cc07554/tutorials/combinatorial/hmc_train.ipynb |
f854940
to
2bf961b
Compare
@ffl096 I think we can merge this now, testing is failing however, can you please take care of it so we can merge ? also lint. |
The dataset issue still stands and is outside of the scope to be fixed here. We cannot reliably use pickled objects as data objects. |
I cannot merge wihout passing the tests, what do you think we should do? should we fix the dataset issues first? |
According to git blase, the |
c38136b
to
7357c14
Compare
@ffl096 What do you want to do with this PR ? I think we need to have SC faster and implemented correctly but many code relies on the datasets-- what do you suggest? |
As outlined above, the dataset structure has to be overhauled completely. This is outside of the scope of this pull request though, and needs to be done regardless. The current system is highly unstable. Once that is done, this pull request is good to be merged. |
5a1a11a
to
5e530c0
Compare
5e530c0
to
af9524c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
==========================================
+ Coverage 97.83% 97.89% +0.06%
==========================================
Files 38 40 +2
Lines 3558 3663 +105
==========================================
+ Hits 3481 3586 +105
Misses 77 77 ☔ View full report in Codecov by Sentry. |
af9524c
to
c1528d9
Compare
c15f9c0
to
bdde841
Compare
bdde841
to
408e6b3
Compare
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 7 out of 13 changed files in this pull request and generated 1 comment.
Files not reviewed (6)
- test/classes/test_simplicial_complex.py: Evaluated as low risk
- test/classes/test_combinatorial_complex.py: Evaluated as low risk
- test/transform/test_delaunay.py: Evaluated as low risk
- toponetx/classes/combinatorial_complex.py: Evaluated as low risk
- toponetx/classes/colored_hypergraph.py: Evaluated as low risk
- test/classes/test_reportviews.py: Evaluated as low risk
Comments suppressed due to low confidence (3)
toponetx/classes/simplex.py:65
- The check for duplicate nodes should be placed before calling
super().__init__
to avoid initializing the superclass with invalid data.
if len(elements) != len(set(elements)):
toponetx/classes/simplex.py:96
- Sorting the
item
tuple here may lead to incorrect results if the elements are not comparable. Consider using a different approach to ensureitem
is a subset ofself.elements
.
item = tuple(sorted(item))
test/classes/test_simplex.py:59
- The test for
__le__
method should raiseTypeError
for non-Simplex comparison, but it currently raisesTypeError
for any invalid comparison. Ensure the test specifically checks for non-Simplex comparison.
_ = s1 <= 1
This implements a simplex trie as presented in [1] as backend data structure for the
SimplicialComplex
class. This is also used in gudhi's SC implementation. However, they do not expose all functionality we need and the data structure is implemented in native code, so we cannot interact with it directly either.Using a simplex tree should bring some nice performance improvements over the previous approach and fixes some bugs along the way as well. I will add some comparisons later.
[1] Jean-Daniel Boissonnat and Clément Maria. The Simplex Tree: An Efficient Data Structure for General Simplicial Complexes. Algorithmica, pages 1–22, 2014