Closed francesshei closed 2 months ago
The class PostProcessingHook
has been split into the AfterPlacementHook
and AfterConnectivityHook
, use these and change the method after_connectivity
to postprocess
:
@config.dynamic(attr_name="strategy")
class AfterPlacementHook(abc.ABC):
name: str = config.attr(key=True)
def queue(self, pool):
pool.queue(
lambda scaffold: scaffold.after_placement[self.name].postprocess(),
submitter=self,
)
@abc.abstractmethod
def postprocess(self):
pass
@config.dynamic(attr_name="strategy")
class AfterConnectivityHook(abc.ABC):
name: str = config.attr(key=True)
def queue(self, pool):
pool.queue(
lambda scaffold: scaffold.after_connectivity[self.name].postprocess(),
submitter=self,
)
@abc.abstractmethod
def postprocess(self):
pass
and yes to manually run that step you could do this (recommended):
with scaffold.create_job_pool() as pool:
if pool.is_main():
pool.schedule([n.after_connectivity["reticulothalamic_hook"]])
pool.execute()
or directly call it (not recommended, no scheduling of multiple jobs if required, and no parallelism):
n.after_connectivity["reticulothalamic_hook"].postprocess()
I have a script implemented from a previous v4 that uses a
PostProcessingHook
class frombsb.postprocessing
that has now been removed. It imports the class and then implements theafter_connectivity
method: how would that work in v>4.0.1? I see anAfterConnectivityHook
class but in the same module, but the docs are barely written. Would it be the same to call itspostprocess()
method?The snippet I'm trying to re-implement is:
With hook: