Conversation
|
|
||
| TODO: replace `matrix` with named fields (var_lat, var_lon, etc., or the full state-covariance equivalent) once that decision is made. | ||
| """ | ||
| matrix: list[list[float]] = Field(default_factory=list) |
There was a problem hiding this comment.
We gotta use numpy for matrix operations otherwise shit gonna get wicked
| timestamp: datetime | ||
| value: SensorValue | ||
| # measurement noise estimate; feeds the UKF's R matrix..one of the factors that tells UKF whether to trust the sensor or prediction more | ||
| stddev: Optional[float] = None No newline at end of file |
There was a problem hiding this comment.
The stddev should probably exist as a mapping instead of copying the value to every data point. If we have ~100 different sensors and like ~10million sensor readings then we are storing a lot of duplicate values.
henrybednarz
left a comment
There was a problem hiding this comment.
The services and models all look good. Here are my other thoughts which I also had for other peoples tickets:
I think for non-end events it does not make sense to use pydantic models. This is on me for not thinking hard at the beginning. What is happening there is a ton of memory/computation overhead to use python lists for this type of data (especially with matrix operations). So we need to shift to using numpy arrays/pandas. I think we should discuss as a group at the next meeting to decide how we should move forward. The good news is all the work is basically the same just changing it from pydantic to a numpy/pandas df. Good work though the models all look great.
Overview
Added pydantic validation models for data ingestion to the models folder and processing services schemas into the services folder. All files in those folders were added/edited.
Technical Description
We achieved the ticket's asks of defining data models through pydantically validated schemas that:
How Has This Been Tested?
Created tests for each model, in their own files within tests folder. Mainly tests whether a variety of inputs can be handled in the models since no logic has been implemented in the services

Ticket Review
Answer the following: