项目初次提交
This commit is contained in:
0
apps/business/train/models/__init__.py
Normal file
0
apps/business/train/models/__init__.py
Normal file
24
apps/business/train/models/train.py
Normal file
24
apps/business/train/models/train.py
Normal file
@ -0,0 +1,24 @@
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
from sqlalchemy import String, Integer
|
||||
|
||||
from db.db_base import BaseModel
|
||||
|
||||
|
||||
class ProjectTrain(BaseModel):
|
||||
"""
|
||||
项目训练版本信息表
|
||||
"""
|
||||
__tablename__ = "project_train"
|
||||
__table_args__ = ({'comment': '项目训练版本信息表'})
|
||||
|
||||
project_id: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
train_version: Mapped[str] = mapped_column(String(32), nullable=False)
|
||||
train_url: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
train_data: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
weights_id: Mapped[int] = mapped_column(Integer)
|
||||
weights_name: Mapped[str] = mapped_column(String(32))
|
||||
epochs: Mapped[int] = mapped_column(Integer)
|
||||
patience: Mapped[int] = mapped_column(Integer)
|
||||
best_pt: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
last_pt: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
user_id: Mapped[int] = mapped_column(Integer, nullable=False)
|
Reference in New Issue
Block a user