Closed chetan51 closed 10 years ago
Looks like NTA_DATA_PATH needs to be set as well:
(datasetPath, os.environ.get('NTA_DATA_PATH',
'')))
I (and most of us) don't run these locally (the DB) so you and Travis are the first explorers
Can we set it automatically, or at least add it to the README?
If it's a path used in nupic (I guess so?) we could hard-code it to Cmake. But do you need to change it to point to your custom locations of datasets? In that case note to export it in Readme would be imho better. (And probably not necessarily the "main" readme, but Swarming Readme / wiki?)
@rhyolight Thoughts?
And probably not necessarily the "main" readme, but Swarming Readme / wiki?
:+1:
NTA_DATA_PATH
seems to be already set in CMake:
set_environment_variable(NTA_DATA_PATH "${PROJECT_BUILD_RELEASE_DIR}/share/prediction/data" OFF)
This same failure is occurring in the Grok pipelines as well. It seems that env vars set within cmake are not remaining afterwards, even though they all seem to get set when I run locally.
Running tests locally from a fresh shell. I manually unset all nupic-related env vars except for NUPIC
.
Got this error:
› make tests_run_all
Scanning dependencies of target tests_run_all
[100%] Python tests + swarming (requires DB)
============================= test session starts ==============================
platform darwin -- Python 2.7.5 -- pytest-2.4.2 -- /usr/bin/python
plugins: cov, xdist
collecting ...
==================================== ERRORS ====================================
___ ERROR collecting tests/integration/py2/nupic/opf/opf_experiments_test.py ___
tests/integration/py2/nupic/opf/opf_experiments_test.py:36: in <module>
> PREDICTION_DIR = os.path.join(os.environ['NTA'], 'share', 'opf')
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py:23: in __getitem__
> raise KeyError(key)
E KeyError: 'NTA'
!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.79 seconds ============================
make[3]: *** [CMakeFiles/tests_run_all] Error 2
make[2]: *** [CMakeFiles/tests_run_all.dir/all] Error 2
make[1]: *** [CMakeFiles/tests_run_all.dir/rule] Error 2
make: *** [tests_run_all] Error 2```
Looks like NTA
is not set:
› env | grep NTA
NOTHING
But when I start a fresh shell...
› env | grep NTA
NTA=/Users/mtaylor/nta/nupic/build/release
NTA_ROOTDIR=/Users/mtaylor/nta/nupic/build/release
NTA_DATA_PATH=/Users/mtaylor/nta/nupic/build/release/share/prediction/data
NTA_ROOT_DIR=/Users/mtaylor/nta/nupic/build/release
So the environment variables are getting set, but not within the shell environment where cmake ran? @david-ragazzi do you understand this?
@rhyolight You probably added those lines to .bashrc, in the old shell they are not exported, unless you run: source ~/.bashrc in each fresh shell bashrc is sourced at beginning, so they're exported
@breznak yes, that was it.
@rhyolight You probably added those lines to .bashrc, in the old shell they are not exported, unless you run: source ~/.bashrc in each fresh shell bashrc is sourced at beginning, so they're exported
:+1:
@chetan51 The README already has the instruction:
export NTA_ROOT_DIR=$NTA
Is this sufficient for you to close this ticket?
We have a PR to remote NTA_ROOT_DIR
entirely now, too: https://github.com/numenta/nupic/pull/787
I thought this failure is happening because NTA_DATA_PATH
is not set?
@chetan51 Sorry, it's been a long day.
I don't understand why this is failing for you, though. Everything works for me. Can anyone else replicate this failure?
When I run the Python tests after building with the new method, I see the following error:
http://pastebin.com/pmV2PbQ2