PacktPublishing / EngineeringMLOps

Engineering MLOps, published by Packt
MIT License
174 stars 130 forks source link

Model input shape vs score.py input shape #2

Open rzvcs opened 3 years ago

rzvcs commented 3 years ago

I was working through this repository about deploying models with Azure and noticed that the model input shape is (1,6). However, in both 06_Model_Deployment and 07_CICD_Pipelines, score.py expects an input of shape (1,7) and tries to pass that shape to the model.

When using https://github.com/PacktPublishing/EngineeringMLOps/blob/master/12_Model_Serving_Monitoring/inference.py, I am giving an array of shape (1,7). This throws the error that either I should change the input shape or the model.

Is there something wrong in how I am creating the model or in consuming it?

CliveRobson commented 2 years ago

Hi rzvcs

I am facing the same issue. where you able to sort out?

rzvcs commented 2 years ago

@CliveRobson , I don't recall the full set of things that I did. I do recall the issue is from the model being built for a data shape of (1,6) while the score files try to push data of shape (1,7). That is, data is 1 array of 6 or 7 elements, respectively. I would suggest either to review how the model is defined or to change these lines and push data of shape (1,6).

I am not expecting these to be the correct changes for these learning docs, but it would be something to have in mind when going through the docs - the model input is not uniform across the files and it's not fully explained why. Hope this helps.

CliveRobson commented 2 years ago

@rzvcs Hi, Yes i noticed that in chapter 5 - (Model evaluation) we are passing the data shape as (1,6) but in the score.py it is (1,7).. and I am also facing an issue in inferencing the data after the ACI deployment, Anyway i am not able to find a clear explanation and I also tried pushing the data to (1,6) but that also didn't work ..I will try looking for some other resources.. Thanks