Skip to content

Batch trajectory array streaming#13

Merged
ian-ross merged 2 commits into
mainfrom
trajectory-array-batching
May 19, 2026
Merged

Batch trajectory array streaming#13
ian-ross merged 2 commits into
mainfrom
trajectory-array-batching

Conversation

@ian-ross
Copy link
Copy Markdown
Member

Summary

  • add TrajectoryArrayBatch and export it from the public API
  • change DB and public stream_trajectory_arrays() to yield decoded batches
  • update streaming tests and stream_performance.py for batch results

Testing

  • uv run --all-packages ruff check libs/common/src/feder_common/models.py libs/common/src/feder_common/db.py api/src/feder/query.py api/src/feder/init.py tests/common_lib/test_db_streaming.py tests/api/test_streaming.py scripts/stream_performance.py
  • uv run --all-packages pytest tests/common_lib/test_db_streaming.py tests/api/test_streaming.py

Note: full pytest was also run; RabbitMQ-dependent tests failed because no local RabbitMQ broker was running.

Co-authored-by: GPT-5.5 <openai-codex-gpt-5.5@pi.local>
Pi-Model: openai-codex/gpt-5.5
@ian-ross ian-ross requested a review from Copilot May 19, 2026 14:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces batch-level streaming for trajectory arrays by adding a TrajectoryArrayBatch model and updating DB/API streaming functions to yield decoded batches rather than individual TrajectoryArray items.

Changes:

  • Add TrajectoryArrayBatch and export it from the public API.
  • Update DB.stream_trajectory_arrays() and feder.stream_trajectory_arrays() to yield decoded batches.
  • Update streaming tests and the performance script to consume batch results.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/common_lib/test_db_streaming.py Updates DB streaming tests to validate batch semantics and batch metadata.
tests/api/test_streaming.py Updates public API streaming tests to assert batch returns and counts.
scripts/stream_performance.py Adjusts throughput measurement loop to handle streamed batches.
libs/common/src/feder_common/models.py Introduces the TrajectoryArrayBatch dataclass model.
libs/common/src/feder_common/db.py Changes trajectory-array streaming to decode and yield TrajectoryArrayBatch objects.
api/src/feder/query.py Updates public stream_trajectory_arrays() signature/docs to return batches.
api/src/feder/init.py Exports TrajectoryArrayBatch from the public API surface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libs/common/src/feder_common/db.py Outdated
Co-authored-by: GPT-5.3 Codex Spark <openai-codex-gpt-5.3-codex-spark@pi.local>
Pi-Model: openai-codex/gpt-5.3-codex-spark
@ian-ross ian-ross merged commit f48d5fd into main May 19, 2026
1 check passed
@ian-ross ian-ross deleted the trajectory-array-batching branch May 19, 2026 14:50
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