Skip to content

Commit

Permalink
Improve write_desc (#429)
Browse files Browse the repository at this point in the history
* disable `write_desc` by default

* fix test
  • Loading branch information
PythonFZ authored Dec 6, 2022
1 parent ce04730 commit 4393af4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/integration_tests/test_single_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def run(self):
def test_run(proj_path):
test_node_1 = ExampleNode01(inputs="Lorem Ipsum")
assert test_node_1.inputs == "Lorem Ipsum"
test_node_1.write_graph()
test_node_1.write_graph(write_desc=True)

obj = ExampleNode01.load()
assert obj.inputs == "Lorem Ipsum"
Expand Down
2 changes: 1 addition & 1 deletion zntrack/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def write_graph( # noqa: C901
no_run_cache: bool = False,
dry_run: bool = False,
run: bool = None,
write_desc: bool = True,
write_desc: bool = False,
*,
call_args: str = None,
):
Expand Down

3 comments on commit 4393af4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Report for Python 3.9

name min max mean stddev median iqr outliers ops rounds iterations
0 tests/benchmark/test_benchmark.py::test_NodeCollector_run_and_save 0.000278705 0.000748813 0.000332573 9.76248e-05 0.000290254 4.07e-05 10;14 3006.86 82 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.000960116 0.00116652 0.00097851 2.23717e-05 0.000972316 1.6775e-05 31;19 1021.96 519 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.000961416 0.00117462 0.000980136 2.30825e-05 0.000973317 1.84502e-05 26;15 1020.27 491 1
3 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.00150193 0.0061723 0.00163793 0.000257775 0.00160083 0.000142777 12;14 610.527 501 1
4 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00152142 0.00300655 0.00159194 0.000103621 0.00157403 3.85002e-05 22;35 628.163 399 1
5 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00161673 0.00182913 0.00164382 1.80323e-05 0.00164203 1.83258e-05 46;8 608.339 333 1
6 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00161913 0.00197973 0.00164486 3.10366e-05 0.00164063 1.755e-05 12;13 607.954 360 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.26086 1.97975 1.56519 0.345753 1.42559 0.646639 1;0 0.638901 5 1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Report for Python 3.8

name min max mean stddev median iqr outliers ops rounds iterations
0 tests/benchmark/test_benchmark.py::test_NodeCollector_run_and_save 0.000309902 0.00452483 0.000686976 0.000690057 0.000507604 0.000262177 4;5 1455.66 77 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.000808108 0.00129351 0.00108329 8.68642e-05 0.00109881 0.000112451 66;8 923.118 264 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.000810909 0.00235183 0.00113923 0.000241926 0.00115866 0.000236902 58;12 877.787 300 1
3 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00136141 0.00335554 0.00181014 0.000244667 0.00184637 0.000306503 69;2 552.443 266 1
4 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00136341 0.00752498 0.00179857 0.000512238 0.00177687 0.000396404 7;5 555.997 200 1
5 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00154442 0.00325584 0.00205532 0.000305339 0.00197212 0.000409755 111;11 486.542 459 1
6 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.00162872 0.0419846 0.00217293 0.00185934 0.00193692 0.00041933 4;18 460.208 485 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.32531 1.81099 1.53431 0.239251 1.38843 0.429542 2;0 0.651757 5 1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Report for Python 3.10

name min max mean stddev median iqr outliers ops rounds iterations
0 tests/benchmark/test_benchmark.py::test_NodeCollector_run_and_save 0.000311317 0.00135307 0.000472725 0.000190402 0.000407822 0.00016691 8;5 2115.4 80 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.00075074 0.00135397 0.00104919 7.11517e-05 0.00107616 7.3504e-05 94;43 953.113 580 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.000847846 0.00139888 0.00105708 5.58211e-05 0.00107521 6.5454e-05 112;24 946.001 588 1
3 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00127717 0.00385691 0.00180853 0.000238179 0.001795 0.000129232 50;42 552.935 439 1
4 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00153228 0.00496816 0.00188674 0.000301125 0.00182424 0.000166208 34;28 530.014 398 1
5 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00162589 0.00906889 0.00195862 0.000694686 0.0018146 0.000228137 13;32 510.564 455 1
6 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.00164109 0.00877008 0.0018772 0.000546508 0.0017677 0.000125107 17;49 532.708 599 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.30081 1.92519 1.53404 0.251718 1.44425 0.356424 1;0 0.651875 5 1

Please sign in to comment.