Skip to content

Commit

Permalink
fix import error and typo in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
morgoth95 committed Jun 17, 2022
1 parent 6fdae2c commit 368286a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ In the example above for options B.1 and B.2 we provided a dataset containing a

```
>>> # FOR EACH OPTION
>>> from nebullvm import optimize_torch_model
>>> from nebullvm import optimize_onnx_model
>>> import numpy as np
>>> model_path = "path-to-onnx-model"
>>> save_dir = "."
Expand Down
13 changes: 6 additions & 7 deletions nebullvm/inference_learners/openvino.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
from nebullvm.transformations.base import MultiStageTransformation

try:
import openvino
from openvino.runtime import Core
from openvino.runtime import Core, Model, CompiledModel, InferRequest
except ImportError:
if "intel" in cpuinfo.get_cpu_info()["brand_raw"].lower():
warnings.warn(
Expand All @@ -33,13 +32,13 @@
from nebullvm.installers.installers import install_openvino

install_openvino(with_optimization=True)
import openvino
from openvino.runtime import Core
from openvino.runtime import Core, Model, CompiledModel, InferRequest
else:
warnings.warn(
"No Openvino library detected. "
"The Openvino Inference learner should not be used."
)
Model = CompiledModel = InferRequest = object


class OpenVinoInferenceLearner(BaseInferenceLearner, ABC):
Expand All @@ -62,9 +61,9 @@ class OpenVinoInferenceLearner(BaseInferenceLearner, ABC):

def __init__(
self,
model: openvino.runtime.Model,
compiled_model: openvino.runtime.CompiledModel,
infer_request: openvino.runtime.InferRequest,
model: Model,
compiled_model: CompiledModel,
infer_request: InferRequest,
input_keys: List,
output_keys: List,
description_file: str,
Expand Down

0 comments on commit 368286a

Please sign in to comment.