Htmresearch failing tests

I am trying to install htmresearch in order to replicate your the results on your most recent paper titled “Why Does the Neocortex Have Layers and Columns, A Theory of Learning the 3D Structure of the World.” After running tests I get a module import error:
ImportError: No module named htmresearch_core.experimental

Has this module been removed from htmresearch?

So you are following this?

Are you sure you have the latest htmresearch code installed?

The htmresearch-core installation instructions are currently only available in @lscheinkman’s comment here: Where is the sensorimotor code?. The htmresearch and htmresearch-core READMEs are not up-to-date. I’ll add @lscheinkman’s instructions to the READMEs.

The htmpapers repo does not support pip install of htmresearch yet. We’re planning on adding that.

1 Like

Yes and yes. I am following explanations in the above two links. I get the following error after attempting to import ApicalTiebreakTemporalMemory

ImportError: No module named apical_tiebreak_temporal_memory

I also run the tests and, according to my understanding, I get errors caused by

ImportError: No module named htmresearch_core.experimental

==================================== ERRORS ====================================
 ERROR collecting tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_algorithm_test.py 
ImportError while importing test module '/opt/htmresearch/tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_algorithm_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_algorithm_test.py:25: in <module>
    from htmresearch_core.experimental import ApicalTiebreakPairMemory
E   ImportError: No module named htmresearch_core.experimental
 ERROR collecting tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_apical_tiebreak_sequences_test.py 
ImportError while importing test module '/opt/htmresearch/tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_apical_tiebreak_sequences_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_apical_tiebreak_sequences_test.py:28: in <module>
    from htmresearch_core.experimental import ApicalTiebreakSequenceMemory
E   ImportError: No module named htmresearch_core.experimental
 ERROR collecting tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_apical_tiebreak_test.py 
ImportError while importing test module '/opt/htmresearch/tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_apical_tiebreak_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_apical_tiebreak_test.py:28: in <module>
    from htmresearch_core.experimental import ApicalTiebreakPairMemory
E   ImportError: No module named htmresearch_core.experimental
 ERROR collecting tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_sequence_memory_test.py 
ImportError while importing test module '/opt/htmresearch/tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_sequence_memory_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_sequence_memory_test.py:28: in <module>
    from htmresearch_core.experimental import ApicalTiebreakSequenceMemory
E   ImportError: No module named htmresearch_core.experimental
 ERROR collecting tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_unit_test.py 
ImportError while importing test module '/opt/htmresearch/tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_unit_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/algorithms/apical_tiebreak_temporal_memory_cpp/attm_cpp_unit_test.py:28: in <module>
    from htmresearch_core.experimental import ApicalTiebreakPairMemory
E   ImportError: No module named htmresearch_core.experimental

The htmresearch-core repository is giving instructions for installing nupic.core not htmresearch-core.

It was originally a fork of nupic.core, and the README was never updated. I think @mrcslws is working on updating the readme with installation instructions he linked to above. Can you try those?

Done. You should now be able to run the code by following instructions in the htmresearch and htmresearch-core READMEs.

2 Likes

Thanks! Installed htmresearch-core and htmresearch now.

2 Likes