Dan Stoner
09/16/2021, 7:50 PMdagit
without any additional args so I have been trying to get workspace.yaml
working but now I'm in what seems like Python import hell. I have an existing sample that works fine with dagit -f hello_dagster.py
and all I want to do is move that into a subdirectory and have it available when running just dagit
.UserWarning: Error loading repository location repositories.py:dagster.core.errors.DagsterInvalidDefinitionError: Bad return value from repository construction function: all elements of list must be of type PipelineDefinition, PartitionSetDefinition, ScheduleDefinition, or SensorDefinition. Got value of type <class 'module'> at index 0, value of type <class 'module'> at index 1.
hello_dagster.py
has no @pipeline
annotation (even though when I run it after starting via dagit -f
the UI shows pipeline named do_it_all
)from dagster import graph, op
@op
def do_something():
print("Hello Dagster!")
@graph
def do_it_all():
do_something()
if __name__ == "__main__":
do_it_all()
max
09/16/2021, 8:18 PMprha
09/16/2021, 10:18 PM