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
11 files
+ 120
1
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -120,3 +120,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