Kalyan.Banik:

what I want that better say the idea
such a customised inferencefunction that will take a range of time stamp


Based on your description, you could call the complete preprocessing pipeline for these particular time stamps and run the prediction on the input.
The code might need some refactoring e.g. to avoid storing the data first, but it should be doable.
One thing I’m a bit concerned about is the hard-coded test_window.
Do you know, if it needs to have a specific shape, e.g. for preprocessing purposes, or could it be dynamic?
In the former case, your passed time stamps would at least have to be extended to the minimal necessary time window.