Use file parameter

This commit is contained in:
Marcin Kostrzewski 2022-05-11 20:19:44 +02:00
parent 1679fac800
commit 8874950fa6
2 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,9 @@ pipeline {
image 's444409-create-dataset'
}
}
parameters {
file 'input_example.json'
}
stages {
stage('Get dataset from artifact') {

View File

@ -6,7 +6,7 @@ logged_model = 'mlruns/1/296d6f314bb2451885fb7ae58988301e/artifacts/model'
loaded_model = mlflow.pyfunc.load_model(logged_model)
with open(f'{logged_model}/input_example.json') as f:
with open('input_example.json') as f:
data = json.load(f)
input_example = np.array([data['inputs'][0]], dtype=np.float64).reshape(-1, 2)