Skip to content

Commit

Permalink
Inspect code (#418)
Browse files Browse the repository at this point in the history
* use PyCharm 'Inspect Code' for small Code improvements

* Some 'pylint' and 'perflint' updates

* Rollback

* Rollback
  • Loading branch information
PythonFZ authored Oct 16, 2022
1 parent a971168 commit 5382ba2
Show file tree
Hide file tree
Showing 20 changed files with 123 additions and 151 deletions.
2 changes: 1 addition & 1 deletion tests/integration_tests/examples/test_example_06.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def arg(request):

@pytest.fixture
def fix_list() -> list:
return [x for x in range(10)]
return list(range(10))


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ def func_1(cfg: NodeConfig):

@nodify(outs=pathlib.Path("test2.txt"), deps=pathlib.Path("test.txt"))
def func_2(cfg: NodeConfig):
cfg.outs.write_text(cfg.deps.read_text() + " 2")
cfg.outs.write_text(f"{cfg.deps.read_text()} 2")


@nodify(outs=pathlib.Path("test3.txt"), deps=pathlib.Path("test.txt"))
def func_3(cfg: NodeConfig):
cfg.outs.write_text(cfg.deps.read_text() + " 3")
cfg.outs.write_text(f"{cfg.deps.read_text()} 3")


def test_example_func(proj_path):
Expand Down
10 changes: 2 additions & 8 deletions tests/integration_tests/interface/test_base_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,13 @@ def test_experiments(loaded_dvc_interface):


def test_exp_list(loaded_dvc_interface):
assert (
loaded_dvc_interface.exp_list[0].name == "master"
or loaded_dvc_interface.exp_list[0].name == "main"
)
assert loaded_dvc_interface.exp_list[0].name in ["master", "main"]
assert len(loaded_dvc_interface.exp_list) == 1


def test__reset(loaded_dvc_interface):
loaded_dvc_interface._reset()
assert (
loaded_dvc_interface.exp_list[0].name == "master"
or loaded_dvc_interface.exp_list[0].name == "main"
)
assert loaded_dvc_interface.exp_list[0].name in ["master", "main"]


def test_load_files_into_directory(multi_experiment_path):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/test_dvc_outs.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ def test_SingleNodeInNodeDirMulti(proj_path):

result = SingleNodeInNodeDir["TestNode"]
assert result.path == [pathlib.Path("nodes", "TestNode", "test.json"), "file.txt"]
assert all([pathlib.Path(x).exists() for x in result.path])
assert all(pathlib.Path(x).exists() for x in result.path)
2 changes: 1 addition & 1 deletion tests/integration_tests/test_zn_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self, data_classes=None, **kwargs):
self.data_classes = data_classes

def run(self):
self.result = sum([x.param1 + x.param2 for x in self.data_classes])
self.result = sum(x.param1 + x.param2 for x in self.data_classes)


def test_methods_list(proj_path):
Expand Down
12 changes: 6 additions & 6 deletions tests/integration_tests/test_zn_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ class WritePlots(Node):
plots: pd.DataFrame = zn.plots()

def run(self):
self.plots = pd.DataFrame({"value": [x for x in range(100)]})
self.plots = pd.DataFrame({"value": list(range(100))})
self.plots.index.name = "my_index"


class WritePlotsNoIndex(Node):
plots: pd.DataFrame = zn.plots()

def run(self):
self.plots = pd.DataFrame({"value": [x for x in range(100)]})
self.plots = pd.DataFrame({"value": list(range(100))})


class WritePlotsWrongData(Node):
plots: pd.DataFrame = zn.plots()

def run(self):
self.plots = {"value": [x for x in range(100)]}
self.plots = {"value": list(range(100))}


def test_write_plots(proj_path):
Expand All @@ -41,7 +41,7 @@ def test_write_plots(proj_path):
def test_load_plots(proj_path):
WritePlots().run_and_save()

df = pd.DataFrame({"value": [x for x in range(100)]})
df = pd.DataFrame({"value": list(range(100))})
df.index.name = "index"

assert df.equals(WritePlots.load().plots)
Expand Down Expand Up @@ -71,7 +71,7 @@ class WriteTwoPlots(Node):
plots_b: pd.DataFrame = zn.plots()

