numenta/nupic — pull request #925 by moorejpdx (2014-05-09 00:25:10+00:00)
Title: Grok cleanup for swarming libraries

This corrects issue #759. I didn't fix the unit tests, but think will make a separate issue for it (which I'm happy to work on). It just didn't fit the scope of the issue I'm working on.

Quick summary. References to grok renamed to nupic. References to Grok either removed or renamed to Nupic. Passes unit tests locally, also ran locally on sine-prediction and hot-gym swarms.

The ModelRunner.py is the only part of this issue that wasn't a simple search and replace. I went ahead and made my best guess. Seeing as StreamDisappearedError is a custom error message which isn't used in the py code tree, I just removed the unnecessary try/catch. I think the idea is correct, and probably get test cases designed and feature implemented. In fact, the class RecordStreamIface has a function getNextRecord that refers to its' existence, just never uses it. In regards to the rest of the ModelRunner, I created a dir with a name that includes the _modelCheckpointGUID, and then calls the model's save function to save a copy of it's state in there. The deleteModelCheckpoint was a simple shutil.rmtree at that point. If anyone has a better way of doing this, please let me know.