Импорт fbprophet на AWS SageMaker - PullRequest
       4

Импорт fbprophet на AWS SageMaker

1 голос
/ 21 февраля 2020

Я пытаюсь загрузить пакет fbprophet на AWS SageMaker. На моем локальном устройстве я смог сделать это, но не смог выполнить sh то же самое на SageMaker. Благодаря этой ссылке я обновил строку 16 файла hdays.py с:

from holidays import WEEKEND, HolidayBase, easter, rd

до:

from holidays import WEEKEND, HolidayBase
from dateutil.easter import easter
from dateutil.relativedelta import relativedelta as rd

Это решило ошибку на моем локальном устройстве. Кто-нибудь знает, как я могу скачать fbprophet в SageMaker или как я могу обновить папку загруженного пакета?

Когда я запускаю !pip install fbprophet в SageMaker, появляется следующая ошибка:

Collecting fbprophet
  Using cached https://files.pythonhosted.org/packages/f7/86/4509e952f9724f084625e93e0bf8d8519b25c79029a0a916b0f996644c75/fbprophet-0.6.tar.gz
Requirement already satisfied: Cython>=0.22 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.28.4)
Requirement already satisfied: cmdstanpy==0.4 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.4.0)
Requirement already satisfied: pystan>=2.14 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.19.1.1)
Requirement already satisfied: numpy>=1.10.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (1.16.4)
Requirement already satisfied: pandas>=0.23.4 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.24.2)
Requirement already satisfied: matplotlib>=2.0.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (3.0.3)
Requirement already satisfied: LunarCalendar>=0.0.9 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.0.9)
Requirement already satisfied: convertdate>=2.1.2 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.2.0)
Requirement already satisfied: holidays>=0.9.5 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (0.10.1)
Requirement already satisfied: setuptools-git>=1.2 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (1.2)
Requirement already satisfied: python-dateutil>=2.8.0 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from fbprophet) (2.8.1)
Requirement already satisfied: pytz>=2011k in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from pandas>=0.23.4->fbprophet) (2018.4)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (2.2.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (1.0.1)
Requirement already satisfied: cycler>=0.10 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
Requirement already satisfied: ephem>=3.7.5.3 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from LunarCalendar>=0.0.9->fbprophet) (3.7.7.0)
Requirement already satisfied: pymeeus<=1,>=0.3.6 in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from convertdate>=2.1.2->fbprophet) (0.3.6)
Requirement already satisfied: six in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from holidays>=0.9.5->fbprophet) (1.11.0)
Requirement already satisfied: setuptools in /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet) (41.6.0)
Building wheels for collected packages: fbprophet
  Building wheel for fbprophet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-vtdnatmm --python-tag cp36
       cwd: /tmp/pip-install-n493kv2i/fbprophet/
  Complete output (9 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/fbprophet
  creating build/lib/fbprophet/stan_model
  INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_888a84912910fa0a45b9d614b75bb8a8 NOW.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for fbprophet
  Running setup.py clean for fbprophet
Failed to build fbprophet
Installing collected packages: fbprophet
    Running setup.py install for fbprophet ... error
    ERROR: Command errored out with exit status 1:
     command: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-om94vf2a/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-n493kv2i/fbprophet/
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/fbprophet
    creating build/lib/fbprophet/stan_model
    INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_888a84912910fa0a45b9d614b75bb8a8 NOW.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ec2-user/anaconda3/envs/tensorflow_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n493kv2i/fbprophet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-om94vf2a/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Ps , Я успешно загрузил и импортировал pystan.

...