Skip to content

"HelloSPTPTest" Fails on a clean installation #1004

@VladShtompel

Description

@VladShtompel

I'm trying to setup a completely new venv with python3.11, and HelloSPTPTest fails right out of the box (Linux).

What I did:

  1. Created a new venv with python 3.11.5 (dev version installed ofc)
  2. Cloned htm.core
  3. Installed requirements.txt
  4. Ran python setup.py install
  5. Ran python setup.py test

What I get:

[==========] 392 tests from 43 test suites ran. (32113 ms total)
[ PASSED ] 391 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] HelloSPTPTest.performance

The actual test result of the failed test:

[ RUN ] HelloSPTPTest.performance
starting test. DIM_INPUT=1000, DIM=2048, CELLS=8
EPOCHS = 5000
starting: 5000 iterations.

Input :
SDR( 1000 )
Sparsity Min/Mean/Std/Max 0.168 / 0.180563 / 0.00368699 / 0.194
Activation Frequency Min/Mean/Std/Max 0.0430995 / 0.180566 / 0.0573961 / 0.374857
Entropy 0.976203
Overlap Min/Mean/Std/Max 0.655556 / 0.896189 / 0.112128 / 0.989691

SP(local) Connections:
Inputs (1000) ~> Outputs (2048) via Segments (2048)
Segments on Cell Min/Mean/Max 1 / 1 / 1
Potential Synapses on Segment Min/Mean/Max 17 / 17 / 17
Connected Synapses on Segment Min/Mean/Max 2 / 11.3979 / 17
Synapses Dead (0.207433%) Saturated (0.18322%)
Synapses pruned (0%) Segments pruned (0%)
Buffer for destroyed synapses: 0 Buffer for destroyed segments: 0

SP(local) SDR( 2048 )
Sparsity Min/Mean/Std/Max 0.0458984 / 0.0581668 / 0.00260136 / 0.0683594
Activation Frequency Min/Mean/Std/Max 0 / 0.0581676 / 0.0553632 / 0.292738
Entropy 0.865157
Overlap Min/Mean/Std/Max 0.284483 / 0.567354 / 0.132346 / 0.979381

SP(global) Connections:
Inputs (1000) ~> Outputs (2048) via Segments (2048)
Segments on Cell Min/Mean/Max 1 / 1 / 1
Potential Synapses on Segment Min/Mean/Max 17 / 17 / 17
Connected Synapses on Segment Min/Mean/Max 2 / 11.5742 / 17
Synapses Dead (0.112448%) Saturated (0.196576%)
Synapses pruned (0%) Segments pruned (0%)
Buffer for destroyed synapses: 0 Buffer for destroyed segments: 0

SP(global) SDR( 2048 )
Sparsity Min/Mean/Std/Max 0.0498047 / 0.0498047 / 0 / 0.0498047
Activation Frequency Min/Mean/Std/Max 0 / 0.0498054 / 0.0584234 / 0.300795
Entropy 0.815132
Overlap Min/Mean/Std/Max 0.22549 / 0.609699 / 0.141197 / 0.980392

TM Connections:
Inputs (10356) ~> Outputs (16384) via Segments (39741)
Segments on Cell Min/Mean/Max 0 / 2.4256 / 10
Potential Synapses on Segment Min/Mean/Max 20 / 27.8968 / 56
Connected Synapses on Segment Min/Mean/Max 0 / 9.8185 / 38
Synapses Dead (0%) Saturated (0.118067%)
Synapses pruned (0.634643%) Segments pruned (0%)
Buffer for destroyed synapses: 0 Buffer for destroyed segments: 0

TM SDR( 2048 )
Sparsity Min/Mean/Std/Max 0 / 0.0533186 / 0.0299985 / 0.120117
Activation Frequency Min/Mean/Std/Max 0 / 0.0533193 / 0.0658681 / 0.3388
Entropy 0.795271
Overlap Min/Mean/Std/Max 0 / 0.55941 / 0.274176 / 1

Epoch = 5000
Anomaly = 0.578431
Anomaly (avg) = 0.373364
Anomaly (Likelihood) = 0.895351
input = SDR( 1000 ) 0, 4, 13, 21, 24, 30, 32, 37, 40, 46, 47, 48, 50, 51, 64, 68, 79, 81, 89, 97, 99, 114, 120, 135, 136, 140, 141, 143, 144, 147, 151, 155, 161, 162, 164, 165, 169, 172, 174, 179, 181, 192, 201, 204, 205, 210, 213, 226, 227, 237, 242, 247, 249, 254, 255, 262, 268, 271, 282, 283, 295, 302, 306, 307, 317, 330, 349, 353, 366, 380, 383, 393, 404, 409, 410, 420, 422, 441, 446, 447, 456, 458, 464, 468, 476, 497, 499, 512, 521, 528, 531, 534, 538, 539, 541, 545, 550, 557, 562, 565, 575, 581, 589, 592, 599, 613, 617, 622, 647, 652, 686, 687, 691, 699, 704, 710, 713, 716, 722, 729, 736, 740, 747, 749, 753, 754, 758, 766, 778, 790, 791, 797, 800, 808, 809, 812, 815, 826, 828, 830, 837, 852, 853, 856, 863, 864, 873, 878, 882, 885, 893, 894, 895, 905, 906, 914, 915, 920, 924, 927, 937, 939, 944, 947, 951, 954, 956, 967, 968, 969, 973, 975, 976, 979, 981, 991, 998

