Hi Dagster team ! Noticed a bizarre behavior that ...
# ask-community
j
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
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
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
@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
@Denis Arkhipov just submitted the issue here! Feel free to give it a 👍 to prioritize it 🙂 Thanks for your input!
❤️ 1
d
@Jeanine Thank you so much!