You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should about do it. Would be useful for diagnosing behavior.
class Ensemble:
...
@property
def drift_state_dict(self):
""" The ensemble members' current drift states."""
return {detector_name : det.drift_state for detector_name, det in self.detectors.items()}
...
The text was updated successfully, but these errors were encountered:
class Ensemble:
...
@property
def retraining_recs_dict(self):
""" The ensemble members' current retraining recommendations."""
output = {}
for detector_name, det in self.detectors.items():
if hasattr(det, 'retraining_recs'):
output[detector_name] = det.retraining_recs
return output
...
I think this could also be a one-liner list comprehension, but this is easier to read.
There's probably a better way to implement this abstractly for StreamingEnsemble and BatchEnsemble, that will spit out dicts for properties defined there. retraining_recs is probably the only oddball, as it's not defined in detector.py.
More straightforward (and readable?) to dupe this sort of code for the ones we want, though.
This should about do it. Would be useful for diagnosing behavior.
The text was updated successfully, but these errors were encountered: