@@ -2680,6 +2680,46 @@ if __name__ == '__main__':
26802680 cv2.imwrite(RESULT_IMAGE_FILE_PATH , img)
26812681```
26822682
2683+ ## Model Monitoring
2684+ ### Create Request Results
2685+ You can integrate the results of model endpoint calls,
2686+ which are targeted for aggregation in model monitoring, from an external source.
2687+
2688+
2689+ ``` python
2690+ from datetime import datetime
2691+ import pytz
2692+ import fastlabel
2693+ client = fastlabel.Client()
2694+
2695+ jst = pytz.timezone(" Asia/Tokyo" )
2696+ dt_jst = datetime(2023 , 5 , 8 , 12 , 10 , 53 , tzinfo = jst)
2697+
2698+ client.create_model_monitoring_request_results(
2699+ name = " model-monitoring-name" , # The name of your model monitoring name
2700+ results = [
2701+ {
2702+ " status" : " success" , # success or failed
2703+ " result" : [
2704+ {
2705+ " annotationIndex" : 0 , # The index of the inference class returned by your model
2706+ " value" : " person" , # The value of the inference class returned by your model
2707+ " points" : [
2708+ 12.98 ,
2709+ 23.84 ,
2710+ 140.83 ,
2711+ 165.82 ,
2712+ ], # [x_min, y_min, x_max,y_max]
2713+ " confidenceScore" : 0.92 , # 0 ~ 1
2714+ }
2715+ ],
2716+ " resultSchema" : " object_detection_base" , # Currently, only 'object_detection_base' can be selected.
2717+ " requestAt" : dt_jst.isoformat(), # The time when your endpoint accepted the request
2718+ }
2719+ ],
2720+ )
2721+ ```
2722+
26832723## API Docs
26842724
26852725Check [ this] ( https://api.fastlabel.ai/docs/ ) for further information.
0 commit comments