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

Add inference lifecycle hooks #102

Open
juanmc2005 opened this issue Oct 4, 2022 · 0 comments · May be fixed by #106
Open

Add inference lifecycle hooks #102

juanmc2005 opened this issue Oct 4, 2022 · 0 comments · May be fixed by #106
Labels
feature New feature or request

Comments

@juanmc2005
Copy link
Owner

Problem

When writing custom models or pipelines, one may want to react to specific inference events, for example before/after benchmarking on a file.

Idea

Add classes RealTimeInferenceHook and BenchmarkHook to define listener interfaces. This can also be used to implement other behavior like progress bars, writing results, etc.

Example

class MyHook(BenchmarkHook):
    def on_finished(results):
        print("Finished!")

benchmark = Benchmark(..., hooks=[MyHook()])
@juanmc2005 juanmc2005 added the feature New feature or request label Oct 4, 2022
@juanmc2005 juanmc2005 modified the milestones: Version 0.7, Version 0.6 Oct 4, 2022
@juanmc2005 juanmc2005 linked a pull request Oct 19, 2022 that will close this issue
@juanmc2005 juanmc2005 modified the milestones: Version 0.6, Version 0.7 Oct 28, 2022
@juanmc2005 juanmc2005 linked a pull request Jan 31, 2023 that will close this issue
@juanmc2005 juanmc2005 modified the milestones: Version 0.7, Version 0.8 Mar 25, 2023
@juanmc2005 juanmc2005 removed this from the Version 0.8 milestone Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant