Esempio n. 1
0
 def _fetch_data(self, change):
     if not self.config:
         return
     with self.out:
         self.visualizer._update_config(self.config)
         self.output = namedtuple_to_dict(self.visualizer.visualize())
         self.config = dict()
Esempio n. 2
0
 def get_insights_config(self):
     return {
         "classes": self.classes,
         "methods": list(ATTRIBUTION_NAMES_TO_METHODS.keys()),
         "method_arguments": namedtuple_to_dict(ATTRIBUTION_METHOD_CONFIG),
         "selected_method": self._config.attribution_method,
     }
Esempio n. 3
0
 def _fetch_attribution(self, change):
     if self.label_details:
         self.attribution = namedtuple_to_dict(
             self.visualizer._calculate_attribution_from_cache(
                 self.label_details["instance"],
                 self.label_details["labelIndex"]))
         self.label_details = dict()