Skip to content

allow for custom optimization strategies #368

Open

Description

@bhearsum

At the moment, taskgraph hardcodes the OptimizationSchema with no way to override it. This means that even though you can register new optimization strategies, the task.py transform will not accept them.

It looks like Gecko added support for this many years ago, but it never made it upstream.

Activity

  1. ahal commented on Nov 29, 2023

    @ahal
    Contributor

    I think rather than copy Gecko here, I'd rather the schema be provided as an argument to the @register_strategy decorator. That way the schema definition lives next to the thing that requires it and we don't need to call extra functions in the registration.

  2. ahal commented on Nov 29, 2023

    @ahal
    Contributor

    See the group_by decorator for an example of this:

    @group_by("attribute", schema=Schema(str))

  3. bhearsum commented on Nov 29, 2023

    @bhearsum
    ContributorAuthor

    I think rather than copy Gecko here, I'd rather the schema be provided as an argument to the @register_strategy decorator. That way the schema definition lives next to the thing that requires it and we don't need to call extra functions in the registration.

    Sounds very reasonable to me!

  4. added 2 commits that reference this issue on Dec 24, 2025
    d5c2724
    cf8e2f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions