Skip to content
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

Model input shape vs score.py input shape #2

Open
rzvcs opened this issue Sep 11, 2021 · 3 comments
Open

Model input shape vs score.py input shape #2

rzvcs opened this issue Sep 11, 2021 · 3 comments

Comments

@rzvcs
Copy link

rzvcs commented Sep 11, 2021

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
Copy link

Hi rzvcs

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

@rzvcs
Copy link
Author

rzvcs commented May 3, 2022

@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
Copy link

CliveRobson commented May 3, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants