Fix DB issues
This commit is contained in:
@@ -26,6 +26,9 @@ COPY --from=shared /shared /app/shared
|
||||
# Copy application code
|
||||
COPY services/training/ .
|
||||
|
||||
# Copy scripts directory
|
||||
COPY scripts/ /app/scripts/
|
||||
|
||||
# Add shared libraries to Python path
|
||||
ENV PYTHONPATH="/app:/app/shared:${PYTHONPATH:-}"
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
Training Service Models Package
|
||||
|
||||
Import all models to ensure they are registered with SQLAlchemy Base.
|
||||
"""
|
||||
|
||||
# Import all models to register them with the Base metadata
|
||||
from .training import (
|
||||
TrainedModel,
|
||||
ModelTrainingLog,
|
||||
ModelPerformanceMetric,
|
||||
TrainingJobQueue,
|
||||
ModelArtifact,
|
||||
)
|
||||
|
||||
# List all models for easier access
|
||||
__all__ = [
|
||||
"TrainedModel",
|
||||
"ModelTrainingLog",
|
||||
"ModelPerformanceMetric",
|
||||
"TrainingJobQueue",
|
||||
"ModelArtifact",
|
||||
]
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
"""Initial training service tables
|
||||
|
||||
Revision ID: 001_initial_training
|
||||
Revises:
|
||||
Create Date: 2024-01-01 12:00:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '001_initial_training'
|
||||
down_revision: Union[str, None] = None
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# TODO: Add table creation statements for training service
|
||||
# This is a placeholder migration - replace with actual table definitions
|
||||
pass
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# TODO: Add table drop statements for training service
|
||||
pass
|
||||
Reference in New Issue
Block a user