Charles Zhan
07/16/2022, 12:29 AMDaniel Kim
07/18/2022, 6:24 PM@op
def op1():
return "hello"
@op
def op2(my_str: str):
return "hello there"
@graph
def test_graph():
op2(op1())
test_asset = AssetsDefinition.from_graph(test_graph)
@repository
def test_repo():
return [
test_asset,
define_asset_job(
name="test_asset_job"
)
]
UserWarning: Error loading repository location test_repo.py:dagster._check.CheckError: Invariant failed. Description: All leaf nodes within graph 'test_graph' must generate outputs which are mapped to outputs of the graph, and produce assets. The following leaf node(s) are non-asset producing ops: {'op2'}. This behavior is not currently supported because these ops are not required for the creation of the associated asset(s).
Carter
07/18/2022, 6:33 PM@graph(out={"first_asset": GraphOut(), "second_asset": GraphOut()})
def two_assets_graph(upstream_asset):
one, two = two_outputs(upstream_asset)
return {"first_asset": one, "second_asset": two}
two_assets = AssetsDefinition.from_graph(two_assets_graph)
jamie
07/18/2022, 6:37 PM