2016-02-19 63 views
1

我试图在本地机器上设置Prediction.io Text-Classification Engine。然而,在试图pio build,我得到以下信息:Prediction.io:无法部署引擎

[ERROR] [Console$] No valid engine instance found for engine iMXSzwtuLBqTGDQVWFwhXLyX3MELx6Ox 2089ace31214efdc353ab45e911b7524222d7ab6. 
Try running 'train' before 'deploy'. Aborting. 

正如在教程中指定,我已经导入的样本数据。我能够毫无问题地构建和训练引擎。任何想法为什么它无法找到有效的引擎实例?


相关信息:

pio build

[INFO] [Console$] Using existing engine manifest JSON at ~/prediction_io/text_classification/manifest.json 
[INFO] [Console$] Using command '/usr/local/Cellar/predictionio/0.9.5/libexec/sbt/sbt' at the current working directory to build. 
[INFO] [Console$] If the path above is incorrect, this process will fail. 
[INFO] [Console$] Uber JAR disabled. Making sure lib/pio-assembly-0.9.5.jar is absent. 
[INFO] [Console$] Going to run: /usr/local/Cellar/predictionio/0.9.5/libexec/sbt/sbt package assemblyPackageDependency 
[INFO] [Console$] Build finished successfully. 
[INFO] [Console$] Looking for an engine... 
[INFO] [Console$] Found com-example_2.10-0.1-SNAPSHOT.jar 
[INFO] [Console$] Found com.example-assembly-0.1-SNAPSHOT-deps.jar 
[INFO] [RegisterEngine$] Registering engine iMXSzwtuLBqTGDQVWFwhXLyX3MELx6Ox 2089ace31214efdc353ab45e911b7524222d7ab6 
[INFO] [Console$] Your engine is ready for training. 

pio train

INFO] [Console$] Using existing engine manifest JSON at ~/prediction_io/text_classification/manifest.json 
[INFO] [Runner$] Submission command: /usr/local/opt/apache-spark/bin/spark-submit --class io.prediction.workflow.CreateWorkflow --jars file:~/prediction_io/text_classification/target/scala-2.10/com-example_2.10-0.1-SNAPSHOT.jar,file:~/prediction_io/text_classification/target/scala-2.10/com.example-assembly-0.1-SNAPSHOT-deps.jar --files file:/usr/local/Cellar/predictionio/0.9.5/libexec/conf/log4j.properties --driver-class-path /usr/local/Cellar/predictionio/0.9.5/libexec/conf:/usr/local/opt/elasticsearch/config file:/usr/local/Cellar/predictionio/0.9.5/libexec/lib/pio-assembly-0.9.5.jar --engine-id iMXSzwtuLBqTGDQVWFwhXLyX3MELx6Ox --engine-version 2089ace31214efdc353ab45e911b7524222d7ab6 --engine-variant file:~/prediction_io/text_classification/engine.json --verbosity 0 --json-extractor Both --env PIO_ENV_LOADED=1,PIO_STORAGE_REPOSITORIES_METADATA_NAME=pio_meta,PIO_FS_BASEDIR=~/.pio_store,PIO_HOME=/usr/local/Cellar/predictionio/0.9.5/libexec,PIO_FS_ENGINESDIR=~/.pio_store/engines,PIO_STORAGE_SOURCES_PGSQL_URL=jdbc:postgresql://localhost/pio,PIO_STORAGE_REPOSITORIES_METADATA_SOURCE=PGSQL,PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE=PGSQL,PIO_STORAGE_REPOSITORIES_EVENTDATA_NAME=pio_event,PIO_STORAGE_SOURCES_PGSQL_PASSWORD=,PIO_STORAGE_SOURCES_PGSQL_TYPE=jdbc,PIO_FS_TMPDIR=~/.pio_store/tmp,PIO_STORAGE_SOURCES_PGSQL_USERNAME=pio,PIO_STORAGE_REPOSITORIES_MODELDATA_NAME=pio_model,PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE=PGSQL,PIO_CONF_DIR=/usr/local/Cellar/predictionio/0.9.5/libexec/conf 
/usr/local/Cellar/predictionio/0.9.5/libexec/conf/pio-env.sh: line 55: PIO_STORAGE_SOURCES_PGSQL_PASSWORD: command not found 

pio status

[INFO] [Console$] Inspecting PredictionIO... 
[INFO] [Console$] PredictionIO 0.9.5 is installed at /usr/local/Cellar/predictionio/0.9.5/libexec 
[INFO] [Console$] Inspecting Apache Spark... 
[INFO] [Console$] Apache Spark is installed at /usr/local/opt/apache-spark 
[WARN] [Console$] Apache Spark version information cannot be found. If you are using a developmental tree, please make sure you are using a version of at least 1.3.0. 
[INFO] [Console$] Inspecting storage backend connections... 
[INFO] [Storage$] Verifying Meta Data Backend (Source: PGSQL)... 
[INFO] [Storage$] Verifying Model Data Backend (Source: PGSQL)... 
[INFO] [Storage$] Verifying Event Data Backend (Source: PGSQL)... 
[INFO] [Storage$] Test writing to Event Store (App Id 0)... 
[INFO] [Console$] (sleeping 5 seconds for all messages to show up...) 
[INFO] [Console$] Your system is all ready to go. 

回答

1

在PIO列车的最后一行是原因:

/usr/local/Cellar/predictionio/0.9.5/libexec/conf/pio-env.sh: line 55: PIO_STORAGE_SOURCES_PGSQL_PASSWORD: command not found

有你设置的密码,你的PostgreSQL并把它放在pio-env.sh?如果这没有帮助,随时pastebin你的pio-env.sh(编辑出来的密码等当然)

如果您还有其他问题,将它张贴到PredictionIO的谷歌组,您的问题将被回答我们的社区更快。

Tom

+0

设置PostgreSQL的密码,但仍然收到相同的错误。根据要求,pio-env.sh文件:https://gist.github.com/ashishkumar/908c7024bf4316ca5777 –

+0

您是否在同一行看到错误?第55行是注释,不应执行。 –