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

SceneQueryRunner: allow extra queries and processors to be rerun separately #748

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sd2k
Copy link
Contributor

@sd2k sd2k commented May 24, 2024

Followup from this comment

  • this adds the option for ExtraQueryProviders to state that they
    only wish to have their processor rerun (probably with different state),
    rather than the QueryRunner rerunning both the query and the processor.

This is really useful for some ML-based providers which need to run an
extra query then transform the results, and also include interactivity
such as a slider, but don't need to rerun the query as part of the
interactivity - just the processing.

There are some downsides here, most notably the extra complexity:

  • the ExtraQueryProvider interface is more flexible but more complex
  • the SceneQueryRunner needs another subscription and
    ReplaySubject in order to be able to re-send the latest
    unprocessed data to the processors again
    • I think this will also increase memory usage?

Perhaps there's a way for me to do this using transformations instead? That might be preferable. I thought I'd submit this to get feedback though, since it's one solution.

@sd2k sd2k force-pushed the query-runner-handle-reprocessing branch from 68e4c4c to 21392f6 Compare May 24, 2024 12:40
@sd2k sd2k force-pushed the query-runner-handle-reprocessing branch 2 times, most recently from 49363a6 to 41672d3 Compare May 28, 2024 07:45
@sd2k sd2k changed the title SceneQueryRunner: allow supplemental queries and processors to be rerun separately SceneQueryRunner: allow extra queries and processors to be rerun separately May 28, 2024
Base automatically changed from decouple-comparisons-from-queryrunner to main June 5, 2024 10:03
@sd2k sd2k force-pushed the query-runner-handle-reprocessing branch 4 times, most recently from 4e1f6cc to edd16a9 Compare June 5, 2024 10:53
…rately

Followup from [this comment](#587 (comment))
- this adds the option for ExtraQueryProviders to state that they
only wish to have their processor rerun (probably with different state),
rather than the QueryRunner rerunning both the query _and_ the processor.

This is really useful for some ML-based providers which need to run an
extra query then transform the results, and also include interactivity
such as a slider, but _don't_ need to rerun the query as part of the
interactivity - just the processing.

There are some downsides here, most notably the extra complexity:

- the `ExtraQueryProvider` interface is more flexible but more complex
- the `SceneQueryRunner` needs another subscription and
  `ReplaySubject` in order to be able to re-send the latest
  unprocessed data to the processors again
  - I think this will also increase memory usage?

Perhaps there's a way to do this using transformations instead?
@sd2k sd2k force-pushed the query-runner-handle-reprocessing branch from edd16a9 to c62b35d Compare June 7, 2024 09:12
@sd2k sd2k linked an issue Nov 5, 2024 that may be closed by this pull request
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.

Hide 'primary' query when outlier detector is enabled
1 participant