Hi Erin, As you've seen with a native Python application, the loading and saving of pickled model checkpoint files does currently work. An example is the opf integration test called opf_checkpoint_stress_test.py
You're calling the loadFromCheckpoint correctly to use the pickled (.pkl) form for saving and loading (using the default 'newSerialization=False'). I'm guessing that you have tried loading checkpoint'd model directory files in a native Python app, and that works? It's difficult to tell without seeing more of the exception output where inside loadFromCheckpoint hierarchy the failure you're seeing is. Can you supply more of that output? My first though was towards malformed/relative network share URI(s). Is the model checkpoint directory on a network drive? Regards, Richard. On Wed, Feb 10, 2016 at 6:18 PM, Matthew Taylor <[email protected]> wrote: > Erin, > > First of all, kudos to you, brave Windows developer, for getting NuPIC up > and running in your development environment! Please document your progress > and problems if you can, because we'd like to try to make this easier for > all Windows users. This is of course an ongoing problem. > > Also, thanks for trying out HITC and making changes to enable predictions. > However it is hard to tell what you've done in the comparison [1] because > of the Windows line breaks :P. In any case, I believe that HITC can provide > predictions if different model params are used that specify that > "inferenceType" in them. I don't think any code changes are necessary. > That's probably a different discussion, so if you have any input, let's > please communicate via Github Issues [2]. > > Regarding the model load error you are getting, I'm not sure that any of > us have tested model serialization on Windows just yet. You may be the > pioneering engineer (pioengineer?) who's first run into this problem. I > will have to defer to Richard Crowder and Marion LeBorgne, who've been > running NuPIC on Windows lately. I will make sure they see this message. > > [1] > https://github.com/nupic-community/hitc/compare/master...erinloy:master > [2] https://github.com/nupic-community/hitc/issues > > Thanks for trying NuPIC! > > > --------- > Matt Taylor > OS Community Flag-Bearer > Numenta > > On Wed, Feb 10, 2016 at 9:25 AM, Erin Loy <[email protected]> > wrote: > >> Hi Everyone, >> >> I'm using nupic\opf from C# on Windows (Thanks for doing the work to make >> this possible!). I have a simple console app for testing, and an add-in >> extension for another larger commercial application. >> >> I've experimented with a few RPC/bridging approaches: >> >> - Web service (a branch of "htic" project, hacked up to support >> predictions - *probably broke anomalies though*): works well, but >> request/response slows everything down (it's not very clean, but you can >> get the gist here: >> https://github.com/erinloy/hitc/blob/master/htm-over-http/htmoverhttp/views_api.py >> ) >> >> - Python.NET (wrapper for accessing .NET from native python, or in my >> case, embedding native python in a .NET app: >> https://github.com/pythonnet/pythonnet): Works in the console app >> (after a lot of hacking on the python environment), but chokes on the code >> obfuscation in the parent app when trying to discover the contents of all >> loaded assemblies. Probably not a good idea to mix technologies in the >> same process - too many bad interactions. >> >> - A regular Windows COM server (via python comtypes library): This was >> easy to build, performs well, and seems to play nice with everything else >> by keeping processes separate, and can be extended for remote access if >> needed. I'll probably end up sticking with this option. >> >> In all cases, I can create a model, run data through it, get predictions >> back, and save it at checkpoints. However, the latter two options (not >> sure if I tried it with the web service option) give me an error when >> trying to load a saved model: >> >> Code: >> def load_model(self, modelSaveDir): >> print "Loading model from %s..." % modelSaveDir >> model = ModelFactory.loadFromCheckpoint(modelSaveDir) >> >> Error: >> Wrong number or type of arguments for overloaded function 'new_Network'. >> Possible C/C++ prototypes are: >> nupic::Network::Network() >> nupic::Network::Network(std::string const &) >> >> This works when running from native python (via a hacked up onegym >> sample). >> The latest version of Nupic was installed via pip. >> >> Thoughts? >> >> -Erin >> > >
