b735432d02
Answers "how are videos/all media handled by the GPU worker": a job is per ITEM, but the agent fans a VIDEO into per-frame instances (ffmpeg in the agent, the existing cadence), each stored with a timestamp — so a video becomes a BAG of frame embeddings (fixes the mean-embedding muddle) instead of one washed-out vector. Stills → frame_time NULL; animated GIF/WebP treated like short video. - image_region.frame_time (migration 0061, not yet deployed so folded in): the source frame's seconds for video/animated media; NULL for stills. RegionService passes it through. A whole frame is just kind='frame'. - gpu_job + GpuJobService (migration 0062): the durable work list that keeps the desktop agent HTTP-only — enqueue (dedupes (image,task)) / lease (FOR UPDATE SKIP LOCKED, re-claims expired leases so the queue self-heals) / heartbeat / complete / fail (re-queues until MAX_ATTEMPTS then 'error'). The server enqueues; the agent leases+submits over the web API; Redis/Postgres stay private. Tests: enqueue dedupe, lease-then-skip-when-held, expired-lease reclaim, scoped heartbeat, complete, fail-requeue-then-error. region test now covers frame_time. NEXT: the thin HTTP API (lease/submit/heartbeat) + bearer-token auth, then the agent container + control UI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa
90 lines
2.6 KiB
Python
90 lines
2.6 KiB
Python
"""All ORM models. Import this module to make every model visible to Alembic."""
|
|
|
|
from .app_setting import AppSetting
|
|
from .artist import Artist
|
|
from .artist_visit import ArtistVisit
|
|
from .backup_run import BackupRun
|
|
from .base import Base
|
|
from .credential import Credential
|
|
from .download_event import DownloadEvent
|
|
from .external_link import ExternalLink
|
|
from .gpu_job import GpuJob
|
|
from .head_auto_apply_run import HeadAutoApplyRun
|
|
from .head_metric import HeadMetric
|
|
from .head_metrics_snapshot import HeadMetricsSnapshot
|
|
from .head_training_run import HeadTrainingRun
|
|
from .image_prediction import ImagePrediction
|
|
from .image_provenance import ImageProvenance
|
|
from .image_record import ImageRecord
|
|
from .image_region import ImageRegion
|
|
from .import_batch import ImportBatch
|
|
from .import_settings import ImportSettings
|
|
from .import_task import ImportTask
|
|
from .library_audit_run import LibraryAuditRun
|
|
from .ml_settings import MLSettings
|
|
from .patreon_failed_media import PatreonFailedMedia
|
|
from .patreon_seen_media import PatreonSeenMedia
|
|
from .post import Post
|
|
from .post_attachment import PostAttachment
|
|
from .series_chapter import SeriesChapter
|
|
from .series_page import SeriesPage
|
|
from .series_suggestion import SeriesSuggestion
|
|
from .source import Source
|
|
from .subscribestar_failed_media import SubscribeStarFailedMedia
|
|
from .subscribestar_seen_media import SubscribeStarSeenMedia
|
|
from .tag import Tag, TagKind, image_tag
|
|
from .tag_alias import TagAlias
|
|
from .tag_allowlist import TagAllowlist
|
|
from .tag_eval_run import TagEvalRun
|
|
from .tag_head import TagHead
|
|
from .tag_positive_confirmation import TagPositiveConfirmation
|
|
from .tag_reference_embedding import TagReferenceEmbedding
|
|
from .tag_suggestion_rejection import TagSuggestionRejection
|
|
from .task_run import TaskRun
|
|
|
|
__all__ = [
|
|
"Base",
|
|
"AppSetting",
|
|
"Artist",
|
|
"ArtistVisit",
|
|
"BackupRun",
|
|
"Source",
|
|
"Credential",
|
|
"PatreonFailedMedia",
|
|
"PatreonSeenMedia",
|
|
"SubscribeStarFailedMedia",
|
|
"SubscribeStarSeenMedia",
|
|
"Post",
|
|
"PostAttachment",
|
|
"SeriesChapter",
|
|
"SeriesPage",
|
|
"SeriesSuggestion",
|
|
"ImageRecord",
|
|
"ImagePrediction",
|
|
"ImageProvenance",
|
|
"ImageRegion",
|
|
"Tag",
|
|
"TagKind",
|
|
"image_tag",
|
|
"DownloadEvent",
|
|
"ExternalLink",
|
|
"GpuJob",
|
|
"ImportBatch",
|
|
"ImportTask",
|
|
"ImportSettings",
|
|
"LibraryAuditRun",
|
|
"MLSettings",
|
|
"HeadAutoApplyRun",
|
|
"HeadMetric",
|
|
"HeadMetricsSnapshot",
|
|
"HeadTrainingRun",
|
|
"TagAlias",
|
|
"TagAllowlist",
|
|
"TagEvalRun",
|
|
"TagHead",
|
|
"TagPositiveConfirmation",
|
|
"TagReferenceEmbedding",
|
|
"TagSuggestionRejection",
|
|
"TaskRun",
|
|
]
|