From dc17bb1a72381d3491bc78d6b5a9425a1682762b Mon Sep 17 00:00:00 2001 From: Stefan Krawczyk Date: Wed, 29 May 2024 13:59:28 -0700 Subject: [PATCH] Update driver.py to use inputs (#174) Inputs can be passed in as configuration, but really they should be passed in as inputs -- that way visualization doesn't interpret them as configuration. --- naturf/driver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/naturf/driver.py b/naturf/driver.py index 607676adb9..d8079c0f10 100644 --- a/naturf/driver.py +++ b/naturf/driver.py @@ -64,7 +64,7 @@ def __init__(self, inputs: dict, outputs: List[str], **kwargs): # instantiate driver with function definitions & adapters self.dr = ( driver.Builder() - .with_config(self.inputs) + .with_config({}) .with_modules(nodes, output) .with_adapters(*hamilton_adapters) .build() @@ -74,7 +74,7 @@ def execute(self) -> pd.DataFrame: """Run the driver.""" # generate initial data frame - df = self.dr.execute(self.outputs) + df = self.dr.execute(self.outputs, inputs=self.inputs) return df @@ -82,7 +82,7 @@ def graph(self, view: bool = True, output_file_path: Union[str, None] = None) -> """Show the DAG. Return the graph object for the given inputs to execute.""" return self.dr.visualize_execution( - final_vars=self.outputs, output_file_path=output_file_path, render_kwargs={"view": view} + final_vars=self.outputs, inputs=self.inputs, output_file_path=output_file_path, render_kwargs={"view": view} ) def list_parameters(self):