In that case you might be interested in the serving module of ClearML - None
Now i can do that by spawning subprocess like this:
app = FastAPI()
@app.post("/create_task")
def create_task(input_data: InputData):
os.system("python main-pipeline.py")
return {
"message": "Task created successfully",
}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
I see. Can you please elaborate on your use case a bit? What are you trying to achieve? Are the servers supposed to be persistent until aborted?
I'm expecting that json post request will spawn a task at clearm server/worker
@<1523701070390366208:profile|CostlyOstrich36>
I'm trying to build a back end app, that receives jsons with inference tasks
it is starting uvicorn server on agent :)
@<1523701070390366208:profile|CostlyOstrich36> thx a lot, i'll check it out right now
@<1736556867255013376:profile|ImpressionableElk3> , What issues are you having exactly? Can you attach logs?