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

Fix test laplacian lambda max #242

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aurorarossi
Copy link
Member

With this PR I added the seed for rand_graph.

@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

Merging #242 (55fd2b4) into master (1381a78) will increase coverage by 0.13%.
The diff coverage is 93.75%.

@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
+ Coverage   88.29%   88.42%   +0.13%     
==========================================
  Files          16       16              
  Lines        1597     1624      +27     
==========================================
+ Hits         1410     1436      +26     
- Misses        187      188       +1     
Impacted Files Coverage Δ
src/GNNGraphs/gnnheterograph.jl 85.91% <93.75%> (+4.09%) ⬆️
src/GNNGraphs/transform.jl 96.55% <0.00%> (+0.43%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

data = [g for i in 1:5]
gall = Flux.batch(data)
@test laplacian_lambda_max(gall) ≈ [Float32(1.809017) for i in 1:5]
@test length(laplacian_lambda_max(gall)) == 5
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@test length(laplacian_lambda_max(gall)) == 5

the length is already implicitly tested in the line above

@CarloLucibello
Copy link
Member

The problem this PR is trying to fix is the Laplacian test on nightly CI runs, e.g. here, right?

I don't know why that is happening but in principle computing the top eigenvalues of those rand bidirected graphs should not be problematic since their adjacency matrix is symmetric. Maybe zero-degree nodes cause some problems? Although I don't see why they should

@aurorarossi
Copy link
Member Author

Yes and also in the function _eigmax there is the following line:

 KrylovKit.eigsolve(Symmetric(A), x0, 1, :LR)[1][1]

hence A is forced to be symmetric.
When I run the tests on my computer they run smoothly (I have Julia 1.8).

@CarloLucibello
Copy link
Member

So all this PR does is remove a test...

@aurorarossi aurorarossi marked this pull request as draft January 9, 2023 13:23
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