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

Gatsby Lee

12/07/2022, 3:46 AM
Hi, when I use the output of OP as an input of op_generator, I got this errror.
Copy code
dagster._core.errors.DagsterInvalidDefinitionError: "log__<dagster._core.definitions.composition.InvokedSolidOutputHandle object at 0x1088f1f90>" is not a valid name in Dagster. Names must be in regex ^[A-Za-z0-9_]+$.
Here is the sample code.
Copy code
@op(out={"step_name": Out()})
def op__get_config():
    step_name = "hello-dagster"
    return step_name


def generate_op(step_name: str):
    @op(name=f"log__{step_name}")
    def func():
        print(f"hello-{step_name}")

    return func


@job
def job() -> None:

    step_name = op__get_config()
    log_op = generate_op(step_name)
5 Views