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

What If tool returning error #238

Open
guruvittal opened this issue Jul 14, 2024 · 1 comment
Open

What If tool returning error #238

guruvittal opened this issue Jul 14, 2024 · 1 comment

Comments

@guruvittal
Copy link

guruvittal commented Jul 14, 2024

Hi,

When trying to run the WIT, the model oredict function returns an error, when we click the predict button:
TypeError('array([34.62574], dtype=float32) has type numpy.ndarray, but expected one of: int, float')

Notebook having this issue: https://github.com/PAIR-code/what-if-tool/blob/master/WIT_Age_Regression.ipynb

I was able to simulate with another model as well.

@jameswex
Copy link
Collaborator

Thanks for the bug report. The What-If Tool isn't in active development, so regressions like this aren't too surprising if our demos don't have perfectly-locked version numbers of all downstream dependencies. I'm guessing what is happening here is that a new version of some package used by the tensorflow estimator code for this model has changed the format with which the predictions are returned, leading to the tool's front-end being given a list instead of a raw prediction value (float) for each datapoint.

One simple solution for this would be to update this demo to move away from use of tensorflow estimator and towards a different model api that could have a simple WIT custom prediction function written to wrap it.

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

No branches or pull requests

2 participants