https://dagster.io/ logo
Title
r

Rubén Lopez Lozoya

12/29/2021, 5:21 PM
Hey is there anyway of mapping a typed composite solid input to the input of a solid that is typed as Any?
c

claire

01/03/2022, 9:48 PM
Hi Ruben, this is a bug in our legacy APIs that has since been fixed in our new graph/job/op APIs. I would recommend following this guide to migrate: https://docs.dagster.io/guides/dagster/graph_job_op#a-composite-solid-with-inputs-and-outputs
The migrated code would look something like this:
@op(out=Out(int))
def do_something():
    return 5


@graph(out=GraphOut())
def my_graph():
    return do_something()


@op(ins={"x": In(Any)})
def my_op(x):
    return x


@job
def my_job():
    my_op(my_graph())