Vova Manannikov
commited on
Commit
•
646b3df
1
Parent(s):
8c1e2fa
pickled model
Browse files- config.json +2 -2
- convert.py +12 -0
- model.pkl +0 -0
- pipeline.py +1 -0
- requirements.txt +1 -1
config.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"sklearn": {
|
3 |
"columns": ["fixed_acidity", "volatile_acidity", "citric_acid", "residual_sugar", "chlorides", "free_sulfur_dioxide", "total_sulfur_dioxide", "density", "pH", "sulphates", "alcohol"],
|
4 |
"environment": [
|
5 |
-
"scikit-learn=
|
6 |
],
|
7 |
"example_input": {
|
8 |
"fixed_acidity": ["7.4", "7.8", "10.3"],
|
@@ -18,7 +18,7 @@
|
|
18 |
"alcohol": ["9.4", "9.8", "12.6"]
|
19 |
},
|
20 |
"model": {
|
21 |
-
"file": "
|
22 |
},
|
23 |
"task": "tabular-classification"
|
24 |
}
|
|
|
2 |
"sklearn": {
|
3 |
"columns": ["fixed_acidity", "volatile_acidity", "citric_acid", "residual_sugar", "chlorides", "free_sulfur_dioxide", "total_sulfur_dioxide", "density", "pH", "sulphates", "alcohol"],
|
4 |
"environment": [
|
5 |
+
"scikit-learn=1.2.2"
|
6 |
],
|
7 |
"example_input": {
|
8 |
"fixed_acidity": ["7.4", "7.8", "10.3"],
|
|
|
18 |
"alcohol": ["9.4", "9.8", "12.6"]
|
19 |
},
|
20 |
"model": {
|
21 |
+
"file": "model.pkl"
|
22 |
},
|
23 |
"task": "tabular-classification"
|
24 |
}
|
convert.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Dict, List, Union
|
2 |
+
import os
|
3 |
+
import joblib
|
4 |
+
import numpy as np
|
5 |
+
|
6 |
+
features = ["fixed_acidity", "volatile_acidity", "citric_acid", "residual_sugar", "chlorides", "free_sulfur_dioxide", "total_sulfur_dioxide", "density", "pH", "sulphates", "alcohol"]
|
7 |
+
|
8 |
+
model = joblib.load("sklearn_model.joblib")
|
9 |
+
model_path = "model.pkl"
|
10 |
+
|
11 |
+
with open(model_path, mode="bw") as f:
|
12 |
+
pickle.dump(model, file=f)
|
model.pkl
ADDED
Binary file (187 kB). View file
|
|
pipeline.py
CHANGED
@@ -3,6 +3,7 @@ import os
|
|
3 |
import joblib
|
4 |
import numpy as np
|
5 |
|
|
|
6 |
features = ["fixed_acidity", "volatile_acidity", "citric_acid", "residual_sugar", "chlorides", "free_sulfur_dioxide", "total_sulfur_dioxide", "density", "pH", "sulphates", "alcohol"]
|
7 |
|
8 |
class PreTrainedPipeline():
|
|
|
3 |
import joblib
|
4 |
import numpy as np
|
5 |
|
6 |
+
|
7 |
features = ["fixed_acidity", "volatile_acidity", "citric_acid", "residual_sugar", "chlorides", "free_sulfur_dioxide", "total_sulfur_dioxide", "density", "pH", "sulphates", "alcohol"]
|
8 |
|
9 |
class PreTrainedPipeline():
|
requirements.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
|
|
1 |
joblib==1.2.0
|
2 |
-
scikit-learn==0.24.2
|
3 |
numpy==1.24.3
|
|
|
1 |
+
scikit-learn=1.2.2
|
2 |
joblib==1.2.0
|
|
|
3 |
numpy==1.24.3
|