Auto-detect date ranges and compute all granularities.
(request: AutoComputeRequest)
| 140 | |
| 141 | @router.post("/monitoring/auto_compute", tags=["Monitoring"]) |
| 142 | async def auto_compute(request: AutoComputeRequest): |
| 143 | """Auto-detect date ranges and compute all granularities.""" |
| 144 | store = _get_store() |
| 145 | if request.feature_view_name: |
| 146 | fv = store.registry.get_feature_view( |
| 147 | name=request.feature_view_name, project=request.project |
| 148 | ) |
| 149 | assert_permissions(fv, actions=[AuthzedAction.UPDATE]) |
| 150 | |
| 151 | svc = _get_monitoring_service() |
| 152 | |
| 153 | job_id = svc.submit_job( |
| 154 | project=request.project, |
| 155 | job_type="auto_compute", |
| 156 | feature_view_name=request.feature_view_name, |
| 157 | ) |
| 158 | |
| 159 | try: |
| 160 | result = svc.execute_job(job_id) |
| 161 | return {"job_id": job_id, **result} |
| 162 | except Exception as e: |
| 163 | raise HTTPException(status_code=500, detail=str(e)) |
| 164 | |
| 165 | # ------------------------------------------------------------------ # |
| 166 | # Log source: compute from feature serving logs |
nothing calls this directly
no test coverage detected