Skip to content

Deprecate query_engine.batch_size in favour of max_selectors_per_batch #102

Description

@tombonfert

Problem: The config field query_engine.batch_size (config_parser.py:401, default 500) is opaque. It actually caps the number of unique TimeSeriesSelector instances per solve batch (see build_batches, report_utils.py:51), not a generic row/record count.

This gets worse once PR #98 lands, which adds query_engine.max_containers_per_batch. Two batching dimensions sitting side by side, one named batch_size and one named max_containers_per_batch, is confusing. They should read symmetrically: max_selectors_per_batch and max_containers_per_batch.

Proposal: Rename batch_size to max_selectors_per_batch, keeping batch_size as a deprecated alias for one release.

  • config_parser.py: add max_selectors_per_batch (default 500); accept batch_size as a deprecated alias that resolves to it and emits a DeprecationWarning; error if both are set.
  • Update internal call sites and param names: report.py:913, report.py:936; the batch_size parameter in report_utils.build_batches / the batch helpers; docstring in calculated_channel.py:51.
  • Update tests (report_utils_test.py, config_parser_test.py) and docs.

Done when: configs use max_selectors_per_batch; batch_size still works but warns; deprecation window and removal release are noted in the changelog/docs.

Activity

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