Skip to content

Bug fixing#12

Open
kacper3615 wants to merge 6 commits intomainfrom
kacper3615/bug_fixing
Open

Bug fixing#12
kacper3615 wants to merge 6 commits intomainfrom
kacper3615/bug_fixing

Conversation

@kacper3615
Copy link
Copy Markdown
Owner

No description provided.

@kacper3615 kacper3615 requested a review from basiav November 2, 2025 19:34
Comment on lines +32 to +43

if not hasattr(self, "_full_modularity_matrix"):
self._full_modularity_matrix = Network(
G, resolution=resolution, weight=weight, community=community
).calculate_full_modularity_matrix()
network = Network(
G,
resolution=resolution,
weight=weight,
community=community,
full_modularity_matrix=self._full_modularity_matrix,
)
Copy link
Copy Markdown
Collaborator

@basiav basiav Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. However GurobiSampler needs it, as well. How about adding this code as a method to the abstract class (HierarchicalSampler)? As an optional method (without "@ abstractmethod") with default implementation?
obraz

By the way, I think self.weight can be saved as an attribute in AdvantageSampler and GurobiSampler, "community" would stay then as the only argument that isn't saved (cannot be) and is special. Self.weights can be saved I think.

Comment on lines +14 to +15
version: str | None = None,
region: str | None = None,
Copy link
Copy Markdown
Collaborator

@basiav basiav Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here ok, but args "version" and "region" have gotten lost in Advantage in QHyper kacper3615/bug_fixing, they are not used there. Looks like a small mistake after refactoring. I added a comment in the PR in QHyper. Make sure nothing else got lost in Advantage after refactor ;)

Copy link
Copy Markdown
Collaborator

@basiav basiav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added comments and proposed small changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants