Skip to content

Commit

Permalink
allow output to be hidden in nbrun() (#1864)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuulos authored May 27, 2024
1 parent b512656 commit 9865115
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions metaflow/runner/nbrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class NBRunner(object):
def __init__(
self,
flow,
show_output: bool = False,
show_output: bool = True,
profile: Optional[str] = None,
env: Optional[Dict] = None,
base_dir: str = DEFAULT_DIR,
Expand Down Expand Up @@ -100,18 +100,12 @@ def __init__(
)

def nbrun(self, **kwargs):
self.old_val_show_output = self.show_output
self.runner.show_output = True
result = self.runner.run(**kwargs)
self.runner.show_output = self.old_val_show_output
self.runner.spm.cleanup()
return result.run

def nbresume(self, **kwargs):
self.old_val_show_output = self.show_output
self.runner.show_output = True
result = self.runner.resume(**kwargs)
self.runner.show_output = self.old_val_show_output
self.runner.spm.cleanup()
return result.run

Expand Down

0 comments on commit 9865115

Please sign in to comment.