feat: Added explain tabular samples#348
Conversation
|
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
dbdf1dd to
00102be
Compare
b09cece to
8fb4947
Compare
vinnysenthil
left a comment
There was a problem hiding this comment.
Just one point about showcasing explanations returned on the explain() call + a few nits.
| for prediction_ in response.predictions: | ||
| print(prediction_) |
There was a problem hiding this comment.
Why the underscore at the end of the var name? Also Endpoint.explain() returns a high-level Prediction object that contains predictions and explanations (see here). We should probably showcase both. @sasha-gitg thoughts?
There was a problem hiding this comment.
I agree that we should demonstrate that both predictions and explanations can get accessed from this object.
| for prediction_ in response.predictions: | ||
| print(prediction_) |
There was a problem hiding this comment.
I agree that we should demonstrate that both predictions and explanations can get accessed from this object.
|
|
||
|
|
||
| # [START aiplatform_sdk_explain_tabular_sample] | ||
| def explain_tabular_sample( |
There was a problem hiding this comment.
This could be a generic explain sample and doesn't necessarily need to be qualified as tabular.
There was a problem hiding this comment.
The sheet has me doing explain_tabular_sample, I assume it's used by the tech writers in such a sample.
|
|
||
| response = endpoint.explain(instances=[instance_dict], parameters={}) | ||
|
|
||
| for explanation in response.explanations: |
There was a problem hiding this comment.
Same as GAPIC sample for consistency.
Waiting for merge of #337