Skip to content

Commit

Permalink
do not skip postprocess stage if run_per_stage=0 (fixes #185)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Jan 9, 2025
1 parent 1407c48 commit 44aef29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlonmcu/session/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,12 +1039,12 @@ def load(self):
self.completed[RunStage.LOAD] = True
self.unlock()

def process(self, until=RunStage.RUN, skip=None, export=False):
def process(self, until=RunStage.RUN, start=None, skip=None, export=False):
"""Process the run until a given stage."""
skip = skip if skip is not None else []
if until == RunStage.DONE:
until = RunStage.DONE - 1
start = self.next_stage # self.stage hold the max finished stage
start = self.next_stage if start is None else start
if until < start:
logger.debug("%s Nothing to do", self.prefix)
return self.get_report()
Expand Down
3 changes: 3 additions & 0 deletions mlonmcu/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ def _close_progress(pbar):
def _process(pbar, run, until, skip):
"""Helper function to invoke the run."""
run.process(until=until, skip=skip, export=export)
if not per_stage and run.has_stage(RunStage.POSTPROCESS) and RunStage.POSTPROCESS not in skip:
# run.postprocess()
run.process(until=RunStage.POSTPROCESS, start=RunStage.POSTPROCESS, skip=skip, export=export)
if progress:
_update_progress(pbar)

Expand Down

0 comments on commit 44aef29

Please sign in to comment.