Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow for custom optimization strategies #368

Open
bhearsum opened this issue Nov 29, 2023 · 3 comments
Open

allow for custom optimization strategies #368

bhearsum opened this issue Nov 29, 2023 · 3 comments

Comments

@bhearsum
Copy link
Contributor

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.

@ahal
Copy link
Collaborator

ahal commented Nov 29, 2023

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.

@ahal
Copy link
Collaborator

ahal commented Nov 29, 2023

See the group_by decorator for an example of this:

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

@bhearsum
Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants