Predict?
This commit is contained in:
parent
6757e5b025
commit
a852eae163
47
Jenkinsfile_predict
Normal file
47
Jenkinsfile_predict
Normal file
@ -0,0 +1,47 @@
|
||||
pipeline {
|
||||
agent {docker { image 'snowycocoon/ium_434788:4'}}
|
||||
parameters{
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'WHICH_BUILD'
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('copy artifacts')
|
||||
{
|
||||
steps
|
||||
{
|
||||
copyArtifacts(fingerprintArtifacts: true, projectName: 's434695-training/train', selector: buildParameter('WHICH_BUILD'))
|
||||
}
|
||||
}
|
||||
stage('predict')
|
||||
{
|
||||
steps
|
||||
{
|
||||
catchError {
|
||||
sh 'rm -r my_model'
|
||||
sh 'python3.8 Zadanie_09_MLflow_Predict.py ${BATCH_SIZE} ${EPOCHS}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
mail body: 'SUCCESS',
|
||||
subject: 's434788 mlflow predict',
|
||||
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||
}
|
||||
unstable {
|
||||
mail body: 'UNSTABLE', subject: 's434788 mlflow predict', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||
}
|
||||
failure {
|
||||
mail body: 'FAILURE', subject: 's434788 mlflow predict', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||
}
|
||||
changed {
|
||||
mail body: 'CHANGED', subject: 's434788 mlflow predict', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||
}
|
||||
}
|
||||
}
|
7
Zadanie_09_MLflow_Predict.py
Normal file
7
Zadanie_09_MLflow_Predict.py
Normal file
@ -0,0 +1,7 @@
|
||||
import mlflow
|
||||
import pandas as pd
|
||||
|
||||
model = mlflow.keras.load_model("my_model")
|
||||
data = pd.read_json('my_model\input_example.json', orient='index')
|
||||
print(data)
|
||||
print(model.predict(data))
|
15
mlruns/0/1e5709985a4a4682ab319f0d3289099d/meta.yaml
Normal file
15
mlruns/0/1e5709985a4a4682ab319f0d3289099d/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
artifact_uri: file:///C:/Users/domstr2/Desktop/Git%20Repositories/ium_434788/mlruns/0/1e5709985a4a4682ab319f0d3289099d/artifacts
|
||||
end_time: 1621792438671
|
||||
entry_point_name: ''
|
||||
experiment_id: '0'
|
||||
lifecycle_stage: active
|
||||
name: ''
|
||||
run_id: 1e5709985a4a4682ab319f0d3289099d
|
||||
run_uuid: 1e5709985a4a4682ab319f0d3289099d
|
||||
source_name: ''
|
||||
source_type: 4
|
||||
source_version: ''
|
||||
start_time: 1621792431816
|
||||
status: 3
|
||||
tags: []
|
||||
user_id: domstr2
|
@ -0,0 +1 @@
|
||||
1621792435688 1.0 0
|
@ -0,0 +1 @@
|
||||
16
|
1
mlruns/0/1e5709985a4a4682ab319f0d3289099d/params/epochs
Normal file
1
mlruns/0/1e5709985a4a4682ab319f0d3289099d/params/epochs
Normal file
@ -0,0 +1 @@
|
||||
15
|
@ -0,0 +1 @@
|
||||
6757e5b025505bf24aebc3f63982f0ad32995de3
|
@ -0,0 +1 @@
|
||||
c:/Users/domstr2/Desktop/Git Repositories/ium_434788/Zadanie_08_and_09_MLflow.py
|
@ -0,0 +1 @@
|
||||
LOCAL
|
@ -0,0 +1 @@
|
||||
domstr2
|
19
my_model/MLmodel
Normal file
19
my_model/MLmodel
Normal file
@ -0,0 +1,19 @@
|
||||
flavors:
|
||||
keras:
|
||||
data: data
|
||||
keras_module: tensorflow.keras
|
||||
keras_version: 2.4.0
|
||||
save_format: tf
|
||||
python_function:
|
||||
data: data
|
||||
env: conda.yaml
|
||||
loader_module: mlflow.keras
|
||||
python_version: 3.8.5
|
||||
saved_input_example_info:
|
||||
artifact_path: input_example.json
|
||||
format: tf-serving
|
||||
type: ndarray
|
||||
signature:
|
||||
inputs: '[{"type": "tensor", "tensor-spec": {"dtype": "float64", "shape": [-1, 14]}}]'
|
||||
outputs: '[{"type": "tensor", "tensor-spec": {"dtype": "int32", "shape": [-1]}}]'
|
||||
utc_time_created: '2021-05-23 17:53:55.693430'
|
10
my_model/conda.yaml
Normal file
10
my_model/conda.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
channels:
|
||||
- defaults
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python=3.8.5
|
||||
- pip
|
||||
- pip:
|
||||
- mlflow
|
||||
- tensorflow==2.4.1
|
||||
name: mlflow-env
|
1
my_model/data/keras_module.txt
Normal file
1
my_model/data/keras_module.txt
Normal file
@ -0,0 +1 @@
|
||||
tensorflow.keras
|
BIN
my_model/data/model/saved_model.pb
Normal file
BIN
my_model/data/model/saved_model.pb
Normal file
Binary file not shown.
BIN
my_model/data/model/variables/variables.data-00000-of-00001
Normal file
BIN
my_model/data/model/variables/variables.data-00000-of-00001
Normal file
Binary file not shown.
BIN
my_model/data/model/variables/variables.index
Normal file
BIN
my_model/data/model/variables/variables.index
Normal file
Binary file not shown.
1
my_model/data/save_format.txt
Normal file
1
my_model/data/save_format.txt
Normal file
@ -0,0 +1 @@
|
||||
tf
|
1
my_model/input_example.json
Normal file
1
my_model/input_example.json
Normal file
@ -0,0 +1 @@
|
||||
{"inputs": [-0.011282211362261343, 0.6825528426633746, -0.8779676567417312, 0.25625952402130414, 0.0325916986923591, 0.1075920895847071, -0.19667888586283722, 0.6801776123326557, -0.13679826698989028, -0.6382195990287619, -0.8663788579309919, -0.787822640922809, -0.7744150275178463, -0.0063619093376772375]}
|
Loading…
Reference in New Issue
Block a user