predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pat Ferrel <...@occamsmachete.com>
Subject Re: Compilations errors in Similar-Product engine template
Date Thu, 20 Oct 2016 21:51:08 GMT
you are not using the right template code. It’s not io.prediction… anymore it’s org.apache.predicitionio…
now

The templates donated to Apache linked to on the web site are not updated to the build method
yet. There are PRs for many of the repos that have versions that will build fine. For instance
look here for the SimilarProducts template: https://github.com/apache/incubator-predictionio-template-similar-product/pull/12
<https://github.com/apache/incubator-predictionio-template-similar-product/pull/12>

hover over the PR source and you’ll see where to pull the template from. Chan Lee has ported
them and they are waiting to be merged with their Apache repos.

One of the committers should merge these or change the templates page to point to Chan Lee’s
repos. I would do it but am a bit busy right now.




On Oct 20, 2016, at 2:16 AM, Guruju, Lakshmi Sravya <lakshmi.sravya.guruju@sap.com>
wrote:

Hi,
 
I am able to setup PredictionIo successfully in my MAC machine. I am also able to start the
eventserver and add events to it. But when am trying to build the Similar-Product engine template
using ‘pio build  --verbose’, I am facing compilation errors. Below is the trace.
 
Compiling 6 Scala sources to /Users/.../MySimilarProduct/target/scala-2.10/classes...
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:1:
'{' expected but identifier found.
[INFO] [Console$] [error] package incubator-predictionio-template-similar-product
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:238:
'}' expected but eof found.
[INFO] [Console$] [error] }
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:1:
'{' expected but identifier found.
[INFO] [Console$] [error] package incubator-predictionio-template-similar-product
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:158:
'}' expected but eof found.
[INFO] [Console$] [error] }
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:1: '{'
expected but identifier found.
[INFO] [Console$] [error] package incubator-predictionio-template-similar-product
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:113:
'}' expected but eof found.
[INFO] [Console$] [error] }
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Engine.scala:1: '{' expected
but identifier found.
[INFO] [Console$] [error] package incubator-predictionio-template-similar-product
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Engine.scala:35: '}'
expected but eof found.
[INFO] [Console$] [error] }
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Preparator.scala:1: '{'
expected but identifier found.
[INFO] [Console$] [error] package incubator-predictionio-template-similar-product
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Preparator.scala:24:
'}' expected but eof found.
[INFO] [Console$] [error] ) extends Serializable
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Serving.scala:1: '{'
expected but identifier found.
[INFO] [Console$] [error] package incubator-predictionio-template-similar-product
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Serving.scala:13: '}'
expected but eof found.
[INFO] [Console$] [error] }
[INFO] [Console$] [error] ^
[INFO] [Console$] [error] 12 errors found
[INFO] [Console$] error Compilation failed
[INFO] [Console$] [error] Total time: 26 s, completed Oct 20, 2016 1:19:18 PM
[ERROR] [Console$] Return code of previous step is 1. Aborting.
 
 
 
Then I found someone mentioning here <https://groups.google.com/forum/#!topic/predictionio-user/QIlYDKVB1pk>
that the package name should not contain hy-phen. So I changed from ‘package incubator-predictionio-template-similar-product’
to ‘package incubator.predictionio.template.similar.product’ in all classes.
After that, above errors went off but I got new compilation errors. Below is the trace.
 
