https://dagster.io/ logo
#ask-community
Title
# ask-community
j

Jeanine

08/08/2023, 3:57 PM
Hi Dagster team ! Noticed a bizarre behavior that may or may not be a bug, i'll let you be the judge of that 🙂 I have an asset with an optional output, and a multi-asset depending on that output's asset:
Copy code
@asset(output_required=False)
def my_asset(...):
    ...
    yield Output({"key": "value"}, output_name="asset_name")


@multi_asset(
    ins={"asset_name": AssetIn("my_asset")},
    outs={"multi_1": AssetOut(), "multi_2": AssetOut(), "multi_3": AssetOut()},
)
def my_multi_asset(context: OpExecutionContext, asset_name: dict):
   ...
Whenever I specify the
output_name
for the first asset's optional output, I get the following error:
dagster._core.errors.DagsterInvariantViolationError: Core compute for op "my_asset" returned an output "asset_name" that does not exist. The available outputs are ['result']
When I remove the
output_name
, it all works perfectly. It seems to me that the
output_name
is not taken into account when provided for optional outputs. Has anybody encountered this error before? Am I interpreting it correctly? Thank you 🙂
d

Denis Arkhipov

08/25/2023, 2:48 PM
Hi @Jeanine Have the same issue, for required outputs I see also the same behaviour, may be it's related to multi-assets or partitions definitions. Did you figured it out?
j

Jeanine

08/25/2023, 3:22 PM
Hello @Denis Arkhipov, i simply removed the
output_name
. If you're having the same issue, then I could maybe open an issue on GitHub to report the bug!
d

Denis Arkhipov

08/28/2023, 5:21 AM
@Jeanine that would be great, I didn't put the
output_name
before, but last week I just tried to pick up some metadata based on
output_name
and so encountered with this issue. Glad you answered!
j

Jeanine

08/28/2023, 10:10 AM
@Denis Arkhipov just submitted the issue here! Feel free to give it a 👍 to prioritize it 🙂 Thanks for your input!
❤️ 1
d

Denis Arkhipov

08/29/2023, 11:43 AM
@Jeanine Thank you so much!
7 Views