When we create a model we have multiple places where the original model (onnx) could be downloaded. Currently, these downloads happen again and again as there is no cache or we dont look if we already downloaded it.
Some functions that download a model:
_get_output_dtype: used to get the output type so users do not have to add it into the predict method. This could be potentially executed in each prediction
_download_model: if an output_path is added into the instantiation of the model or agent, the model is downloaded
Prior to download the model we should check if we have the model already downloaded locally.
When we create a model we have multiple places where the original model (onnx) could be downloaded. Currently, these downloads happen again and again as there is no cache or we dont look if we already downloaded it.
Some functions that download a model:
_get_output_dtype
: used to get the output type so users do not have to add it into the predict method. This could be potentially executed in each prediction_download_model
: if anoutput_path
is added into the instantiation of the model or agent, the model is downloadedPrior to download the model we should check if we have the model already downloaded locally.