Skip to content
Snippets Groups Projects

add 'save' and 'load' to the learners and periodic saving to the Runner

Merged Bas Nijholt requested to merge saving into master
Compare and
13 files
+ 540
23
Compare changes
  • Side-by-side
  • Inline
Files
13
@@ -125,3 +125,9 @@ class AverageLearner(BaseLearner):
num_bins = int(max(5, sqrt(self.npoints)))
vals = hv.Points(vals)
return hv.operation.histogram(vals, num_bins=num_bins, dimension=1)
def _get_data(self):
return (self.data, self.npoints, self.sum_f, self.sum_f_sq)
def _set_data(self, data):
self.data, self.npoints, self.sum_f, self.sum_f_sq = data
Loading