Skip to content

Commit

Permalink
Use pio template commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dszeto committed Jan 27, 2015
1 parent 0531202 commit 387353f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 deletions.
12 changes: 5 additions & 7 deletions docs/manual/source/demo/tapster.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ We are going to copy the Similar Product Template into the PIO directory.

```
$ cd PredictionIO
$ cd templates
$ cp -R scala-parallel-similar ../tapster-episode-similar
$ cd ..
$ pio template get PredictionIO/template-scala-parallel-similarproduct tapster-episode-similar
```

Next we are going to update the App ID in the ‘engine.json’ file to match the App ID we just created.
Expand All @@ -108,9 +106,9 @@ $ cd ..
![Engine Setup](/images/demo/tapster/pio-engine-setup.png)


### Modify Engine Template
### Modify Engine Template

By the default, the engine template reads the “view” events. We can easily to change it to read “like” events.
By the default, the engine template reads the “view” events. We can easily to change it to read “like” events.

<!-- For more advanced example of how-to combine view and like/dislike events in one recommender, please see the multi-events-multi-algos.html -->

Expand All @@ -120,9 +118,9 @@ Modify `readTraining()` in DataSource.scala:

override
def readTraining(sc: SparkContext): TrainingData = {

...

val viewEventsRDD: RDD[ViewEvent] = eventsDb.find(
appId = dsp.appId,
entityType = Some("user"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ ID** to refer to "MyApp2" in engine code.
## Create a new Engine from an Engine Template

Now let's create a new engine called *MyClassification* by cloning the MLlib
Classification engine template, assuming `/home/yourname/predictionio` is the
installation directory of PredictionIO:
Classification engine template:

```
$ cp -r /home/yourname/predictionio/templates/scala-parallel-classification MyClassification
$ pio template get PredictionIO/templates-scala-parallel-classification MyClassification
$ cd MyClassification
```

Expand All @@ -84,7 +83,7 @@ attr0, attr1, attr2 and plan.
You can send these data to PredictionIO Event Server in real-time easily by
making a HTTP request or through the `EventClient` of an SDK.

To use the SDK, first install the SDK in the language of your choice - [Java](/sdk/java/), [PHP](/sdk/php), [Python](/sdk/python), or [Ruby](/sdk/ruby).
To use the SDK, first install the SDK in the language of your choice - [Java](/sdk/java/), [PHP](/sdk/php), [Python](/sdk/python), or [Ruby](/sdk/ruby).

<div class="tabs">
<div data-tab="Python SDK" data-lang="python">
Expand Down Expand Up @@ -415,7 +414,7 @@ Start with building your *MyClassification*.
```
$ pio build
```
This command should take few minutes for the first time; all subsequent builds should be less than a minute. You can also run it with --verbose to see all log messages.
This command should take few minutes for the first time; all subsequent builds should be less than a minute. You can also run it with --verbose to see all log messages.

Upon successful build, you should see a console message similar to the
following.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,10 @@ $ pio app list
## Create a new Engine from an Engine Template

Now let's create a new engine called *MyRecommendation* by cloning the Recommendation
Engine Template, assuming `/home/yourname/predictionio`
is the installation directory of PredictionIO:
Engine Template:

```
$ cp -r /home/yourname/predictionio/templates/scala-parallel-recommendation MyRecommendation
$ pio template get PredictionIO/templates-scala-parallel-recommendation MyRecommendation
$ cd MyRecommendation
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ You can offer features like "Customers Who Bought This Item Also Bought....".

## Create a new Engine from an Engine Template

Now let's create a new engine called *MySimilar* by copying the Similar Product Engine Template, assuming `/home/yourname/predictionio`
is the installation directory of PredictionIO:
Now let's create a new engine called *MySimilar* by copying the Similar Product Engine Template:

```
$ cp -r /home/yourname/predictionio/templates/scala-parallel-similarproduct MySimilarProduct
$ pio template get PredictionIO/templates-scala-parallel-similarproduct MySimilarProduct
$ cd MySimilarProduct
```

Expand Down Expand Up @@ -315,7 +314,7 @@ Start with building your *MySimilarProduct* engine.
```
$ pio build
```
This command should take few minutes for the first time; all subsequent builds should be less than a minute. You can also run it with --verbose to see all log messages.
This command should take few minutes for the first time; all subsequent builds should be less than a minute. You can also run it with --verbose to see all log messages.

Upon successful build, you should see a console message similar to the
following.
Expand Down
5 changes: 2 additions & 3 deletions docs/manual/source/templates/vanilla/quickstart.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ $ pio app list
## Create a new Engine from an Engine Template

Now let's create a new engine called *MyNewEngine* by cloning the Recommendation
Engine Template, assuming `/home/yourname/predictionio`
is the installation directory of PredictionIO:
Engine Template:

```
$ cp -r /home/yourname/predictionio/templates/scala-parallel-vanilla MyNewEngine
$ pio template get PredictionIO/templates-scala-parallel-vanilla MyNewEngine
$ cd MyNewEngine
```

Expand Down

0 comments on commit 387353f

Please sign in to comment.