GoogleCloudPlatform / ml-on-gcp

Machine Learning on Google Cloud Platform
Apache License 2.0
481 stars 178 forks source link

"AI Explanations - Tabular data example" read json failure #107

Open threadgoldc opened 4 years ago

threadgoldc commented 4 years ago

image

threadgoldc commented 4 years ago

Can be fixed with:

response = json.loads(resp_obj.s[resp_obj.s.find('{'):])

Same occurs in: attributions_resp = json.loads(batch_explain.s[batch_explain.s.find('{'):])

Then requires a patch on:

rows.append([val, test_data.iloc[1].tolist()[i], attributions[val][0]])

I have a pull request ready if these are general issues and not something I have messed up.