SP (g)= SDR( 2048 ) 62, 72, 73, 82, 85, 102, 263, 277, 287, 303, 306, 308, 309, 322, 337, 339, 340, 352, 370, 493, 1094, 1095, 1114, 1115, 1120, 1463, 1512, 1518, 1647, 1651, 1691, 1694, 1729, 1745, 1746, 1760, 1770, 1774, 1775, 1781, 1797, 1798, 1803, 1804, 1805, 1812, 1827, 1828, 1831, 1832, 1858, 1859, 1860, 1861, 1862, 1875, 1878, 1880, 1881, 1898, 1918, 1923, 1929, 1931, 1936, 1950, 1953, 1956, 1958, 1961, 1964, 1965, 1967, 1971, 1973, 1975, 1976, 1979, 1980, 1981, 1982, 1984, 1985, 1986, 1988, 1991, 1994, 1996, 1997, 1998, 1999, 2002, 2006, 2008, 2011, 2012, 2013, 2017, 2019, 2022, 2027, 2030

SP (l)= SDR( 2048 ) 12, 13, 71, 72, 75, 78, 82, 85, 131, 171, 182, 186, 189, 194, 201, 263, 277, 287, 308, 319, 323, 337, 339, 365, 407, 429, 432, 434, 443, 445, 493, 494, 502, 508, 523, 542, 554, 559, 585, 586, 610, 611, 612, 644, 645, 647, 691, 698, 699, 701, 702, 707, 777, 809, 810, 811, 833, 839, 841, 920, 923, 928, 929, 935, 955, 1003, 1005, 1073, 1076, 1094, 1095, 1114, 1115, 1133, 1134, 1184, 1203, 1232, 1233, 1244, 1253, 1268, 1278, 1291, 1294, 1306, 1309, 1331, 1402, 1410, 1427, 1434, 1442, 1463, 1508, 1512, 1514, 1515, 1518, 1561, 1564, 1623, 1626, 1630, 1640, 1647, 1691, 1694, 1729, 1745, 1746, 1760, 1797, 1804, 1805, 1812, 1827, 1831, 1858, 1861, 1862, 1918, 1956, 1961, 1965, 1971, 1975, 1994, 2012

TM= SDR( 2048 ) 72, 102, 159, 322, 337, 339, 352, 370, 432, 939, 1095, 1499, 1508, 1546, 1547, 1623, 1626, 1668, 1691, 1694, 1711, 1729, 1781, 1797, 1803, 1804, 1805, 1812, 1824, 1827, 1832, 1841, 1858, 1861, 1862, 1870, 1931, 1941, 1943, 1952, 1955, 1956, 1958, 1961, 1971, 1973, 1975, 1976, 1979, 1981, 1985, 1991, 1992, 2002, 2006, 2008, 2012, 2013, 2036, 2039, 2042

==============TIMERS============
Init: 0.216878
Random: 0.0959785
Encode: 0.0250834
SP (l): 3.44816
SP (g): 0.445475
TM: 2.95453
AN: 0.288972
unknown file: Failure
C++ exception with description "Exception: HelloSPTP.cpp(230) message: CHECK FAILED: "outTM == goldTM" Deterministic output of TM failed!
SDR( 2048 ) 72, 102, 159, 322, 337, 339, 352, 370, 432, 939, 1095, 1499, 1508, 1546, 1547, 1623, 1626, 1668, 1691, 1694, 1711, 1729, 1781, 1797, 1803, 1804, 1805, 1812, 1824, 1827, 1832, 1841, 1858, 1861, 1862, 1870, 1931, 1941, 1943, 1952, 1955, 1956, 1958, 1961, 1971, 1973, 1975, 1976, 1979, 1981, 1985, 1991, 1992, 2002, 2006, 2008, 2012, 2013, 2036, 2039, 2042
should be:
SDR( 2048 ) 72, 85, 102, 114, 122, 126, 287, 308, 337, 339, 542, 920, 939, 952, 1268, 1507, 1508, 1518, 1546, 1547, 1626, 1627, 1633, 1668, 1727, 1804, 1805, 1827, 1832, 1844, 1859, 1862, 1918, 1920, 1924, 1931, 1933, 1945, 1961, 1965, 1966, 1968, 1970, 1973, 1975, 1976, 1977, 1979, 1986, 1987, 1991, 1992, 1996, 1998, 2002, 2006, 2008, 2012, 2042, 2045
" thrown in the test body.
[ FAILED ] HelloSPTPTest.performance (7519 ms)

This is on Ubuntu 22.04 if it matters.
My pip packages:

Package Version


certifi 2023.7.22
charset-normalizer 3.3.0
cmake 3.27.6
Hexy 1.4.4
htm.core 2.1.16
htm.core 2.1.16
idna 3.4
iniconfig 2.0.0
mock 5.1.0
numpy 1.26.0
packaging 23.2
pip 23.2.1
pluggy 1.3.0
prettytable 3.9.0
pytest 7.4.2
requests 2.31.0
setuptools 65.5.0
urllib3 2.0.5
wcwidth 0.2.8
wheel 0.41.2

Any ideas? I really want to get it working correctly.
Maybe if all other tests pass it could be an issue with HelloSPTPTest itself? i.e. The expected output SDR is not up to date somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions