Skip to content

AsyncDriver doesn't prune graph based on overrides #1023

@rwhitten577

Description

@rwhitten577

Current behavior

Standard Driver prunes the DAG to only execute nodes that are not overridden using overrides. The AsyncDriver does not seem to do this, resulting in nodes getting run that shouldn't.

I believe it's just a missed arg where overrides should be passed in to self.graph.get_upstream_nodes(final_vars, inputs) here: https://github.com/DAGWorks-Inc/hamilton/blob/main/hamilton/async_driver.py#L290

That seems to be present in the standard driver: https://github.com/DAGWorks-Inc/hamilton/blob/main/hamilton/driver.py#L645

Stack Traces

(If applicable)

Screenshots

(If applicable)

Steps to replicate behavior

  1. Build AsyncDriver
  2. Provide overrides on driver.execute
  3. Overridden nodes still execute

Library & System Information

Python 3.11, Hamilton 1.70

Expected behavior

Overridden nodes should not run on driver.execute

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions