Skip to content

Tighten is_batched_event sub-event check#644

Merged
davesh0812 merged 1 commit into
mlrun:developmentfrom
tomerm-iguazio:tighten_event_check
Jun 21, 2026
Merged

Tighten is_batched_event sub-event check#644
davesh0812 merged 1 commit into
mlrun:developmentfrom
tomerm-iguazio:tighten_event_check

Conversation

@tomerm-iguazio

@tomerm-iguazio tomerm-iguazio commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • is_batched_event previously classified any event whose body contained items with a .body attribute as batched. This caught non-event objects like mlrun's Response, which also exposes .body.
  • Tightened the sub-event check to also require "event" in the class name (lowercased), preserving duck-typing for non-storey event-like objects while excluding Response-shaped payloads.
  • Added unit tests covering the positive case (storey Event sub-events) and the negative case (Response-shaped sub-events).

Test plan

  • tests/test_flow.py::test_is_batched_event_with_event_sub_events
  • tests/test_flow.py::test_is_batched_event_excludes_non_event_body_objects
  • Existing batched-event flows still classify correctly in CI

Part of ML-12706 effort.

@davesh0812 davesh0812 merged commit ec47bdd into mlrun:development Jun 21, 2026
5 checks passed
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