Skip to content

Commit

Permalink
Orca openvino estimator (intel-analytics#3011)
Browse files Browse the repository at this point in the history
* init

* add distripredict

* javardd

* java spark context

* test

* fix

* remove tes

* remove

* add type check

* meet comments

* fix import

* fix

* fix style

* combine testcase

* fix style

* replaceable variable
  • Loading branch information
cyita authored and yangw1234 committed Sep 23, 2021
1 parent 3f9026b commit 2bfe5e0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python/orca/src/bigdl/orca/inference/inference_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,18 @@ def predict(self, inputs):
jinputs,
input_is_table)
return KerasNet.convert_output(output)

def distributed_predict(self, inputs, sc):
data_type = inputs.map(lambda x: x.__class__.__name__).first()
input_is_table = False
if data_type == "list":
input_is_table = True
jinputs = inputs.map(lambda x: Layer.check_input(x)[0])

output = callZooFunc(self.bigdl_type,
"inferenceModelDistriPredict",
self.value,
sc,
jinputs,
input_is_table)
return output.map(lambda x: KerasNet.convert_output(x))

0 comments on commit 2bfe5e0

Please sign in to comment.