Does anyone know of opensource and/or commercial code that would allow the replacement of functionality related to the following nupic.py imports?
from nupic.frameworks.opf.htm_prediction_model import HTMPredictionModel
from nupic.algorithms.anomaly_likelihood import AnomalyLikelihood
from nupic.frameworks.opf.common_models.cluster_params import getScalarMetricWithTimeOfDayAnomalyParams
from nupic.frameworks.opf.model_factory import ModelFactory
We’re aware of htm.core, but its license disallows us from using it, said license effectively being AGPL.
I’m thinking a drop-in replacement would be too much to hope for, but maybe something is out there that would work with some hard work?
I think Python 3 would probably be ideal, but does it help if we’re willing to rewrite in another language? Java, C++, Golang, Clojure: they all sound interesting, and I do not mean to limit the discussion to these five.
I see the four implementations at https://numenta.org/implementations/ , but this page seems a bit dated; it does not include Etaler and it doesn’t point out that nupic.py only runs on an outdated version of Python. Also, I’m afraid I don’t know enough about HTM to tell if these implementations can do something similar to imports 1 through 4 above.
We’re aware of htm.core, and it’d be an attractive option for us if it weren’t for the project’s (effectively) AGPL license.
I wonder, though, if we could put together a microservice REST interface for just those four parts we need using htm.core, and then give away just that microservice. Does AGPL allow something like that? It might prove too slow, but still seems like an option to keep in mind.
You can create an HTTP server that hosts an HTM service that is AGPL. That HTTP server code must also be AGPL, but it allows you to create clients to that service that can be whatever license you like. We have experimented with this here, but this pretty old code.
As one of the maintainers of htm.core let me offer another alternative. The NetworkAPI facilities in htm.core are constructed such that there is a plugin (which we call a Region) for each algorithm. During execution, data flow passes from plugin to plugin according to your app. We have regions written in C++ as well as Python. The plugins constructed for the algorithms such as encoders, SP, TM, anomaly_likelihood and prediction do access the common library and the license applies to them.
However, you can write the main app and any other plugins you like that can be compiled separately in any language. Since they are linked at runtime these extra modules can be any license as long as they don’t link with the core library…and they would not need to. So, you pass your data to an encoder using a REST or whatever, the NetworkAPI passes that data through the algorithms arranged any way you would like and passes the data to one of your plugins where you could do what you want with it.
Each invocation of NetworkAPI could be at a higher level REST as Paul suggests.
Your list includes OPF components. We did not think any one was still using that so we did not port that to C++ as plugins. But the old OPF just called the lower level algorithms which we do include.
Seeing Etaler mentioned.
Unfortunately Etaler isn’t a drop in replacement of NuPIC nor support OPF. A considerable rewired of your code base will be needed. Think like switching from TensorFlow to PyTorch. They do the same thing, but you’ll have to express what you want to do in a different way.