Batch trajectory array streaming#13
Merged
Merged
Conversation
Co-authored-by: GPT-5.5 <openai-codex-gpt-5.5@pi.local> Pi-Model: openai-codex/gpt-5.5
There was a problem hiding this comment.
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
TrajectoryArrayBatchand export it from the public API. - Update
DB.stream_trajectory_arrays()andfeder.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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
Note: full pytest was also run; RabbitMQ-dependent tests failed because no local RabbitMQ broker was running.