I have registered my ML model using Mlflow in Azure Databricks, and have a model URL.
Now, in another notebook of Databricks, I am preparing data(retrieved from the SQL) and filtering it based on the input parameters fetched as a RestAPI from Postman.
Next, I am using this prepared data frame(max. 20 records) to get the prediction for each row. And, converting this data frame into JSON serializable format to send it as a response to Postman.
The notebook runtime is 2 secs.
Every time a request is got, a databricks job is run, and the response is sent. I am not sure why each job's runtime is 12 secs or more(despite the notebook runtime being 2 secs. only).
What I actually I am looking into is to send a curated response, that'll have some additional parameters along with the prediction, in form of a RestAPI in milliseconds(as it is realtime).
Everything is done in Databricks, itself.
I believe I am somewhere lacking in understanding which architecture shall help us achieve my requirement. Kindly help me understand the same. Thanks a lot, in advance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…