def run(self):
self.plots_a = pd.DataFrame({"value": [x for x in range(100)]})
self.plots_a = pd.DataFrame({"value": list(range(100))})
self.plots_a.index.name = "my_index_a"

self.plots_b = pd.DataFrame({"value": [-x for x in range(100)]})
Expand All @@ -94,7 +94,7 @@ class WritePlotsModify(Node):
plots = zn.plots(x_label="test_label", title="My Plot", template="smooth")

def run(self):
self.plots = pd.DataFrame({"value": [x for x in range(100)]})
self.plots = pd.DataFrame({"value": list(range(100))})


class WritePlotsModifyDVC(Node):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/various_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DepsCollector(Node):
outs = zn.outs()

def run(self):
self.outs = sum([x.outs for x in self.deps])
self.outs = sum(x.outs for x in self.deps)


def test_multi_deps(proj_path):
Expand Down
61 changes: 26 additions & 35 deletions zntrack/core/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""ZnTrack Node class module"""

from __future__ import annotations

import contextlib
import json
import logging
import pathlib
Expand Down Expand Up @@ -59,16 +61,13 @@ def handle_deps(value) -> typing.List[str]:
if isinstance(value, (list, tuple)):
for lst_val in value:
deps_files += handle_deps(lst_val)
else:
if isinstance(value, (Node, NodeAttribute)):
for file in value.affected_files:
deps_files.append(pathlib.Path(file).as_posix())
elif isinstance(value, (str, pathlib.Path)):
deps_files.append(pathlib.Path(value).as_posix())
elif value is None:
pass
else:
raise ValueError(f"Type {type(value)} ({value}) is not supported!")
elif isinstance(value, (Node, NodeAttribute)):
for file in value.affected_files:
deps_files.append(pathlib.Path(file).as_posix())
elif isinstance(value, (str, pathlib.Path)):
deps_files.append(pathlib.Path(value).as_posix())
elif value is not None:
raise ValueError(f"Type {type(value)} ({value}) is not supported!")

return deps_files

Expand All @@ -86,13 +85,12 @@ def _handle_nodes_as_methods(nodes: dict):
nodes: dict
A dictionary of {option_name: zntrack.Node}
"""
for attribute, node in nodes.items():
if node is None:
continue
node.write_graph(
run=True,
call_args=f".load(name='{node.node_name}').save(hash_only=True)",
)
for node in nodes.values():
if node is not None:
node.write_graph(
run=True,
call_args=f".load(name='{node.node_name}').save(hash_only=True)",
)


BaseNodeTypeT = typing.TypeVar("BaseNodeTypeT", bound="Node")
Expand All @@ -119,9 +117,8 @@ def __getitem__(cls: Node, item: typing.Union[str, dict]) -> BaseNodeTypeT:
raise ValueError(
f"Can only load {cls} with type (str, dict). Found {type(item)}"
)
if isinstance(item, dict):
return cls.load(**item)
return cls.load(name=item)

return cls.load(**item) if isinstance(item, dict) else cls.load(name=item)

