In migration from 0.9.3 to 0.10.4 we're seeing a t...
# announcements
p
In migration from 0.9.3 to 0.10.4 we're seeing a typing error:
Copy code
dagster.core.errors.DagsterInvalidDefinitionError: Invalid type: dagster_type must be DagsterType, a python scalar, or a python type that has been marked usable as a dagster type via @usable_dagster_type or make_python_type_usable_as_dagster_type: got typing.NoReturn
on something that was previously working. Is there a dagster typed equivalent of NoReturn or should I mark NoReturn as usable?
a
can you share the code in question (or an approximation)? If its what im thinking, im surprised this used to work. You likely just need to manually declare
output_defs=[]
p
It's complaining about a pipeline definition
Copy code
@pipeline(
    preset_defs=training_presets, mode_defs=DEFAULT_MODES
)
def message_sentiment_analysis_cardiff_train() -> NoReturn:
    """Test pipeline for modularization"""
    y_df = orc.initialize_learning_task()
...
In this case the return type is mostly there as coding convention. It's not particularly meaningful.
a
ahhhhh interesting
I think it will work if you switch it to
None
- which I believe is what it should be since
NoReturn
is for functions that never return ie always raise exceptions. Python functions without an explicit
return
implicitly
return None
thanks for the report - the core of the issue was an unintended consequence of some work for https://github.com/dagster-io/dagster/discussions/2902
p
Thank you