It's not at all clear if the HuggingFaceModel class from this library honors the entry_point and source_dir when image_uri is specified. I have tried this with several containers and the only way I can run my custom code/inference.py is by archiving the model and providing the s3 path in model_data=s3_model_uri. Providing the HF_MODEL_ID and inference.py should work but from the logs I can see that's not the case because there is nothing about loading the inference.py or when I make a call to the model my logs are not there but if I archive this model and upload to s3 it works.
This is not documented. It's also not intuitive.
It's not at all clear if the
HuggingFaceModelclass from this library honors theentry_pointandsource_dirwhen image_uri is specified. I have tried this with several containers and the only way I can run my customcode/inference.pyis by archiving the model and providing the s3 path inmodel_data=s3_model_uri. Providing theHF_MODEL_IDandinference.pyshould work but from the logs I can see that's not the case because there is nothing about loading the inference.py or when I make a call to the model my logs are not there but if I archive this model and upload to s3 it works.This is not documented. It's also not intuitive.