From a376b5d00d9c3fd6956f219eab98f56d8043a27b Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Fri, 18 Oct 2019 06:53:57 +0100 Subject: [PATCH] Fix anchor tabular explanation serialization (#443) * Fix anchor tabular explanation serialization * Update fix for anchor tabular --- python/alibiexplainer/alibiexplainer/anchor_tabular.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/alibiexplainer/alibiexplainer/anchor_tabular.py b/python/alibiexplainer/alibiexplainer/anchor_tabular.py index 8222b0f14cb..8dd9d824de0 100644 --- a/python/alibiexplainer/alibiexplainer/anchor_tabular.py +++ b/python/alibiexplainer/alibiexplainer/anchor_tabular.py @@ -96,7 +96,7 @@ def explain(self, inputs: List) -> Dict: anchor_exp['raw']['examples'][i][key] = parr.values instance = anchor_exp['raw']['instance'] - anchor_exp['raw']['instance'] = pd.DataFrame(instance).replace(self.cmap).values + anchor_exp['raw']['instance'] = pd.DataFrame([instance]).replace(self.cmap).values.squeeze() return anchor_exp else: raise Exception("Explainer not initialized")