Skip to content

Support optional from_ extractors when DAG target does not exist #1551

@mgdemers

Description

@mgdemers

Is your feature request related to a problem? Please describe.
When using a set of extractors, if the DAG module being built does not reference the extractor targets, an exception is thrown during building: ValueError: Could not find node with name: input3 in function graph. Available nodes: ['input1', 'input2', Ellipsis].

Describe the solution you'd like
When using from_ to create extractors, support an additional flag which allows builds to skip an extractor if the target node does not exist.

Describe alternatives you've considered

  • Additional introspection on the dag to check what targets are used and explicitly avoid registering those unused extractors. This adds additional inspection steps outside of the DAG building paths, and does not work if the target feeds a decorator.

Additional context
Originally discussed in Hamilton dev slack here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions