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

[#28] Updated flink jpmml examples #39

Conversation

francescofrontera
Copy link
Collaborator

this PR refers to #28 issue.

…eature/28-introducing_updated_flink-jpmml_examples
riccardo14 and others added 2 commits September 20, 2017 15:58
Copy link
Collaborator

@spi-x-i spi-x-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, align the PR correctly.

Copy link
Collaborator

@spi-x-i spi-x-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general LGTM, IMHO I don't like so much plain examples without any comment. The user potentially struggles to understand what is going on there.

This module contains the examples running simple predictions from an iris Source.
The source emits the following data:
```
Iris(sepalLength: Double, sepalWidth: Double, petalLength: Double, petalWidth: Double)
Iris(,sepalLength: Double, sepalWidth: Double, petalLength: Double, petalWidth: Double)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comma needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still haven't finished the Readme!

@@ -25,5 +25,19 @@ Either you can employ the _quick_ predictor:
./path/to/bin/flink run -c io.radicalbit.examples.QuickEvaluateKmeans <path/to/project/root>/flink-jpmml/flink-jpmml-examples/target/scala-2.x/flink-jpmml-examples-assembly-0.6.0-SNAPSHOT.jar --model path/to/pmml/model.pmml --output /path/to/output
```

## Fault-Tolerant
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

##Fault-Tolerance

@@ -25,5 +25,19 @@ Either you can employ the _quick_ predictor:
./path/to/bin/flink run -c io.radicalbit.examples.QuickEvaluateKmeans <path/to/project/root>/flink-jpmml/flink-jpmml-examples/target/scala-2.x/flink-jpmml-examples-assembly-0.6.0-SNAPSHOT.jar --model path/to/pmml/model.pmml --output /path/to/output
```

## Fault-Tolerant

if you like testing a fault-tolerant of the operator you can run a `CheckpointEvaluate` example.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you like testing the fault-tolerance feature ..


2) Run the flink-cluster


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... And then?


val env = StreamExecutionEnvironment.getExecutionEnvironment

env.enableCheckpointing(parameters.ckpInterval, CheckpointingMode.EXACTLY_ONCE)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, if you use parameter here, then bring this best practice also on CheckpointEvaluate


val env = StreamExecutionEnvironment.getExecutionEnvironment

env.enableCheckpointing(1000, CheckpointingMode.EXACTLY_ONCE)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specify long please

_if you like testing a fault-tolerance of the operator you can run a `CheckpointEvaluate` example._
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing the fault-tolerance behaviour of the operator

```

4) Put the model via socket, in this case you can use the models in `flink-jpmml-assets`:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put --> Send

./path/to/flink-1.3.2/bin/taskmanager.sh stop
```
_you can show the job's status in Flink UI on http://localhost:8081_
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can see

```

_At this point, when the job is restarted, there's no need to reload the models in control stream because you should see the models from the last checkpoint_
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no need to re-send the models info by control stream

/*
* Make a prediction withSupportStream that represents the stream from the socket
* evaluate the model with model upload in ControlStream
* */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breakline for closing comments

@maocorte maocorte merged commit c0d1edb into FlinkML:master Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants