Skip to content

Instantly share code, notes, and snippets.

@sararob sararob/explain-metadata.py Secret
Last active Feb 17, 2020

Embed
What would you like to do?
Generating explanation metadata for tabular models
# The following explanation metadata can be used for tabular models that accept a numpy array as input
# Write the `explanation_metadat` object below to a JSON file called explanation_metadata.json
explanation_metadata = {
"inputs": {
"data": {
"input_tensor_name": model.input.name,
"input_baselines": [train_data.median().values.tolist()],
"encoding": "bag_of_features",
"index_feature_mapping": train_data.columns.tolist()
}
},
"outputs": {
"duration": {
"output_tensor_name": model.output.name
}
},
"framework": "tensorflow"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.