Hello, I am a newbie here.
Installing NuPIC on Ubuntu 16.04 LTS seemed to be successful, but when running the hot_gym_swarm test i get the following error:
python ./nupic/examples/opf/clients/hotgym/prediction/one_gym/swarm.py
This script runs a swarm on the input data (rec-center-hourly.csv) and
creates a model parameters file in the model_params
directory containing
the best model found by the swarm. Dumps a bunch of crud to stdout because
that is just what swarming does at this point. You really don’t need to
pay any attention to it.
=================================================
= Swarming on rec-center-hourly data…
= Medium swarm. Sit back and relax, this could take awhile.
Generating experiment files in directory: /home/dominikscheurenberg/swarm…
Writing 314 lines…
Writing 114 lines…
done.
None
WARNING:nupic.database.client_jobs_dao:[] First failure in <function connect at 0x7f981794dcf8>; initial retry in 0.1 sec.; timeoutSec=300. Caller stack:
File “./nupic/examples/opf/clients/hotgym/prediction/one_gym/swarm.py”, line 111, in
swarm(INPUT_FILE)
File “./nupic/examples/opf/clients/hotgym/prediction/one_gym/swarm.py”, line 103, in swarm
modelParams = swarmForBestModelParams(SWARM_DESCRIPTION, name)
File “./nupic/examples/opf/clients/hotgym/prediction/one_gym/swarm.py”, line 80, in swarmForBestModelParams
verbosity=0
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 271, in runWithConfig
return _runAction(runOptions)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 212, in _runAction
returnValue = _runHyperSearch(runOptions)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 141, in _runHyperSearch
search = _HyperSearchRunner(runOptions)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 412, in init
self.__cjDAO = _clientJobsDB()
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 376, in _clientJobsDB
return cjdao.ClientJobsDAO.get()
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/support/decorators.py”, line 56, in exceptionLoggingWrap
return func(*args, **kwargs)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/database/client_jobs_dao.py”, line 548, in get
cjDAO.connect()
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/support/decorators.py”, line 56, in exceptionLoggingWrap
return func(*args, **kwargs)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/support/decorators.py”, line 234, in retryWrap
timeoutSec, ‘’.join(traceback.format_stack()), exc_info=True)
Traceback (most recent call last):
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/support/decorators.py”, line 208, in retryWrap
result = func(*args, **kwargs)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/database/client_jobs_dao.py”, line 633, in connect
with ConnectionFactory.get() as conn:
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/database/connection.py”, line 167, in get
return cls._connectionPolicy.acquireConnection()
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/nupic/database/connection.py”, line 553, in acquireConnection
dbConn = self._pool.connection(shareable=False)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/DBUtils/PooledDB.py”, line 331, in connection
con = self.steady_connection()
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/DBUtils/PooledDB.py”, line 279, in steady_connection
*self._args, **self._kwargs)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/DBUtils/SteadyDB.py”, line 134, in connect
failures, ping, closeable, *args, **kwargs)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/DBUtils/SteadyDB.py”, line 186, in init
self._store(self._create())
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/DBUtils/SteadyDB.py”, line 190, in _create
con = self._creator(*self._args, **self._kwargs)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/pymysql/init.py”, line 88, in Connect
return Connection(*args, **kwargs)
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/pymysql/connections.py”, line 626, in init
self._connect()
File “/home/dominikscheurenberg/.local/lib/python2.7/site-packages/pymysql/connections.py”, line 818, in _connect
2003, “Can’t connect to MySQL server on %r (%s)” % (self.host, e))
OperationalError: (2003, “Can’t connect to MySQL server on ‘localhost’ ([Errno 111] Connection refused)”)
Since it seems, that the installation was successfull:
pip install nupic
Requirement already satisfied (use --upgrade to upgrade): nupic in /home/dominikscheurenberg/.local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): pytest-cov==2.5.0 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): unittest2==0.5.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): nupic.bindings==1.0.0 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): DBUtils==1.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): pytest-xdist==1.16.0 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): mock==1.0.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): asteval==0.9.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): numpy==1.12.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): validictory==0.9.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): pyproj==1.9.3 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): pytest==3.0.7 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): pycapnp==0.5.12; platform_system == “Linux” or platform_system == “Darwin” in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): coverage==3.7.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): prettytable==0.7.2 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): psutil==1.0.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil==2.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): ordereddict==1.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): PyMySQL==0.6.2 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): PyYAML==3.10 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): execnet>=1.1 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from pytest-xdist==1.16.0->nupic)
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.22 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from pytest-xdist==1.16.0->nupic)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from pytest==3.0.7->nupic)
Requirement already satisfied (use --upgrade to upgrade): six in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from python-dateutil==2.1->nupic)
Requirement already satisfied (use --upgrade to upgrade): apipkg>=1.4 in /home/dominikscheurenberg/.local/lib/python2.7/site-packages (from execnet>=1.1->pytest-xdist==1.16.0->nupic)
I guess its a problem with the mysql configuration. I tried this (https://github.com/numenta/nupic/issues/2794 and https://github.com/numenta/nupic/issues/2676), but still got the same error.
I am grateful for any hints or workarounds.