Add basic backend infrastructure
Signed-off-by: Felipe Cardoso <felipe.cardoso@hotmail.it>
This commit is contained in:
0
backend/app/models/__init__.py
Normal file
0
backend/app/models/__init__.py
Normal file
11
backend/app/models/sample.py
Normal file
11
backend/app/models/sample.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Sample(BaseModel):
|
||||
filename: str
|
||||
url: str
|
||||
created_at: datetime
|
||||
step: Optional[int] = None
|
||||
14
backend/app/models/training.py
Normal file
14
backend/app/models/training.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class TrainingStatus(BaseModel):
|
||||
current_step: int
|
||||
total_steps: int
|
||||
loss: float
|
||||
learning_rate: float
|
||||
eta_seconds: Optional[float]
|
||||
steps_per_second: float
|
||||
updated_at: datetime
|
||||
Reference in New Issue
Block a user