-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: Added backfill endpoint #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
vishpillai123
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
| from datetime import datetime | ||
| from typing import Annotated, Any, cast | ||
| import jsonpickle | ||
| from fastapi import APIRouter, Depends, HTTPException, status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow this Depends logic is cool
| current_user: Annotated[BaseUser, Depends(get_current_active_user)], | ||
| sql_session: Annotated[Session, Depends(get_session)], | ||
| databricks_control: Annotated[DatabricksControl, Depends(DatabricksControl)], | ||
| ) -> Any: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just add some quick documentation here saying that this will backfill the LATEST model run ID, and to use this endpoint carefully in the future? Maybe we should delete this later.. we'll figure it out.
| mv_version = str(latest_mv.version) | ||
| mv_run_id = str(latest_mv.run_id) | ||
|
|
||
| # UPDATE existing jobs for this model (only those missing values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah so this only updates if it's missing? I like that... it'll prevent someone from messing up the table in the future.
changes
POST /{inst_id}/models/{model_name}/backfill-model-runsto fetch latest UC model version and update jobs with missing fields.context
questions
No questions at this time.