Skip to content

Better decorator names #742

@liamhuber

Description

@liamhuber

@ligerzero-ai and I had the chance to chat today. When I asked him where pain points are, one of the things that came up was that new users often struggle with the fact that macro-defining functions are not being run when the macro is run -- they expect them to be more like @as_function_node behaves.

Now, since macros are always just going to run their graph at runtime, I think it's necessary to maintain that the macro decorators are placed on their recipe -- but I absolutely agree we can and should make this distinction clearer by more distinctive and informative decorator names.

Right now, I'm thinking

  • @as_function_node --> @as_node_function
  • @as_macro_node --> @as_macro_recipe
  • @as_dataclass_node --> @as_dataclass_node

Any other ideas? @samwaseda you have contact with new users too, any suggestions from your end?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions