heatmaps are not generated if a model is swapped out during running
The model will not appear in hydraHeads. The first pass on inference works correctly because the InferenceEngine class will load the model if it is not found in hydra heads. This is not true later on in the predict script where we try to fetch the model again to generate the heat maps. The problematic code is here. The exception is thrown because of modelused=hydraHyeads[str(model_ID)].model throws an AttributeError.
if model_ID>0:
plotType_ID_q="SELECT PlotType_ID FROM Models WHERE ID="+str(model_ID)
#print("PlotType_ID_q: ", plotType_ID_q)
plotType_ID_result=DBConnector.FetchAll(plotType_ID_q)
#print("PlotType_ID_result: ", plotType_ID_result)
try:
plotType_ID=plotType_ID_result[0]['PlotType_ID']
#print(hydraHeads.keys())
#sys.stdout.flush()
modelused=hydraHeads[str(model_ID)].model
print(modelused)
except Exception as e:
print("Exception while fetching model by model ID")
print(e)
pass
Edited by Jeske, Torri