-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Removal of obsolete/non-essential/dead-code from nupic #1862
Comments
just to clarify, is the goal of TM to do temporal predictions? (what TP does), or is it "just" a sequence memory (justifying functionality for both TP/TM) ? |
The current TM does predictions for one step. The Old TP does predictions I may be wrong - Chetan? David On Mon, Feb 23, 2015 at 8:32 PM, breznak notifications@github.com wrote:
We find it hard to hear what another is saying because of how loudly "who |
👍 for removing FDRCSpatial2, TPTrivial, TrivialPredictor.py and the unused code in fdrutilities.py. TP and TP10X are important right now - they are the main ones used in production and by the OPF. TP10X is an optimized version of TP. There are tests to make sure they are identical in functionality. They are somewhat redundant with temporal_memory.py but until we have a fast C++ version of that we can't switch over. @chetan51 can probably comment on the others. |
Thanks! I created issues for them. I also re-organized the checklist to reduce the number of issues and future PRs. Furthermore, I created a mirror super issue in |
@cogmission The old temporal memory implementation (TP.py) also only made one prediction (of the next time step). The temporal pooling functionality in it (making predictions of multiple time steps in advance) is deprecated. |
Someone should keep track of how many lines and files NuPIC currently has, and then check again when we do the cleanup release. It will be cool to see how much we actually remove! |
👍 On before/after tracking :) On Tue, Feb 24, 2015 at 4:17 PM, Subutai Ahmad notifications@github.com
We find it hard to hear what another is saying because of how loudly "who |
I think this cleanup release will be cleaner in sense of understand the CLA algorithms, not in size (although some decreasing of lines). The files that are being removed are not too big, but their presence confuse a lot of users (even expert guys).. I believe this is the big deal.. |
@chetan51 Could you say us whether |
It is critical, because it's the version of temporal memory that one would use in a production setting for performance reasons. |
I got it. Then once @rcrowder pull the c++ version of TemporalMemory to nupic.core we could remove it, right? |
Currently, the approach I have in mind is:
After creating |
Yes, I agree. I forgot mentionate that |
Everything mentioned in there needs to be kept. Can you remove those two bullets from the description? |
I was waiting a @rcrowder feedback about C++ TM port. Depending his progress we could remove TP and its childreen in the "cleanup" milestone which this super issue aims. But it seems that this job requires a lot of work and an milestone only for it. What do you guys think we have a milestone only for "Removal of old TPs and fast_temporal_memory"? |
@david-ragazzi - that is definitely outside the scope of a clean up PR. It is possible we would go through a bunch of effort to validate the new TM implementation and find out we still need to keep the TP/TP10X2 implementations because they are better for certain problems. If you really want to work on that then perhaps @subutai can outline the tasks we would go through to see if the new TM implementation can completely replace TP/TP10X2. This isn't a priority for Numenta folks so someone from the community would have to do it. And like I said, the outcome might be validation that TP/TP10X2 are better for some important applications as is our current belief. A couple notes on the other items:
|
@scottpurdy We would have to try anyway.. Even so some renaming is necessary and perhaps TP and TP10X2 could become a single class (well, just speculations).. About this:
@chetan51 said:
By the way, as I said we have to try.. No way reject improvements if we not try it at least. Do you agree? |
David, you need to understand what the different components do before you can make a judgement to remove them or not. TP and TP10X2 cannot be combined. The former is a mostly-Python implementation and the latter is an entirely C++ implementation. They are functionally identical (we have explicit tests to enforce this) but the mostly-Python version is easier to experiment with while the C++ one is faster / better for production. And similarly, fast_temporal_memory contains a subclass of the new temporal memory that uses a fast C++ data structure. So if we had a completely-C++ implementation of the temporal memory then yes, we could swap from the hybrid Python class to the bindings for the complete C++ implementation. The general philosophy is that we want a full C++ implementation and a full Python implementation with tests to ensure they are functionally identical. This allows for easy experimentation in Python with fast C++ implementations for production use. But sometimes we deviate from this when we can move small pieces of the Python to C++ for a significant speed up while still having most of the code in Python for easy experimentation. It seems like the different implementations and strategies make you uncomfortable but we aren't going to artificially restrict ourselves to a single implementation or to only pure Python or pure C++ implementations.
I'm not sure what you are referring to. |
Thanks, @scottpurdy. I think I was a little hasty about it. Now I have better idea of what you mean and why you guys want preserve them. In other words, we have |
Yup! |
Well, I created an issue which suggest we uniformize these class names. Hopefully once their serialization is done, we can rename them accordingly: |
Subtasks are not complete, even though they were checked int he description. I've unchecked the incomplete subtasks and reopened this ticket. |
All subtasks complete. |
Here I list a serie of possible removals for make the nupic repo clearer and easy to follow and maintain as discussed in ML. Some of these removals should also be aplied to nupic.core in case of equivalent code (numenta/nupic.core-legacy#354).
nupic/research
:DataGenerator.py
,ObjDiff.py
,TrainingHooks.py
,TrainingHooks.py
,anomalyzer.py
). These dead codes are used in anywhere (except in their tests/examples). Issue: Remove dead code from nupic/research #1857, Fixed by: Removed dead code from nupic/research #1858FDRCSpatial2.py
, andfdrutilities.py
): Do we really need this old implementation asspatial_pooler
is its replacement?. Another point,fdrutilities.py
has a lot of dead code. Issue: Remove obsolete implementations of SP #1864, Fixed by: Remove FDRCSpatial2 #1872flat_spatial_pooler.py
). Issue: Remove flat spatial poolers #627, Fixed by: Remove FlatSpatialPooler #2056TPTrivial.py
andTrivialPredictor.py
): I've checked the use of these classes in code, and I found that are little used. Issue: Remove derived implementations of TP #1865, Fixed by: Remove derivated implementations of TP #1873It seems that TP is the big problem to a clean repository as it has several derived classes and hacks to keep consistency between them. As
temporal_memory
gets mature, we could remove TP and its inheritance and so the repository finally would get nice and clean. By the way, while TP is not fully removed, some derived classes could be removed right now (TPTrivial
,fast_temporal_memory
, etc).The text was updated successfully, but these errors were encountered: