-
Notifications
You must be signed in to change notification settings - Fork 218
Logistic Regression #3329
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
base: main
Are you sure you want to change the base?
Logistic Regression #3329
Conversation
Logisitic Regression trained on iris dataset
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 also provide client sample to interact with deployed Python servable
iris_pipeline_project/Dockerfile
Outdated
ENV PYTHONPATH=/ovms/lib/python | ||
|
||
RUN apt update && apt install -y python3-pip git \ | ||
build-essential python3-dev libatlas-base-dev |
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.
Do we need those packages?
Since we only want to download a few python packages, they don't look necessary.
iris_pipeline_project/Dockerfile
Outdated
RUN apt update && apt install -y python3-pip git \ | ||
build-essential python3-dev libatlas-base-dev | ||
|
||
RUN pip3 install --break-system-packages numpy pandas scikit-learn |
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.
Why using --break-system-packages
?
iris_pipeline_project/Dockerfile
Outdated
COPY pipeline/graph.pbtxt /models/iris_pipeline/ | ||
COPY pipeline/ovmsmodel.py /models/iris_pipeline/ | ||
COPY model/model.pkl /models/iris_pipeline/ | ||
COPY model_config.json /model_config.json |
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.
Let's drop those lines. Eventually we would like to have a Dockerfile for multiple models, datasets etc. so users would build the image with all required packages and mount their data while launching the container.
iris_pipeline_project/convert.py
Outdated
@@ -0,0 +1,24 @@ | |||
from sklearn.datasets import load_iris |
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.
This entire file should be wrapped in OvmsPythonModel with training done in execute
method
{ | ||
"custom_node_library_config_list": [], | ||
"graph_config_list": [ | ||
{ | ||
"name": "iris_pipeline", | ||
"base_path": "/models/iris_pipeline", | ||
"graph_path": "graph.pbtxt" | ||
} | ||
] | ||
} |
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.
This format is not correct. See:
https://github.com/openvinotoolkit/model_server/blob/main/docs/python_support/quickstart.md#step-4-prepare-server-configuration-file
for reference
iris_pipeline_project/ovmsmodel.py
Outdated
@@ -0,0 +1,29 @@ | |||
import pandas as pd |
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.
This file is unnecessary. After exporting model to ONNX we can use native KServe API support.
input_stream: "inference_input" | ||
output_stream: "inference_output" | ||
|
||
node { | ||
calculator: "InferenceCalculator" | ||
input_stream: "inference_input" | ||
output_stream: "inference_output" | ||
options: { | ||
[type.googleapis.com/openvino.CalculatorOptions] { | ||
model_name: "iris_pipeline" | ||
signature_name: "serving_default" | ||
} | ||
} | ||
} |
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.
This will not work. See:
https://github.com/openvinotoolkit/model_server/blob/main/docs/python_support/quickstart.md#step-3-prepare-graph-configuration-file
for reference
Logistic Regression model trained on iris dataset