-
Notifications
You must be signed in to change notification settings - Fork 42
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
Implement neighbor sampler #76
Conversation
for more information, see https://pre-commit.ci
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.
Thanks for getting us started! This looks pretty good. Would prefer moving basic tests to C++, and using rand_engine
for any random number generator logic.
@@ -0,0 +1,49 @@ | |||
import torch |
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.
It would be great if we can just test in C++. WDYT?
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.
Sure, but unfortunately, when I want to compile pyg-lib with unit tests I am receiving undefined reference error. I wonder if this is only happening on my side?
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.
Can you show me the log?
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.
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: CMakeFiles/test_biased_random.dir/test/csrc/random/test_biased_random.cpp.o: in function `BiasedSamplingCDFConversionTest_BasicAssertions_Test::TestBody()':
test_biased_random.cpp:(.text._ZN52BiasedSamplingCDFConversionTest_BasicAssertions_Test8TestBodyEv+0x344): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: test_biased_random.cpp:(.text._ZN52BiasedSamplingCDFConversionTest_BasicAssertions_Test8TestBodyEv+0x479): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: CMakeFiles/test_biased_random.dir/test/csrc/random/test_biased_random.cpp.o: in function `BiasedSamplingAliasConversionTest_BasicAssertions_Test::TestBody()':
test_biased_random.cpp:(.text._ZN54BiasedSamplingAliasConversionTest_BasicAssertions_Test8TestBodyEv+0x90b): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: test_biased_random.cpp:(.text._ZN54BiasedSamplingAliasConversionTest_BasicAssertions_Test8TestBodyEv+0x9e3): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: test_biased_random.cpp:(.text._ZN54BiasedSamplingAliasConversionTest_BasicAssertions_Test8TestBodyEv+0xabd): undefined reference to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: CMakeFiles/test_biased_random.dir/test/csrc/random/test_biased_random.cpp.o:test_biased_random.cpp:(.text._ZN54BiasedSamplingAliasConversionTest_BasicAssertions_Test8TestBodyEv+0xb9d): more undefined references to `testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*)' follow
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: CMakeFiles/test_biased_random.dir/test/csrc/random/test_biased_random.cpp.o: in function `testing::AssertionResult testing::internal::CmpHelperOpFailure<int, double>(char const*, char const*, int const&, double const&, char const*)':
test_biased_random.cpp:(.text._ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_[_ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_]+0xa4): undefined reference to `testing::Message::GetString[abi:cxx11]() const'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: test_biased_random.cpp:(.text._ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_[_ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_]+0x15d): undefined reference to `testing::Message::GetString[abi:cxx11]() const'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: test_biased_random.cpp:(.text._ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_[_ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_]+0x1ff): undefined reference to `testing::Message::GetString[abi:cxx11]() const'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: test_biased_random.cpp:(.text._ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_[_ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_]+0x2b0): undefined reference to `testing::Message::GetString[abi:cxx11]() const'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: test_biased_random.cpp:(.text._ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_[_ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_]+0x352): undefined reference to `testing::Message::GetString[abi:cxx11]() const'
/home/kgajdamo/miniconda3/envs/pyg/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: CMakeFiles/test_biased_random.dir/test/csrc/random/test_biased_random.cpp.o:test_biased_random.cpp:(.text._ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_[_ZN7testing8internal18CmpHelperOpFailureIidEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_]+0x40b): more undefined references to `testing::Message::GetString[abi:cxx11]() const' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/test_biased_random.dir/build.make:102: test_biased_random] Error 1
make[1]: *** [CMakeFiles/Makefile2:204: CMakeFiles/test_biased_random.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
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.
@ZenoTan Did you see this before? If not, let's ignore C++ tests for now :)
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.
Didn't meet this but it looks like the linkage to gtest failed. It's fine to ignore though.
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.
Do you also get this error during compilation or is it just me?
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.
I did not get exactly the same, but similar issues when I tried to build other libraries.
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.
Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
- Coverage 86.82% 78.59% -8.23%
==========================================
Files 14 14
Lines 258 285 +27
==========================================
Hits 224 224
- Misses 34 61 +27
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
6168329
to
d628574
Compare
61fd42a
to
561a668
Compare
I think this is a great start. Thank you so much for putting this together. I also added |
The purpose of this PR is to implement neighbor sampler in pyg-lib.
What has been done:
In progress: