Right now, we are only using model_map.py to return the model id and training date in the json response. We don't actually use it when we determine which model gets used for inference - right now, that's hardcoded.
The main reason for this is because, unlike the validation models, the tagger models are currently not the proper HuggingFace format for easy loading. In fact, all the individual models are grouped into one HF repo as pth files, which is definitely not the right way to do things and doesn't align with the structure of our model_map.py file.
So to fix this, we need to:
- fix the tagger models to be stored properly on Hugging Face
- change the code for sidewalk-ai-api to use model_map.py when determining which model to use.
Right now, we are only using model_map.py to return the model id and training date in the json response. We don't actually use it when we determine which model gets used for inference - right now, that's hardcoded.
The main reason for this is because, unlike the validation models, the tagger models are currently not the proper HuggingFace format for easy loading. In fact, all the individual models are grouped into one HF repo as pth files, which is definitely not the right way to do things and doesn't align with the structure of our model_map.py file.
So to fix this, we need to: