the-aerospace-corporation / brainblocks

Practical Tool for Building ML Applications with HTM-Like Algorithms
GNU Affero General Public License v3.0
61 stars 13 forks source link

'PatternPooler' object has no attribute 'coincidence_set' in test_blocks.py #7

Closed marty1885 closed 3 years ago

marty1885 commented 3 years ago

Hi,

I found that test_blocks is failing with the latest commit (627b8788b282bef59010cb9625c008c8349a9aff).

❯ pytest tests/python/test_blocks.py
============================= test session starts ==============================
platform linux -- Python 3.8.5, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
rootdir: /home/marty/Documents/not-my-projects/brainblocks
plugins: dash-1.16.0
collected 10 items                                                             

tests/python/test_blocks.py .F........                                   [100%]

=================================== FAILURES ===================================
__________________________ test_read_coincidence_set ___________________________

    def test_read_coincidence_set():
        e = ScalarEncoder()
        pp = PatternPooler()

        pp.input.add_child(e.output)
        pp.initialize()

>       cs = pp.coincidence_set(0)
E       AttributeError: 'PatternPooler' object has no attribute 'coincidence_set'

tests/python/test_blocks.py:39: AttributeError
=========================== short test summary info ============================
FAILED tests/python/test_blocks.py::test_read_coincidence_set - AttributeErro...
========================= 1 failed, 9 passed in 1.47s ==========================

OS: Linux CPU: aarch64 Compiler: GCC 10.0.2 Distribution: Arch Linux Python: 3.8

Let me know if I can provide information and/or help.


BTW, please let @jacobeverist know that I have sent him a message a few days back on HTM forum but he haven't logged in ~a week. And I don't have his email.

ddigiorg commented 3 years ago

I think one of the python source files might be out of date. Try running python install.py again and if that doesn't work maybe try re-cloning the repo. Here's the output of my freshly cloned brainblocks repo after running the install script:

$ pytest tests/python/test_blocks.py
============================= test session starts =============================
platform win32 -- Python 3.8.3, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
rootdir: D:\code\brainblocks
collected 10 items

tests\python\test_blocks.py ..........                                   [100%]

============================= 10 passed in 0.59s ==============================

I will ping Jacob :)

marty1885 commented 3 years ago

Ahh... my bad. Reinstalling it fixes everything. Thanks