Investigating nupic.cpp / nupic.py for research

research
community
numenta
#1

Hey folks, I am going to be investigating nupic.cpp and nupic.py as part of my work preparing htmresearch for Python 3. We need to create Python 3 bindings for it, so we’ll need to either use nupic.core or nupic.cpp.

I know most of your work has been on nupic.cpp, and it might easiest for us to create new bindings directly against it. Part of my work will be investigating the APIs htmresearch is using.

I’m planning on live-streaming this Friday starting around 9AM on Twitch, and I would love it if anyone wanted to join and help me out in chat or even over voice (you need to install Discord for voice). Or just come hangout and chat with others in the community while I work. I’m happy either way.

1 Like

#2

Hi Matt, this is huge news!

yes, the goal is that nupic.cpp offers (also) all of nupic.py (by bindings or pure python), so that should not matter to you. But for 100% pure python (as if using nupic.py) we’re not there yet.

A word on the APIs:

  • C++:
  • NetworkAPI:
    • in PY (and we offer also in C++)
    • 99.9% feature & compatibility (so if htmresearch used only NetworkAPI, you’re good to go from the start)
  • bindings:
    • currently for Python (both 2, 3)
    • coverage 100% as were SWIG bindings in nupic.core (all main classes SP, TM)
    • compatibility: same applies as in C++, but a lot of the changes are shielded away by python, so this would be even more compatible than pure C++

API plans & stability:

based on our “User survey”, we agreed the following on the features-vs-compatibility front:
API “stability” plans (how likely we’re to allow changes to API?):

  • C++ (some changes allowed) < py bindings < NetworkAPI (almost no at all)

So for HTMResearch:

  • if you need only the NetworkAPI functionality, go with NAPI (and you can use both C++, Py)
  • if you need a direct access to the classes, go with py bindings
  • for max performance or all specific, newest features, you should use C++ API.
1 Like

#3

I’ll try to be available, you’re west-cost time?
So it’s either chat here, or voice over discord?

1 Like

#4

Thanks for the insights, Marek! Yes the time is 9AM - 12 PDT, which would be UTC-7.

0 Likes

#5

So I am live now, streaming my work day. This will be my main task today. https://www.twitch.tv/rhyolight_

0 Likes

#6

This was a great stream, here is a highlight, or see the whole boring thing:

Bottom line, it already worked! Once @breznak nudged me in the right direction, I achieved my goal of creating and computing an SP in C++ through Python 3. Thanks so much Marek!

4 Likes

#7

Thanks a lot for checking it out. I’ll be really happy if you can use nupic.cpp for more of your experimentation.
Guys, take this as an invitation to use nupic.cpp for your c++/python experiments. The py interface still might need some love, but once you open a bug (or PR <3) we’ll be very fast to resolve it.

2 Likes