完成线程启动训练并以websocket的方式进行发送shell
This commit is contained in:
@ -81,6 +81,10 @@ class ProjectTrain(DbCommon):
|
||||
__tablename__ = "project_train"
|
||||
project_id: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
train_version: Mapped[str] = mapped_column(String(32), 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)
|
||||
|
||||
|
@ -3,10 +3,20 @@ from pydantic import BaseModel, Field
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class ProjectTrainIn(BaseModel):
|
||||
project_id: Optional[int] = Field(..., description="项目id")
|
||||
weights_id: Optional[int] = Field(None, description="权重文件")
|
||||
epochs: Optional[int] = Field(50, description="训练轮数")
|
||||
patience: Optional[int] = Field(20, description="早停的耐心值")
|
||||
|
||||
|
||||
class ProjectTrainOut(BaseModel):
|
||||
"""项目训练版本信息表"""
|
||||
id: Optional[int] = Field(None, description="训练id")
|
||||
train_version: Optional[str] = Field(None, description="训练版本号")
|
||||
weights_name: Optional[str] = Field(None, description="权重名称")
|
||||
epochs: Optional[int] = Field(None, description="训练轮数")
|
||||
patience: Optional[int] = Field(None, description="早停的耐心值")
|
||||
create_time: Optional[datetime] = Field(None, description="训练时间")
|
||||
|
||||
class Config:
|
||||
|
Reference in New Issue
Block a user