Created
April 29, 2022 06:24
-
-
Save rtindru/bdc63a2bdef83fc96a010a6a39dcf802 to your computer and use it in GitHub Desktop.
Step 3: Package the model service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) import the custom BentoService defined above | |
from sentiment_analysis_service import SKSentimentAnalysis | |
# 2) `pack` it with required artifacts, i.e. the trained model from step 1 | |
bento_service = SKSentimentAnalysis() | |
bento_service.pack('model', sentiment_lr) | |
# 3) save your BentoSerivce to file archive | |
saved_path = bento_service.save() | |
# 4) Start a REST API model server with the BentoService saved above to serve the model | |
!bentoml serve SKSentimentAnalysis:latest --port=5000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment