Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
feat: pass save results as parameter for node (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
qguyk authored Jun 10, 2021
1 parent aa62b59 commit cac24e9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion entropylab_qpudb/_entropy_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def __init__(
dependency: Optional[Union[Node, Iterable[Node]]] = None,
must_run_after: Set[Node] = None,
name: Optional[str] = None,
save_results: bool = True,
):
if dependency:
if isinstance(dependency, Iterable):
Expand Down Expand Up @@ -111,7 +112,9 @@ def program(

if name is None:
name = self.__class__.__name__
super().__init__(name, program, input_vars, output_vars, must_run_after)
super().__init__(
name, program, input_vars, output_vars, must_run_after, save_results
)

def add_config_dependency(self, node):
super().add_input(f"config_{node.label}", node.outputs["config"])
Expand Down
15 changes: 11 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ homepage = "https://github.com/entropy-lab/entropy-qpu"
python = "^3.7.1"
ZODB = "^5.6.0"
pandas = "^1.2.4"
entropylab = "^0.1.1"
entropylab = "^0.1.2"

[tool.poetry.dev-dependencies]
black = "^20.8b1"
Expand Down

0 comments on commit cac24e9

Please sign in to comment.