From 31377d53854d28277992f872c131324f04b0fa80 Mon Sep 17 00:00:00 2001 From: "nick.t" <52658893+nickt121@users.noreply.github.com> Date: Mon, 20 Jun 2022 17:33:04 +0800 Subject: [PATCH] fix: fix missing sampler_params attribute missing attribute will cause sklearn modules to fail even if unused/untouched. This is due to enumeration of all params in prettyprint from sklearn. --- eli5/lime/samplers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eli5/lime/samplers.py b/eli5/lime/samplers.py index d079b471..a300ddb8 100644 --- a/eli5/lime/samplers.py +++ b/eli5/lime/samplers.py @@ -135,6 +135,7 @@ def __init__(self, self.random_state = random_state self.rng_ = check_random_state(random_state) self.token_pattern = token_pattern + self.sampler_params = sampler_params self.samplers = list(map(self._create_sampler, sampler_params)) if weights is None: self.weights = np.ones(len(self.samplers))