awesome-pipeline icon indicating copy to clipboard operation
awesome-pipeline copied to clipboard

Add ZnTrack

Open PythonFZ opened this issue 2 years ago • 0 comments

The ZnTrack package provides workflow and Experiment management based on DVC. It can be used to

  • build graphs from within Python
  • write packages that can be used as nodes on other graphs built around DVC.

API

A ZnTrack Node is similar to the dataclass API, defining inputs, outputs and the node methods in an object oriented approach:

class InputToOutput(Node):
    """Save the inputs 'zn.params' to the outputs attribute 'zn.outs'"""

    inputs = zn.params()
    outputs = zn.outs()

    def run(self):
        self.outputs = self.inputs

Nodes can be connected via zn.deps(InputToOutput) or the respective files that are generated. More examples are available at https://github.com/zincware/znlib which collects ZnTrack Nodes and is constantly growing.

PythonFZ avatar Nov 30 '22 14:11 PythonFZ