[INFO] [Console$] [info] Compiling 6 Scala sources to /Users/.../MySimilarProduct/target/scala-2.10/classes...
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:3:
object prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.P2LAlgorithm
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:4:
object prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.Params
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:5:
object prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.data.storage.BiMap
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:20:
not found: type Params
[INFO] [Console$] [error]   seed: Option[Long]) extends Params
[INFO] [Console$] [error]                               ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:24:
not found: type BiMap
[INFO] [Console$] [error]   val itemStringIntMap: BiMap[String, Int],
[INFO] [Console$] [error]                         ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:44:
not found: type P2LAlgorithm
[INFO] [Console$] [error]   extends P2LAlgorithm[PreparedData, ALSModel, Query, PredictedResult]
{
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:62:
not found: value BiMap
[INFO] [Console$] [error]     val userStringIntMap = BiMap.stringInt(data.users.keys)
[INFO] [Console$] [error]                            ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:63:
not found: value BiMap
[INFO] [Console$] [error]     val itemStringIntMap = BiMap.stringInt(data.items.keys)
[INFO] [Console$] [error]                            ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:68:
value collectAsMap is not a member of org.apache.spark.rdd.RDD[U]
[INFO] [Console$] [error] possible cause: maybe a semicolon is missing before `value collectAsMap'?
[INFO] [Console$] [error]     }.collectAsMap.toMap
[INFO] [Console$] [error]       ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/ALSAlgorithm.scala:85:
missing parameter type for expanded function
[INFO] [Console$] [error] The argument types of an anonymous function must be fully known.
(SLS 8.5)
[INFO] [Console$] [error] Expected type was: ? => Boolean
[INFO] [Console$] [error]       }.filter { case ((u, i), v) =>
[INFO] [Console$] [error]                ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:3:
object prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.P2LAlgorithm
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:4:
object prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.Params
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:5:
object prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.data.storage.BiMap
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:12:
not found: type Params
[INFO] [Console$] [error] ) extends Params
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:16:
not found: type BiMap
[INFO] [Console$] [error]   val itemStringIntMap: BiMap[String, Int],
[INFO] [Console$] [error]                         ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:28:
not found: type P2LAlgorithm
[INFO] [Console$] [error]   extends P2LAlgorithm[PreparedData, CooccurrenceModel, Query, PredictedResult]
{
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:32:
not found: value BiMap
[INFO] [Console$] [error]     val itemStringIntMap = BiMap.stringInt(data.items.keys)
[INFO] [Console$] [error]                            ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:57:
not found: type BiMap
[INFO] [Console$] [error]     itemStringIntMap: BiMap[String, Int]): Map[Int, Array[(Int,
Int)]] = {
[INFO] [Console$] [error]                       ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:43:
value collectAsMap is not a member of org.apache.spark.rdd.RDD[U]
[INFO] [Console$] [error] possible cause: maybe a semicolon is missing before `value collectAsMap'?
[INFO] [Console$] [error]     }.collectAsMap.toMap
[INFO] [Console$] [error]       ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/CooccurrenceAlgorithm.scala:70:
value join is not a member of org.apache.spark.rdd.RDD[Nothing]
[INFO] [Console$] [error]     val cooccurrences: RDD[((Int, Int), Int)] = userItem.join(userItem)
[INFO] [Console$] [error]                                                          ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:3: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.PDataSource
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:4: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.EmptyEvaluationInfo
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:5: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.EmptyActualResult
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:6: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.Params
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:7: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.data.storage.Event
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:8: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.data.store.PEventStore
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:16:
not found: type Params
[INFO] [Console$] [error] case class DataSourceParams(appName: String) extends Params
[INFO] [Console$] [error]                                                      ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:19:
not found: type PDataSource
[INFO] [Console$] [error]   extends PDataSource[TrainingData,
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:28:
not found: value PEventStore
[INFO] [Console$] [error]     val usersRDD: RDD[(String, User)] = PEventStore.aggregateProperties(
[INFO] [Console$] [error]                                         ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:45:
not found: value PEventStore
[INFO] [Console$] [error]     val itemsRDD: RDD[(String, Item)] = PEventStore.aggregateProperties(
[INFO] [Console$] [error]                                         ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/DataSource.scala:63:
not found: value PEventStore
[INFO] [Console$] [error]     val viewEventsRDD: RDD[ViewEvent] = PEventStore.find(
[INFO] [Console$] [error]                                         ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Engine.scala:3: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.IEngineFactory
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Engine.scala:4: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.Engine
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Engine.scala:25: not
found: type IEngineFactory
[INFO] [Console$] [error] object SimilarProductEngine extends IEngineFactory {
[INFO] [Console$] [error]                                     ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Engine.scala:27: not
found: type Engine
[INFO] [Console$] [error]     new Engine(
[INFO] [Console$] [error]         ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Preparator.scala:3: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.PPreparator
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Preparator.scala:10:
not found: type PPreparator
[INFO] [Console$] [error]   extends PPreparator[TrainingData, PreparedData] {
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Serving.scala:3: object
prediction is not a member of package io
[INFO] [Console$] [error] import io.prediction.controller.LServing
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] /Users/.../MySimilarProduct/src/main/scala/Serving.scala:6: not
found: type LServing
[INFO] [Console$] [error]   extends LServing[Query, PredictedResult] {
[INFO] [Console$] [error]           ^
[INFO] [Console$] [error] 39 errors found
[INFO] [Console$] [error] (compile:compile) Compilation failed
[INFO] [Console$] [error] Total time: 29 s, completed Oct 20, 2016 2:19:02 PM
[ERROR] [Console$] Return code of previous step is 1. Aborting.
 
Do I need to change anything else or am I missing something. Please help me in resolving these
issues.
 
Regards,
Sravya


Mime
View raw message