htm-community / htm.core

Actively developed Hierarchical Temporal Memory (HTM) community fork (continuation) of NuPIC. Implementation for C++ and Python
http://numenta.org
GNU Affero General Public License v3.0
151 stars 75 forks source link

Build python module without extra dependencies #979

Closed iacore closed 2 years ago

iacore commented 2 years ago

The current project is set up so that pip install -e . will try to download mnist dataset. There also seem to be other example binaries built too.

However, I just want to build the library from source, and I don't need the mnist dataset. Is there a way to work around this?

dkeeney commented 2 years ago

The build from source command python setup.py install will download the python and C++ dependencies which includes the mnist database. The mnist database is used in part of the regression test and the examples. This only downloads the dependencies the first time. Subsequent builds do not download unless the build directory is deleted.

So, if you need a minimum build that has no regression tests or examples I would have to create a different set of CMake files. Is this really important?

iacore commented 2 years ago

This is not really important.

Having CMake generate minimal setup.py is more important. Currently the python package requries cmake from PYPI for despite not using it when installed.

Also, where can I find the documentation of using htm?

dkeeney commented 2 years ago

You could download CMake from CMake.com rather than getting it from PYPI, but use whatever works. CMake and a C++ compiler (which for windows is Visual Studio) are required to build the C++ library. But you are right, after the build, it is not used, but without it you have no library to install. All setup.py does is kick off CMake to do the work of building the C++ library and package it for use by python on your platform.

If you are looking for pre-built htm.core binaries to load from PYPI, we only have a few older versions. Would anyone like to volunteer to create the full current set?

The documentation for htm.core is in the Readme.md and in the docs folder but there is also a lot of information as comments in the algorithm code. For concepts there is nothing better than Matt's HTM School videos. For core htm theory refer to the numenta documents.