def __matmul__(cls, other: str) -> typing.Union[NodeAttribute, typing.Any]:
"""Shorthand for: getdeps(Node, other)
Expand Down Expand Up @@ -151,7 +148,7 @@ class NodeBase(zninit.ZnInit):
is_loaded: bool
if the class is loaded this can be used to only run certain code, e.g. in the init
node_name: str
first priority is by passing it through kwargs
first priority is if requested via kwargs
second is having the class attribute set in the class definition
last if both above are None it will be set to __class__.__name__
is_attribute: bool, default = False
Expand All @@ -168,7 +165,7 @@ class NodeBase(zninit.ZnInit):
def __init__(self, **kwargs):
self.is_loaded = kwargs.pop("is_loaded", False)
name = kwargs.pop("name", None)
if len(kwargs) > 0:
if kwargs:
raise TypeError(f"'{kwargs}' are an invalid keyword argument")
if name is not None:
# overwrite node_name attribute
Expand Down Expand Up @@ -307,12 +304,8 @@ def _update_options(self, lazy=None):
if not lazy:
# trigger loading the data into memory
value = getattr(self, option.name)
try:
with contextlib.suppress(AttributeError):
value._update_options(lazy=False)
except AttributeError:
# if lazy=False trigger update_options iteratively on
# all dependency Nodes
pass
self.is_loaded = True

@classmethod
Expand Down Expand Up @@ -351,15 +344,11 @@ def __init__(self, **kwargs):
try:
instance = cls(name=name, is_loaded=True)
except TypeError as type_error:
if getattr(cls.__init__, "uses_auto_init", False):
if not getattr(cls.__init__, "uses_auto_init", False):
# when not using the automatic init all arguments must have a
# default value and the super call is required. It would still be
# using new + init from Node class to circumvent required
# arguments in the automatic init
instance = object.__new__(cls)
Node.__init__(instance, name=name, is_loaded=True)
else:
# when not using the automatic init all arguments must have a
# default value and the super call is required. It would still
# be
raise TypeError(
f"Unable to create a new instance of {cls}. Check that all arguments"
" default to None. It must be possible to instantiate the class via"
Expand All @@ -368,6 +357,8 @@ def __init__(self, **kwargs):
"See the ZnTrack documentation for more information."
) from type_error

instance = object.__new__(cls)
Node.__init__(instance, name=name, is_loaded=True)
assert instance.node_name is not None, (
"The name of the Node is not set. Probably missing"
" 'super().__init__(**kwargs)' inside the custom '__init__'."
Expand Down Expand Up @@ -480,7 +471,7 @@ def write_graph(
"""Write the DVC file using run.
If it already exists it'll tell you that the stage is already persistent and
has been run before. Otherwise it'll run the stage for you.
has been run before. Otherwise, it'll run the stage for you.
Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions zntrack/core/dvcgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def filter_ZnTrackOption(
{descriptor.dvc_option: {attr_name: attr_value}}
"""
if not isinstance(zn_type, list):
zn_type = [zn_type]
if not isinstance(zn_type, (list, tuple)):
zn_type = (zn_type,)
data = [x for x in data if x.zn_type in zn_type]
if return_with_type:
types_dict = {x.dvc_option: {} for x in data}
Expand Down
79 changes: 38 additions & 41 deletions zntrack/core/functions/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,17 @@ def __post_init__(self):
# params does not have to be a string
if not isinstance(option_value, dict) and option_value is not None:
raise ValueError("Parameter must be dict or dot4dict.dotdict.")
else:
if not utils.check_type(
option_value,
(str, pathlib.Path),
allow_iterable=True,
allow_none=True,
allow_dict=True,
):
raise ValueError(
f"{option_value} is not a supported type. "
"Please use single values or lists of <str> and <pathlib.Path>."
)
elif not utils.check_type(
option_value,
(str, pathlib.Path),
allow_iterable=True,
allow_none=True,
allow_dict=True,
):
raise ValueError(
f"{option_value} is not a supported type. "
"Please use single values or lists of <str> and <pathlib.Path>."
)

def convert_fields_to_dotdict(self):
"""Update all fields to dotdict, if they are of type dict"""
Expand All @@ -86,9 +85,8 @@ def write_dvc_command(self, node_name: str) -> list:
"""
script = []
if self.params is not None:
if len(self.params) > 0:
script += ["--params", f"{utils.Files.params}:{node_name}"]
if self.params is not None and len(self.params) > 0:
script += ["--params", f"{utils.Files.params}:{node_name}"]
for datacls_field in dataclasses.fields(self):
if datacls_field.name == "params":
continue
Expand Down Expand Up @@ -278,36 +276,35 @@ def wrapper(
if exec_func:
return execute_function_call(func)

else:
cfg = copy.deepcopy(cfg_)
save_node_config_to_files(cfg=cfg, node_name=func.__name__)
dvc_run_option = DVCRunOptions(
no_commit=no_commit,
external=external,
always_changed=always_changed,
no_run_cache=no_run_cache,
force=force,
)
cfg = copy.deepcopy(cfg_)
save_node_config_to_files(cfg=cfg, node_name=func.__name__)
dvc_run_option = DVCRunOptions(
no_commit=no_commit,
external=external,
always_changed=always_changed,
no_run_cache=no_run_cache,
force=force,
)

script = prepare_dvc_script(
node_name=func.__name__,
dvc_run_option=dvc_run_option,
custom_args=cfg.write_dvc_command(func.__name__),
nb_name=nb_name,
module=module,
func_or_cls=func.__name__,
call_args="(exec_func=True)",
)
script = prepare_dvc_script(
node_name=func.__name__,
dvc_run_option=dvc_run_option,
custom_args=cfg.write_dvc_command(func.__name__),
nb_name=nb_name,
module=module,
func_or_cls=func.__name__,
call_args="(exec_func=True)",
)

if dry_run:
return script
utils.run_dvc_cmd(script)
if dry_run:
return script
utils.run_dvc_cmd(script)

if not no_exec:
utils.run_dvc_cmd(["dvc", "repro", func.__name__])
if not no_exec:
utils.run_dvc_cmd(["dvc", "repro", func.__name__])

cfg.convert_fields_to_dotdict()
return cfg
cfg.convert_fields_to_dotdict()
return cfg

return wrapper

Expand Down
5 changes: 2 additions & 3 deletions zntrack/metadata/decorators.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import contextlib
import dataclasses
import statistics
from time import time
Expand All @@ -15,11 +16,9 @@ class AggregateData:

def update(self):
"""Recompute mean and standard deviation"""
try:
with contextlib.suppress(statistics.StatisticsError):
self.mean = statistics.mean(self.values)
self.std = statistics.stdev(self.values)
except statistics.StatisticsError:
pass


class TimeIt(MetaData):
Expand Down
1 change: 0 additions & 1 deletion zntrack/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"check_type",
"get_python_interpreter",
"run_dvc_cmd",
"get_auto_init",
"FILE_DVC_TRACKED",
"VALUE_DVC_TRACKED",
"DVCOptions",
Expand Down
Loading

6 comments on commit 5382ba2

@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.000246802 0.000517204 0.000276774 4.78686e-05 0.000255002 2.79752e-05 12;12 3613.06 81 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.000950009 0.00107441 0.000963758 1.16796e-05 0.000959559 1.48505e-05 110;9 1037.61 544 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.000951809 0.00119991 0.000967895 2.14755e-05 0.000962009 1.7e-05 31;9 1033.17 480 1
3 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.0015772 0.023408 0.00169159 0.000979521 0.0016339 4.7049e-05 1;37 591.159 495 1
4 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00161762 0.00189062 0.00164025 1.78799e-05 0.00163827 1.3199e-05 22;12 609.665 354 1
5 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00162181 0.00195922 0.00164312 2.62633e-05 0.00163931 1.6651e-05 7;5 608.6 357 1
6 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00627106 0.00828948 0.00668591 0.000390107 0.00656846 0.000280002 15;11 149.568 95 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.235 1.29209 1.25908 0.0232021 1.25881 0.0366811 2;0 0.794233 5 1

CML watermark

@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.000406302 0.00286162 0.000793681 0.000421715 0.000690104 0.000349102 8;4 1259.95 68 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.000996505 0.00288902 0.0012 0.000191287 0.00115721 0.000198927 57;10 833.332 517 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.000998406 0.00401182 0.00122524 0.000249451 0.00118231 0.000216602 26;9 816.165 402 1
3 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00169422 0.00510354 0.00211176 0.00038311 0.00205742 0.000275652 17;11 473.538 344 1
4 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00172831 0.00399763 0.00214278 0.00029544 0.00211351 0.000291152 58;10 466.684 360 1
5 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.00198341 0.00731995 0.00255627 0.000514793 0.00243161 0.000361503 48;34 391.194 469 1
6 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00830805 0.017339 0.0102862 0.00108075 0.0101036 0.000808081 12;7 97.2179 87 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.49682 1.67531 1.57773 0.0684451 1.57343 0.0984452 2;0 0.633823 5 1

CML watermark

@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.000265003 0.000931312 0.000348037 9.82777e-05 0.000338004 7.29268e-05 10;8 2873.26 95 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.000845411 0.00103911 0.000861476 1.28376e-05 0.000857611 1.1951e-05 137;31 1160.8 868 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.000848111 0.000981313 0.000865491 1.30483e-05 0.000861411 1.31505e-05 166;21 1155.41 856 1
3 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.00143192 0.00353165 0.00164955 0.000273553 0.00156142 0.000182827 75;69 606.225 733 1
4 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00143672 0.00171922 0.00145942 1.85475e-05 0.00145592 1.6175e-05 26;7 685.205 579 1
5 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00143772 0.00162002 0.00145831 1.55296e-05 0.00145522 1.74507e-05 68;8 685.726 569 1
6 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00277934 0.00493036 0.00302532 0.000280299 0.00292604 0.000261352 23;9 330.544 247 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.21847 1.30804 1.25743 0.0377351 1.25805 0.0640242 2;0 0.795276 5 1

CML watermark

@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.000202299 0.000578798 0.000240117 6.86409e-05 0.000211099 3.565e-05 7;13 4164.64 83 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.000870896 0.0010841 0.000882475 1.24615e-05 0.000878845 9.6e-06 39;21 1133.18 594 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.000878396 0.0010625 0.000891393 1.44562e-05 0.000887646 1.15005e-05 38;14 1121.84 488 1
3 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.00133439 0.00228609 0.00141155 6.48439e-05 0.00139509 4.64507e-05 65;46 708.441 581 1
4 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00152959 0.00166579 0.00155236 1.21034e-05 0.00155094 1.3699e-05 97;9 644.18 410 1
5 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00153009 0.00165079 0.00156141 1.68569e-05 0.00155959 1.815e-05 109;9 640.448 419 1
6 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00588087 0.00751656 0.00606381 0.000196269 0.00601547 0.000114074 11;11 164.913 123 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.14529 1.26151 1.20981 0.0481056 1.19643 0.0752803 2;0 0.826579 5 1

CML watermark

@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.000269306 0.000632113 0.000332272 8.82009e-05 0.000293257 4.5401e-05 12;12 3009.58 82 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.000942522 0.00120383 0.000958588 1.76203e-05 0.000953822 1.5751e-05 42;10 1043.2 532 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.000950219 0.00249385 0.000977289 0.00010378 0.000961619 1.74e-05 12;20 1023.24 470 1
3 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.00149642 0.00266424 0.00156451 7.99406e-05 0.00154562 5.7975e-05 41;22 639.176 511 1
4 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00160663 0.00171313 0.00162655 1.2726e-05 0.00162353 1.69505e-05 84;7 614.798 383 1
5 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00161214 0.00316677 0.00168972 0.000142858 0.00164304 5.9902e-05 22;31 591.813 338 1
6 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00613968 0.00961503 0.00659912 0.000724627 0.00635659 0.000296204 10;12 151.535 101 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.26365 1.32861 1.28939 0.0249583 1.27913 0.0304918 2;0 0.77556 5 1

CML watermark

@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.000231802 0.000604105 0.00029094 7.06777e-05 0.000266803 7.72257e-05 13;6 3437.13 95 1
1 tests/benchmark/test_benchmark.py::test_InputOutput_load_lazy 0.000842224 0.000923127 0.00085688 9.41658e-06 0.000853575 1.16e-05 204;20 1167.02 886 1
2 tests/benchmark/test_benchmark.py::test_InputOutput_load 0.00084771 0.00100951 0.000865368 1.49491e-05 0.00086131 1.26495e-05 86;25 1155.58 765 1
3 tests/benchmark/test_benchmark.py::test_InputOutput_run_and_save 0.00140482 0.00633818 0.00148471 0.000244576 0.00144092 5.54757e-05 17;68 673.532 721 1
4 tests/benchmark/test_benchmark.py::test_NodeCollector_load 0.00141981 0.00163081 0.00143961 1.75822e-05 0.00143541 1.63e-05 31;11 694.632 524 1
5 tests/benchmark/test_benchmark.py::test_NodeCollector_load_lazy 0.00142272 0.00157923 0.00144349 1.43937e-05 0.00144022 1.63e-05 83;9 692.767 589 1
6 tests/benchmark/test_benchmark.py::test_InputOutput_write_graph 0.00273713 0.00533277 0.00292913 0.000244087 0.00285889 0.000124801 26;29 341.398 268 1
7 tests/benchmark/test_benchmark.py::test_NodeCollector_write_graph 1.1738 1.21087 1.18552 0.0149508 1.18134 0.0169053 1;0 0.843514 5 1

CML watermark

Please sign in to comment.