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
All threads resolved!
Compare and
12 files
+ 378
7
Compare changes
  • Side-by-side
  • Inline
Files
12
@@ -122,3 +122,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