Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'pyaf.HierarchicalForecastEngine' #123

Closed
geniusnhu opened this issue Apr 18, 2020 · 16 comments
Closed

No module named 'pyaf.HierarchicalForecastEngine' #123

geniusnhu opened this issue Apr 18, 2020 · 16 comments

Comments

@geniusnhu
Copy link

When importing HierarchicalForecastEngine to perform forecast, cannot import HierarchicalForecastEngine from pyaf module. Error as showed below

image

@antoinecarme
Copy link
Owner

@geniusnhu

Thanks for using pyaf.

What version of python, pyaf, jupyter etc are you using ? A copy-paste of the output of this script in your local system can provide all that :

https://github.com/antoinecarme/pyaf/blob/master/tests/basic_checks/platform_info.py

@geniusnhu
Copy link
Author

Here is the version-check output:

PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('Cython_version', '0.29.16')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('dill_version', '0.3.1.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('keras_version', '2.3.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('matplotlib_version', '3.2.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('numpy_version', '1.18.2')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pandas_version', '1.0.3')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pathos_version', '0.2.5')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pip_version', '19.3.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('pydot_version', '1.3.0')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_implementation', 'CPython')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('python_version', '3.6.9')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('scipy_version', '1.4.1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('setuptools_version', '46.1.3')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sklearn_version', '0.22.2.post1')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('sqlalchemy_version', '1.3.16')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_platform', 'Linux-4.19.104+-x86_64-with-Ubuntu-18.04-bionic')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_processor', 'x86_64')
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('system_uname', uname_result(system='Linux', node='dcc29eed9a27', release='4.19.104+', version='#1 SMP Wed Feb 19 05:26:34 PST 2020', machine='x86_64', processor='x86_64'))
PYAF_SYSTEM_DEPENDENT_VERSION_INFO ('xgboost_version', '0.90')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('CLICOLOR', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('CLOUDSDK_CONFIG', '/content/.config')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('COLAB_GPU', '0')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('CUDA_PKG_VERSION', '10-1=10.1.243-1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('CUDA_VERSION', '10.1.243')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('CUDNN_VERSION', '7.6.5.32')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('DATALAB_SETTINGS_OVERRIDES', '{"kernelManagerProxyPort":6000,"kernelManagerProxyHost":"172.28.0.3","jupyterArgs":["--ip=\"172.28.0.2\""]}')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('DEBIAN_FRONTEND', 'noninteractive')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('ENV', '/root/.bashrc')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('GCE_METADATA_TIMEOUT', '0')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('GCS_READ_CACHE_BLOCK_SIZE_MB', '16')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('GIT_PAGER', 'cat')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('GLIBCPP_FORCE_NEW', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('GLIBCXX_FORCE_NEW', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('HOME', '/root')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('HOSTNAME', 'dcc29eed9a27')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('JPY_PARENT_PID', '18')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('KMP_DUPLICATE_LIB_OK', 'True')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('KMP_INIT_AT_FORK', 'FALSE')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LANG', 'en_US.UTF-8')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LAST_FORCED_REBUILD', '20200316')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LD_LIBRARY_PATH', '/usr/local/nvidia/lib:/usr/local/nvidia/lib64')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LD_PRELOAD', '/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('LIBRARY_PATH', '/usr/local/cuda/lib64/stubs')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('MPLBACKEND', 'module://ipykernel.pylab.backend_inline')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('NCCL_VERSION', '2.4.8')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('NO_GCE_CHECK', 'True')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('NVIDIA_DRIVER_CAPABILITIES', 'compute,utility')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('NVIDIA_REQUIRE_CUDA', 'cuda>=10.1 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('NVIDIA_VISIBLE_DEVICES', 'all')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('OLDPWD', '/')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('PAGER', 'cat')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('PATH', '/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin:/opt/bin')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('PWD', '/')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('PYTHONPATH', '/env/python')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('PYTHONWARNINGS', 'ignore:::pip.internal.cli.base_command')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('SHELL', '/bin/bash')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('SHLVL', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('TBE_CREDS_ADDR', '172.28.0.1:8008')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('TERM', 'xterm-color')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('TF_CPP_MIN_LOG_LEVEL', '1')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('TF_FORCE_GPU_ALLOW_GROWTH', 'true')
PYAF_SYSTEM_DEPENDENT_ENVIRONMENT_VARIABLE ('
', '/tools/node/bin/node')

@antoinecarme
Copy link
Owner

Did some tests with a new Debian test user, installed pyaf, executed a jupyter notebook with a hierarchical model. runs OK.

You probably need to check :

  1. If another/older pyaf is installed.
  2. mix between python2 and python3 on debian (pip3 instead of pip ?)
  3. There seems to be some issues with packages installed from notebooks (PYTHONPATH ? ) :

jupyter/notebook#2359

@geniusnhu
Copy link
Author

Using Google colab. The error still appears. I was able to use with Google colab 3 weeks ago, but error appears when I run the notebook again yesterday.
When I tried with anaconda Jupyter notebook, no error appeared though.

@antoinecarme
Copy link
Owner

Also switched to google colab, runs OK. strange!

@piLigrym
Copy link

Hi, @antoinecarme!
I have faced a similar issue for ForecastEngine. The problem is related to the GIT installation. If we install pyaf via pip it works fine. But when we use git as a source, some files don't install, include Engines. Probably, you need to check the setup.py.

Thank you for a great lib!

@antoinecarme
Copy link
Owner

@piLigrym

Thanks a lot for the feedback.

Indeed these files are not copied when installing from git, which is wrong, My bad!.

I will double check the setup.py.

antoinecarme added a commit that referenced this issue Apr 22, 2020
antoinecarme added a commit that referenced this issue Apr 22, 2020
@antoinecarme
Copy link
Owner

@geniusnhu , @piLigrym

Just updated the master branch, Could you please check the install from git when you have some time ?

Thanks in advance

Antoine

@antoinecarme antoinecarme self-assigned this Apr 22, 2020
@piLigrym
Copy link

@antoinecarme
Now sub-packages don't install.
Probably you need to add:
packages=find_packages(include=['pyaf', 'pyaf.*']),

antoinecarme added a commit that referenced this issue Apr 22, 2020
@antoinecarme
Copy link
Owner

Thanks again .... shot 2

@geniusnhu
Copy link
Author

install using pip but got another issue
image

@antoinecarme
Copy link
Owner

Try the fully qualified name of the class :

lEngine = hautof.cHierarchicalForecastEngine()

@geniusnhu
Copy link
Author

Yes, sorry. My fault! It works perfectly now.

@antoinecarme
Copy link
Owner

You are welcome. Hope you enjoy!

@antoinecarme
Copy link
Owner

Closing.

Will be officially available in release 2.0

@eoagustin
Copy link

This still not works for me. Tried both installation through git and pip but still to no use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants