Skip to content

Override the models the prune command looks for #2

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

Merged
merged 2 commits into from
Nov 29, 2022

Conversation

tobytwigger
Copy link
Contributor

We're wanting to use this package in a modular environment - most of our models are optional so we want to prune them if included but not if they aren't. I'd also like to define the models within the module rather than specifying them in config.

This PR lets you add an optional callback to override the config value. This will let us dynamically list the models to search for, without changing the default behaviour.

@riccardodallavia
Copy link
Contributor

Hi @tobytwigger and thank you for the nice pull request!
I'd change the callback type from Closure to callable to allow non anonymous functions (as for example invokable classes)!
What do you think?

@riccardodallavia
Copy link
Contributor

@tobytwigger I just updated your pull request.
Please let me know if it works for you so I can merge this!

@tobytwigger tobytwigger mentioned this pull request Aug 11, 2022
@tobytwigger
Copy link
Contributor Author

Looks excellent thank you, and it's working well for us locally.

@riccardodallavia riccardodallavia merged commit de1939a into maize-tech:main Nov 29, 2022
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

Successfully merging this pull request may close these issues.

2 participants