-
Notifications
You must be signed in to change notification settings - Fork 30
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
[#28] Updated flink jpmml examples #39
Conversation
…es for ADT evaluator
…he needed structures, insert test for it
…eature/28-introducing_updated_flink-jpmml_examples
…eature/28-introducing_updated_flink-jpmml_examples
There was a problem hiding this 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.
There was a problem hiding this 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.
flink-jpmml-examples/README.md
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comma needed?
There was a problem hiding this comment.
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!
flink-jpmml-examples/README.md
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
##Fault-Tolerance
flink-jpmml-examples/README.md
Outdated
@@ -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. |
There was a problem hiding this comment.
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 ..
flink-jpmml-examples/README.md
Outdated
|
||
2) Run the flink-cluster | ||
|
||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specify long please
flink-jpmml-examples/README.md
Outdated
_if you like testing a fault-tolerance of the operator you can run a `CheckpointEvaluate` example._ |
There was a problem hiding this comment.
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
flink-jpmml-examples/README.md
Outdated
``` | ||
|
||
4) Put the model via socket, in this case you can use the models in `flink-jpmml-assets`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put --> Send
flink-jpmml-examples/README.md
Outdated
./path/to/flink-1.3.2/bin/taskmanager.sh stop | ||
``` | ||
_you can show the job's status in Flink UI on http://localhost:8081_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can see
flink-jpmml-examples/README.md
Outdated
``` | ||
|
||
_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_ |
There was a problem hiding this comment.
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 | ||
* */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breakline for closing comments
this PR refers to #28 issue.