Compute metrics on-the-fly for an arbitrary date range. Results are returned directly and NOT persisted to the monitoring tables.
(request: ComputeTransientRequest)
| 234 | |
| 235 | @router.post("/monitoring/compute/transient", tags=["Monitoring"]) |
| 236 | async def compute_transient(request: ComputeTransientRequest): |
| 237 | """Compute metrics on-the-fly for an arbitrary date range. Results are |
| 238 | returned directly and NOT persisted to the monitoring tables.""" |
| 239 | store = _get_store() |
| 240 | fv = store.registry.get_feature_view( |
| 241 | name=request.feature_view_name, project=request.project |
| 242 | ) |
| 243 | assert_permissions(fv, actions=[AuthzedAction.DESCRIBE]) |
| 244 | |
| 245 | svc = _get_monitoring_service() |
| 246 | |
| 247 | start_d = date.fromisoformat(request.start_date) if request.start_date else None |
| 248 | end_d = date.fromisoformat(request.end_date) if request.end_date else None |
| 249 | |
| 250 | result = svc.compute_transient( |
| 251 | project=request.project, |
| 252 | feature_view_name=request.feature_view_name, |
| 253 | feature_names=request.feature_names, |
| 254 | start_date=start_d, |
| 255 | end_date=end_d, |
| 256 | ) |
| 257 | return result |
| 258 | |
| 259 | # ------------------------------------------------------------------ # |
| 260 | # Read endpoints |
nothing calls this directly
no test coverage detected