Last active
September 15, 2022 14:34
-
-
Save fclesio/733f03986549f966c0677c7696b6b82a to your computer and use it in GitHub Desktop.
Generic json template for ML APIs for a Text Classification
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
{ | |
"message":"OK", | |
"method":"POST", | |
"status-code":200, | |
"timestamp":"2022-01-01T00:00:00.000000", | |
"url":"http://0.0.0.0:1201/predict", | |
"data":{ | |
"prediction":[ | |
{ | |
"input_text":"Flash crashes is a scenario where the price of stocks plunges but then quickly recovers.", | |
"input_text_post_processed":"flash crash scenario price stock plunge quick recover", | |
"predicted_class":"class_1" | |
} | |
], | |
"prediction_info":[ | |
{ | |
"prediction_id":"9a95ac9c-3017-11ed-a261-0242ac120002", | |
"prediction_timestamp":"1662107128", | |
"client_platform_id":"12", | |
"client_platform_name":"front-end-recommendation-bar", | |
"request_id":"8c9a68dd-3ffa-4cac-b203-73a776a5ac12", | |
"model_id":"e8a55c90-0ba3-46fd-9007-baa66b17057e", | |
"model_name":"teams_text_classifier", | |
"model_version":"0.2.7", | |
"model_description":"Text classifier for soccer teams", | |
"model_url_latest":"s3://project/models/outbound/latest/model.bin", | |
"model_url_version":"s3://project/models/outbound/versions/model_v0_2_7_20220909.bin", | |
"model_sha256":"84ba40b94bcb0c487d4af9f3dafe9188a78327581db09f6467b3f2de9a14afe7", | |
"input_text_char_count":88, | |
"input_text_word_count":15, | |
"input_text_post_processed_char_count":53, | |
"input_text_post_processed_word_count":8, | |
"predict_proba_class_1":0.97, | |
"predict_proba_class_2":0.01, | |
"predict_proba_class_3":0.01, | |
"predict_proba_class_4":0.01, | |
"predict_proba_class_5":0.00 | |
} | |
], | |
"deployment_info":{ | |
"is_experiment":1, | |
"experiment_info":{ | |
"experiment_type":"canary'|'blue_green | a_b | bandit | shadow", | |
"experiment_variant_name":"canary_variant_01", | |
"experiment_annotations":{ | |
"experiment_text":"Model trained doing the direct replacement in the German Umlauts corresponding ä = ae, ö = oe, ü = ue" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment