01afc2cf69
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 55s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 59s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m38s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 2m26s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 2m35s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m21s
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
- Fix: generation_tasks.py passes clip_ai_tags_by_asset to pick_narrative_assets so AI tags (weight 2.0) actually participate in narrative mode selection - Feat: quality_score auto-computation via AssetAnalyzer on ingest (worker.calculate_asset_price celery task; fallback 50.0 on failure) - Feat: smart_match adds ai_semantic dimension (20% weight) using Jaccard similarity between asset AI tags (scene/objects/action) and script tags - Feat: atom_clip caption (10-30 Chinese chars) via Doubao Vision, saved to asset_atom_clips.caption (Text column, migration 085) - Feat: atom_clip embedding vector via Doubao embeddings API, saved to asset_atom_clips.embedding (JSON column) - Chore: remove dead calculate_quality_score_real wrapper - Tests: 20 new unit tests covering caption parsing, ai_semantic scoring, narrative AI tag propagation, score weight changes; update existing tests for new fallback dict shape and reweighted dimensions - Fail-open: tagging/embedding/quality failures never block main flow
34 lines
885 B
Python
34 lines
885 B
Python
"""asset_atom_clips 新增 caption/embedding 字段(#2035 语义标签增强)
|
|
|
|
Revision ID: 085_atom_clip_caption_embedding
|
|
Revises: 084_lipsync_jobs_style
|
|
Create Date: 2026-09-25
|
|
"""
|
|
|
|
import sqlalchemy as sa
|
|
|
|
from alembic import op
|
|
|
|
revision = "085_atom_clip_caption_embedding"
|
|
down_revision = "084_lipsync_jobs_style"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# caption: 中文画面描述(10-30字)
|
|
op.add_column(
|
|
"asset_atom_clips",
|
|
sa.Column("caption", sa.Text(), nullable=True),
|
|
)
|
|
# embedding: caption 对应的向量(豆包 embedding 接口返回,JSON 存 float 数组)
|
|
op.add_column(
|
|
"asset_atom_clips",
|
|
sa.Column("embedding", sa.JSON(), nullable=True),
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("asset_atom_clips", "embedding")
|
|
op.drop_column("asset_atom_clips", "caption")
|