File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 1- from fastapi import APIRouter , HTTPException
2- from pydantic import BaseModel
3- from typing import Dict , Any
4- import logging
5-
6- router = APIRouter ()
7- logger = logging .getLogger (__name__ )
8-
9-
10- class ModelInferJointPayload (BaseModel ):
11- model_name : str
12- data_tag : str = None
13- is_ground_truth : bool = False
14- request : Dict [str , Any ]
15- response : Dict [str , Any ]
16-
17-
18- @router .post ("/data/upload" )
19- async def upload_data (payload : ModelInferJointPayload ):
20- """Upload a batch of model data to TrustyAI."""
21- try :
22- logger .info (f"Received data upload for model: { payload .model_name } " )
23- # TODO: Implement
24- return {"status" : "success" , "message" : "Data uploaded successfully" }
25- except Exception as e :
26- logger .error (f"Error uploading data: { str (e )} " )
27- raise HTTPException (status_code = 500 , detail = f"Error uploading data: { str (e )} " )
281import logging
292import uuid
303from datetime import datetime
You can’t perform that action at this time.
0 commit comments