refactor(ml): drop dead tagger/suggestion settings + columns (#1199)
Hygiene follow-up to the Camie retirement (#1189) — these were left inert to bound that change; nothing reads them now. Migration 0068 drops: - ml_settings: tagger_store_floor, tagger_model_version, suggestion_threshold_ character/general (already dead pre-retirement — scoring uses per-head thresholds), video_min_tag_frames (only the deleted video-prediction aggregator used it). - image_record: tagger_model_version (no writer), centroid_scores (dead JSON cache, no reader). Also: ml_admin _EDITABLE/GET/_validate pruned (dropped the store-floor invariant + video_min_tag_frames check); MLThresholdSliders trimmed to a video-embedding card (interval + max frames only); importer no longer resets the dropped cols; download_models drops the Camie fetch; stale CASCADE comments in cleanup_service no longer name the removed tables. Tests updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
"""drop dead tagger/suggestion settings + columns left after Camie retirement (#1199)
|
||||
|
||||
Hygiene follow-up to #1189. These were left inert to bound that change; nothing
|
||||
reads them now:
|
||||
- ml_settings: tagger_store_floor + tagger_model_version (only the deleted Camie
|
||||
tagger used them), suggestion_threshold_character/general (already dead pre-
|
||||
retirement — scoring uses per-head thresholds), video_min_tag_frames (only the
|
||||
deleted video-prediction aggregator used it).
|
||||
- image_record: tagger_model_version (no writer now), centroid_scores (long-dead
|
||||
JSON cache, no reader).
|
||||
|
||||
Revision ID: 0068
|
||||
Revises: 0067
|
||||
Create Date: 2026-06-30
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0068"
|
||||
down_revision: Union[str, None] = "0067"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.drop_column("ml_settings", "suggestion_threshold_character")
|
||||
op.drop_column("ml_settings", "suggestion_threshold_general")
|
||||
op.drop_column("ml_settings", "tagger_store_floor")
|
||||
op.drop_column("ml_settings", "video_min_tag_frames")
|
||||
op.drop_column("ml_settings", "tagger_model_version")
|
||||
op.drop_column("image_record", "tagger_model_version")
|
||||
op.drop_column("image_record", "centroid_scores")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.add_column(
|
||||
"image_record",
|
||||
sa.Column("centroid_scores", sa.JSON(), nullable=True),
|
||||
)
|
||||
op.add_column(
|
||||
"image_record",
|
||||
sa.Column("tagger_model_version", sa.String(length=128), nullable=True),
|
||||
)
|
||||
op.add_column(
|
||||
"ml_settings",
|
||||
sa.Column(
|
||||
"tagger_model_version", sa.String(length=128), nullable=False,
|
||||
server_default="camie-tagger-v2",
|
||||
),
|
||||
)
|
||||
op.add_column(
|
||||
"ml_settings",
|
||||
sa.Column(
|
||||
"video_min_tag_frames", sa.Integer(), nullable=False,
|
||||
server_default="3",
|
||||
),
|
||||
)
|
||||
op.add_column(
|
||||
"ml_settings",
|
||||
sa.Column(
|
||||
"tagger_store_floor", sa.Float(), nullable=False,
|
||||
server_default="0.7",
|
||||
),
|
||||
)
|
||||
op.add_column(
|
||||
"ml_settings",
|
||||
sa.Column(
|
||||
"suggestion_threshold_general", sa.Float(), nullable=False,
|
||||
server_default="0.7",
|
||||
),
|
||||
)
|
||||
op.add_column(
|
||||
"ml_settings",
|
||||
sa.Column(
|
||||
"suggestion_threshold_character", sa.Float(), nullable=False,
|
||||
server_default="0.7",
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user