Commit 6558a4c4 authored by syz's avatar syz Committed by CompPhysChris
Browse files

Default implementation for parameter extraction (UNTESTED)

parent 93cf79e0
...@@ -93,7 +93,7 @@ class GIVBayesian(Process): ...@@ -93,7 +93,7 @@ class GIVBayesian(Process):
""" """
super(GIVBayesian, self)._set_memory_and_cores(cores=cores, mem=mem) super(GIVBayesian, self)._set_memory_and_cores(cores=cores, mem=mem)
# Remember that the default number of pixels corresponds to only the raw data that can be held in memory # Remember that the default number of pixels corresponds to only the raw data that can be held in memory
# In the case of simplified Bayeisan inference, four (roughly) equally sized datasets need to be held in memory: # In the case of simplified Bayesian inference, four (roughly) equally sized datasets need to be held in memory:
# raw, compensated current, resistance, variance # raw, compensated current, resistance, variance
self._max_pos_per_read = self._max_pos_per_read // 4 # Integer division self._max_pos_per_read = self._max_pos_per_read // 4 # Integer division
# Since these computations take far longer than functional fitting, do in smaller batches: # Since these computations take far longer than functional fitting, do in smaller batches:
......
...@@ -9,7 +9,7 @@ import numpy as np ...@@ -9,7 +9,7 @@ import numpy as np
import psutil import psutil
import joblib import joblib
from ..io.hdf_utils import checkIfMain, check_for_old from ..io.hdf_utils import checkIfMain, check_for_old, get_attributes
from ..io.io_hdf5 import ioHDF5 from ..io.io_hdf5 import ioHDF5
from ..io.io_utils import recommendCores, getAvailableMem from ..io.io_utils import recommendCores, getAvailableMem
...@@ -127,7 +127,8 @@ class Process(object): ...@@ -127,7 +127,8 @@ class Process(object):
Datagroup containing partially computed results Datagroup containing partially computed results
""" """
raise NotImplementedError('Please override the resume_computation specific to your process') self.parms_dict = get_attributes(h5_partial_group)
self._start_pos = self.parms_dict.pop('last_pixel')
def _set_memory_and_cores(self, cores=1, mem=1024): def _set_memory_and_cores(self, cores=1, mem=1024):
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment