Coder Social home page Coder Social logo

Make eigen as a submodule about netket HOT 7 CLOSED

netket avatar netket commented on May 29, 2024
Make eigen as a submodule

from netket.

Comments (7)

gcarleo avatar gcarleo commented on May 29, 2024

I was looking into using submodules before releasing.
One potential issue is that here we are interested only in Eigen headers, and not the full Eigen repository, which contains much more.

If you know of a simple way to add it as a submodule but then just taking the Eigen/ folder, that would be helpful.

Concerning Makefile, vs CMake : building NetKet is purposely meant to be as simple as possible. The Makefile is actually not even needed, it's just a few lines.

We should decide what strategy is the best. There is also this discussion #8 which is related.

xtensors seems an interesting project. The reason I chose Eigen is that it has all the BLAS/Lapack linear algebra built-in and more. Also, they have a tensor module, even though at the moment this is not used/needed in NetKet.

from netket.

Roger-luo avatar Roger-luo commented on May 29, 2024

You can always use only headers, if you make it as an submodule. And then you can easily track the up stream. Just simply follow the instructions in documents and you can create a submodule with only one line. Cmake is not about make this complex, but is about make this stable. Cmake offer you a stable way to load dependencies and tests , etc. I also notice that netket is lack of unit tests. There's no test coverage information and contiguous integration enabled. These tools and rules will help you manage a open-source project.

Less code means less stability and less compatibility. There's no silver bullet.

from netket.

gcarleo avatar gcarleo commented on May 29, 2024

As far as I understand there is no clean way to get only the headers of a repository, using sudmodules. Please provide an example if you managed to do that in a clean way (see also this discussion https://stackoverflow.com/questions/3866733/how-to-clone-only-a-folder-from-a-git-submodule) .

Unit tests have not been pushed yet to the repo, I am still working on those. They will be added as soon as possible.

from netket.

Roger-luo avatar Roger-luo commented on May 29, 2024

Is there any release version of header only eigen? If there's not I believe you should use the entire package as dependencies. Or if you insist on a header only library, you can maintain a custom fork of Eigen. But including it in the repo is definitely not clean.

from netket.

gcarleo avatar gcarleo commented on May 29, 2024

@Roger-luo , in the branch "AllObjects" I implemented a CMake setup. You might want to have a look and comment.

from netket.

Roger-luo avatar Roger-luo commented on May 29, 2024

Looks nice. But be careful if you have openmp support, there are some workarounds for different platforms. There are also some other work around you might need. This would be a good example

https://github.com/pytorch/pytorch/blob/master/aten/CMakeLists.txt#L160

But I think we can discuss this after there is unit tests for netket.

from netket.

gcarleo avatar gcarleo commented on May 29, 2024

I am closing this issue at the moment, since I haven't found a clean strategy to include external libraries using submodules. Indeed it seems that many other projects have some folder in the repo with external libraries,

from netket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.