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

hmod.precompute_attributes removes or does not remove singletons based off of the OS (inconsistent behaviour) #118

Closed
Leo-Aus-Berlin opened this issue Jul 20, 2023 · 2 comments
Assignees
Labels
active Work in progress bug Something isn't working

Comments

@Leo-Aus-Berlin
Copy link

Depending on which OS is being used the following will print different results:

import hypernetx as hnx
import hypernetx.algorithms.hypergraph_modularity as hmod
formulaDict,stringTree = readFile("./CDL-FMINCE/toybox.dimacs") # code by me
H=formulaToHypergraph(formulaDict)
HDual = H.dual()
H=hmod.precompute_attributes(H)
HDual = hmod.precompute_attributes(HDual)

#this should diverge based off of OS

print(len(list(H.nodes())))
print(len(list(HDual.nodes())))

On the linux systems the results are 544 and 590, while on Windows I get 175 and 221. I suspect the singletons get removed by the attribute computation on windows, but not on the linux systems...

I was using ANTLR4 with python integration to parse a dimacs (SAT) file and interpret it as a hypergraph. The resulting graph has 544 nodes and 590 edges before the attributes are computed.

Compared Systems

Ubuntu system:

  • Ubuntu 20.04.6 LTS
  • wsl 2
  • Python 3.8.10
  • pip installation manager

Debian

  • SMP Debian 5.10.127-1
  • Python 3.9.2
  • pip installation manager

Windows

  • Windows 10 Home
  • Python 3.11.3
  • Anaconda virtual environment (+VSCode)
@brendapraggastis
Copy link
Collaborator

Thanks for the example. We are working on reproducing the error and hunting down the issue.

@bonicim bonicim self-assigned this Aug 21, 2023
@bonicim bonicim added the bug Something isn't working label Aug 21, 2023
bonicim added a commit that referenced this issue Nov 3, 2023
Merge in HYP/hypernetx from HYP-177-improve-entityset-data-test to develop

* commit '74a99773d10995bf58e047ff18ea3f75354802a2':
  Update tests for soon to be deprecated translate methods
  HYP-177 Improve EntitySet.data test
@bonicim bonicim added backlog active Work in progress and removed backlog labels Jan 10, 2024
@brendapraggastis
Copy link
Collaborator

@Leo-Aus-Berlin Precompute attributes is no longer required in the modularity module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active Work in progress bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants