diff --git a/src/__pycache__/api.cpython-310.pyc.1312060332016 b/src/__pycache__/api.cpython-310.pyc.1312060332016 new file mode 100644 index 0000000000000000000000000000000000000000..4d2517c8ba8aaf10d8635558c63c4a6f5d55e1b4 Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.1312060332016 differ diff --git a/src/__pycache__/api.cpython-310.pyc.1387326749424 b/src/__pycache__/api.cpython-310.pyc.1387326749424 new file mode 100644 index 0000000000000000000000000000000000000000..c366e5b4291e186928fab98afc3c3a35aaac2791 Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.1387326749424 differ diff --git a/src/__pycache__/api.cpython-310.pyc.1863735400592 b/src/__pycache__/api.cpython-310.pyc.1863735400592 new file mode 100644 index 0000000000000000000000000000000000000000..4d2517c8ba8aaf10d8635558c63c4a6f5d55e1b4 Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.1863735400592 differ diff --git a/src/__pycache__/api.cpython-310.pyc.2042952301296 b/src/__pycache__/api.cpython-310.pyc.2042952301296 new file mode 100644 index 0000000000000000000000000000000000000000..c366e5b4291e186928fab98afc3c3a35aaac2791 Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.2042952301296 differ diff --git a/src/__pycache__/api.cpython-310.pyc.2118868258608 b/src/__pycache__/api.cpython-310.pyc.2118868258608 new file mode 100644 index 0000000000000000000000000000000000000000..7f098ffa2bfe3294d436d8bbfb13469ac48e3019 Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.2118868258608 differ diff --git a/src/__pycache__/api.cpython-310.pyc.2414273968880 b/src/__pycache__/api.cpython-310.pyc.2414273968880 new file mode 100644 index 0000000000000000000000000000000000000000..8bd981c7d32778214052e880fe3719da3fad8ba6 Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.2414273968880 differ diff --git a/src/__pycache__/api.cpython-310.pyc.2611899415280 b/src/__pycache__/api.cpython-310.pyc.2611899415280 new file mode 100644 index 0000000000000000000000000000000000000000..8bd981c7d32778214052e880fe3719da3fad8ba6 Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.2611899415280 differ diff --git a/src/__pycache__/api.cpython-310.pyc.2664711386128 b/src/__pycache__/api.cpython-310.pyc.2664711386128 new file mode 100644 index 0000000000000000000000000000000000000000..7e128e1f06748c33b1055acbf3de4153acd349cc Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.2664711386128 differ diff --git a/src/__pycache__/api.cpython-310.pyc.2822989409584 b/src/__pycache__/api.cpython-310.pyc.2822989409584 new file mode 100644 index 0000000000000000000000000000000000000000..0a321deacc912a51c388276a1054de52077abc66 Binary files /dev/null and b/src/__pycache__/api.cpython-310.pyc.2822989409584 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.1215512962912 b/src/__pycache__/clarification_engine.cpython-310.pyc.1215512962912 new file mode 100644 index 0000000000000000000000000000000000000000..e42c2d836886f8b49e62e18d8b8832bf6268f926 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.1215512962912 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.1310757118256 b/src/__pycache__/clarification_engine.cpython-310.pyc.1310757118256 new file mode 100644 index 0000000000000000000000000000000000000000..10ace6221fb7fdec765e56c8a1712bc44641bcd6 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.1310757118256 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.1388178567600 b/src/__pycache__/clarification_engine.cpython-310.pyc.1388178567600 new file mode 100644 index 0000000000000000000000000000000000000000..31f571d8b3118c2b769953dbc43aeeb80057f131 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.1388178567600 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.1862433857840 b/src/__pycache__/clarification_engine.cpython-310.pyc.1862433857840 new file mode 100644 index 0000000000000000000000000000000000000000..10ace6221fb7fdec765e56c8a1712bc44641bcd6 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.1862433857840 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.2043805888944 b/src/__pycache__/clarification_engine.cpython-310.pyc.2043805888944 new file mode 100644 index 0000000000000000000000000000000000000000..31f571d8b3118c2b769953dbc43aeeb80057f131 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.2043805888944 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.2118868396704 b/src/__pycache__/clarification_engine.cpython-310.pyc.2118868396704 new file mode 100644 index 0000000000000000000000000000000000000000..34f44172377961e9d36653f984d3cfd818db59f6 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.2118868396704 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.2400980363984 b/src/__pycache__/clarification_engine.cpython-310.pyc.2400980363984 new file mode 100644 index 0000000000000000000000000000000000000000..e42c2d836886f8b49e62e18d8b8832bf6268f926 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.2400980363984 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.2415124869552 b/src/__pycache__/clarification_engine.cpython-310.pyc.2415124869552 new file mode 100644 index 0000000000000000000000000000000000000000..31f571d8b3118c2b769953dbc43aeeb80057f131 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.2415124869552 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.2612749922736 b/src/__pycache__/clarification_engine.cpython-310.pyc.2612749922736 new file mode 100644 index 0000000000000000000000000000000000000000..31f571d8b3118c2b769953dbc43aeeb80057f131 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.2612749922736 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.2663643465136 b/src/__pycache__/clarification_engine.cpython-310.pyc.2663643465136 new file mode 100644 index 0000000000000000000000000000000000000000..cd4302921806aef7b42828588695538488193c26 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.2663643465136 differ diff --git a/src/__pycache__/clarification_engine.cpython-310.pyc.2821999857664 b/src/__pycache__/clarification_engine.cpython-310.pyc.2821999857664 new file mode 100644 index 0000000000000000000000000000000000000000..cd4302921806aef7b42828588695538488193c26 Binary files /dev/null and b/src/__pycache__/clarification_engine.cpython-310.pyc.2821999857664 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.1217619394608 b/src/__pycache__/confidence_router.cpython-310.pyc.1217619394608 new file mode 100644 index 0000000000000000000000000000000000000000..78e274520491330f5de5b43cda8d82d63a0ef925 Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.1217619394608 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.1310975221184 b/src/__pycache__/confidence_router.cpython-310.pyc.1310975221184 new file mode 100644 index 0000000000000000000000000000000000000000..99ae6cc2c4449495da0f05a5094b7fc43740536d Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.1310975221184 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.1388182059856 b/src/__pycache__/confidence_router.cpython-310.pyc.1388182059856 new file mode 100644 index 0000000000000000000000000000000000000000..f868899c18e49a79f1a8db0762a869403bd5dd80 Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.1388182059856 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.1862653402560 b/src/__pycache__/confidence_router.cpython-310.pyc.1862653402560 new file mode 100644 index 0000000000000000000000000000000000000000..1880a26bc2570176300e388f3c084f8c747ae85b Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.1862653402560 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.2043809381200 b/src/__pycache__/confidence_router.cpython-310.pyc.2043809381200 new file mode 100644 index 0000000000000000000000000000000000000000..5f9ea8b79b5ad44271f22a96d939ec352d04c660 Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.2043809381200 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.2118868396704 b/src/__pycache__/confidence_router.cpython-310.pyc.2118868396704 new file mode 100644 index 0000000000000000000000000000000000000000..ce34337b677d577450171aee81816079e84377f5 Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.2118868396704 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.2393617538320 b/src/__pycache__/confidence_router.cpython-310.pyc.2393617538320 new file mode 100644 index 0000000000000000000000000000000000000000..6023b88b1915f7c50b05ab1f1348315b8e90959e Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.2393617538320 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.2400957022256 b/src/__pycache__/confidence_router.cpython-310.pyc.2400957022256 new file mode 100644 index 0000000000000000000000000000000000000000..3af94cf25448ac84ca21a89b80e5b1aebb5b01d5 Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.2400957022256 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.2415128361808 b/src/__pycache__/confidence_router.cpython-310.pyc.2415128361808 new file mode 100644 index 0000000000000000000000000000000000000000..5f9ea8b79b5ad44271f22a96d939ec352d04c660 Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.2415128361808 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.2612753414992 b/src/__pycache__/confidence_router.cpython-310.pyc.2612753414992 new file mode 100644 index 0000000000000000000000000000000000000000..5418f3b922c147137602c1649077c946f10f383d Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.2612753414992 differ diff --git a/src/__pycache__/confidence_router.cpython-310.pyc.2822177262560 b/src/__pycache__/confidence_router.cpython-310.pyc.2822177262560 new file mode 100644 index 0000000000000000000000000000000000000000..12af308bb89267c5d913f6918d415b987aaab116 Binary files /dev/null and b/src/__pycache__/confidence_router.cpython-310.pyc.2822177262560 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.1310975061568 b/src/__pycache__/ensemble_router.cpython-310.pyc.1310975061568 new file mode 100644 index 0000000000000000000000000000000000000000..d2eeda4f63dd3539ee73c68823014d65bba2ba0a Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.1310975061568 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.1388182222112 b/src/__pycache__/ensemble_router.cpython-310.pyc.1388182222112 new file mode 100644 index 0000000000000000000000000000000000000000..4f19485b1ff1e92bf50fd6e7d12743d7013fba25 Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.1388182222112 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.1751122201040 b/src/__pycache__/ensemble_router.cpython-310.pyc.1751122201040 new file mode 100644 index 0000000000000000000000000000000000000000..b19b543e172b07ff3a8e1337e14a50b81f988eb0 Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.1751122201040 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.1862653242944 b/src/__pycache__/ensemble_router.cpython-310.pyc.1862653242944 new file mode 100644 index 0000000000000000000000000000000000000000..08e7e1be106f129fa2814e5b536fe920ae057960 Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.1862653242944 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.2043809543456 b/src/__pycache__/ensemble_router.cpython-310.pyc.2043809543456 new file mode 100644 index 0000000000000000000000000000000000000000..ca762ba778f10fc89eece7ce543e03b79e2629ac Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.2043809543456 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.2118868258608 b/src/__pycache__/ensemble_router.cpython-310.pyc.2118868258608 new file mode 100644 index 0000000000000000000000000000000000000000..4d356101f7658fe0576e8dfab679e38d7a4cf0ef Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.2118868258608 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.2133946599536 b/src/__pycache__/ensemble_router.cpython-310.pyc.2133946599536 new file mode 100644 index 0000000000000000000000000000000000000000..78e64cd85dc10c5bfa839b5f473ad31add1c93e0 Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.2133946599536 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.2392941354608 b/src/__pycache__/ensemble_router.cpython-310.pyc.2392941354608 new file mode 100644 index 0000000000000000000000000000000000000000..b19b543e172b07ff3a8e1337e14a50b81f988eb0 Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.2392941354608 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.2415128507680 b/src/__pycache__/ensemble_router.cpython-310.pyc.2415128507680 new file mode 100644 index 0000000000000000000000000000000000000000..ca762ba778f10fc89eece7ce543e03b79e2629ac Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.2415128507680 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.2612753560864 b/src/__pycache__/ensemble_router.cpython-310.pyc.2612753560864 new file mode 100644 index 0000000000000000000000000000000000000000..6f3c1c8b56bf85092c476b2460f19fffa5f1c3a1 Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.2612753560864 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.2663643278560 b/src/__pycache__/ensemble_router.cpython-310.pyc.2663643278560 new file mode 100644 index 0000000000000000000000000000000000000000..1ef70c7fbdb461b104cee745a32ba04fa5a81be9 Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.2663643278560 differ diff --git a/src/__pycache__/ensemble_router.cpython-310.pyc.2822177265552 b/src/__pycache__/ensemble_router.cpython-310.pyc.2822177265552 new file mode 100644 index 0000000000000000000000000000000000000000..b6228b8246e624c5785b6fefe16776121b2036ce Binary files /dev/null and b/src/__pycache__/ensemble_router.cpython-310.pyc.2822177265552 differ diff --git a/src/__pycache__/evaluate.cpython-310.pyc.2118868258608 b/src/__pycache__/evaluate.cpython-310.pyc.2118868258608 new file mode 100644 index 0000000000000000000000000000000000000000..04a1f78fbf59efaad2836ac478bde06c032b8937 Binary files /dev/null and b/src/__pycache__/evaluate.cpython-310.pyc.2118868258608 differ diff --git a/src/__pycache__/evaluate_ood.cpython-310.pyc.2118868258608 b/src/__pycache__/evaluate_ood.cpython-310.pyc.2118868258608 new file mode 100644 index 0000000000000000000000000000000000000000..335a540b1ca026fe990890a4b542c6c0c2f5e6ad Binary files /dev/null and b/src/__pycache__/evaluate_ood.cpython-310.pyc.2118868258608 differ diff --git a/src/__pycache__/export_onnx.cpython-310.pyc.2118868258608 b/src/__pycache__/export_onnx.cpython-310.pyc.2118868258608 new file mode 100644 index 0000000000000000000000000000000000000000..493d530fc9a08152f0a454d9005f03f958f8244a Binary files /dev/null and b/src/__pycache__/export_onnx.cpython-310.pyc.2118868258608 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.1215652159968 b/src/__pycache__/feature_extraction.cpython-310.pyc.1215652159968 new file mode 100644 index 0000000000000000000000000000000000000000..8396e3e313883140263684a86d71e107e29be7d0 Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.1215652159968 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.1311031742992 b/src/__pycache__/feature_extraction.cpython-310.pyc.1311031742992 new file mode 100644 index 0000000000000000000000000000000000000000..1a72cb73be2ecf0cacccf53a805e5668bfaf866a Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.1311031742992 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.1388182214720 b/src/__pycache__/feature_extraction.cpython-310.pyc.1388182214720 new file mode 100644 index 0000000000000000000000000000000000000000..d60689dc45826fca1cf7297908a6b568b513edfb Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.1388182214720 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.1862732894736 b/src/__pycache__/feature_extraction.cpython-310.pyc.1862732894736 new file mode 100644 index 0000000000000000000000000000000000000000..1a72cb73be2ecf0cacccf53a805e5668bfaf866a Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.1862732894736 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.2043809536064 b/src/__pycache__/feature_extraction.cpython-310.pyc.2043809536064 new file mode 100644 index 0000000000000000000000000000000000000000..d60689dc45826fca1cf7297908a6b568b513edfb Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.2043809536064 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.2118868396704 b/src/__pycache__/feature_extraction.cpython-310.pyc.2118868396704 new file mode 100644 index 0000000000000000000000000000000000000000..98470176a3dd4b2731c067be779053e91cc6840c Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.2118868396704 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.2401119314928 b/src/__pycache__/feature_extraction.cpython-310.pyc.2401119314928 new file mode 100644 index 0000000000000000000000000000000000000000..8396e3e313883140263684a86d71e107e29be7d0 Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.2401119314928 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.2415128500288 b/src/__pycache__/feature_extraction.cpython-310.pyc.2415128500288 new file mode 100644 index 0000000000000000000000000000000000000000..d60689dc45826fca1cf7297908a6b568b513edfb Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.2415128500288 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.2612753552416 b/src/__pycache__/feature_extraction.cpython-310.pyc.2612753552416 new file mode 100644 index 0000000000000000000000000000000000000000..d60689dc45826fca1cf7297908a6b568b513edfb Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.2612753552416 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.2663669220432 b/src/__pycache__/feature_extraction.cpython-310.pyc.2663669220432 new file mode 100644 index 0000000000000000000000000000000000000000..606570f5c80a35bdfd208e5d9c8ce8d92a7e261d Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.2663669220432 differ diff --git a/src/__pycache__/feature_extraction.cpython-310.pyc.2822234182160 b/src/__pycache__/feature_extraction.cpython-310.pyc.2822234182160 new file mode 100644 index 0000000000000000000000000000000000000000..606570f5c80a35bdfd208e5d9c8ce8d92a7e261d Binary files /dev/null and b/src/__pycache__/feature_extraction.cpython-310.pyc.2822234182160 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.1311029784656 b/src/__pycache__/sla_predictor.cpython-310.pyc.1311029784656 new file mode 100644 index 0000000000000000000000000000000000000000..3c238b16750a6c6d08d0bcd56a396bcd03d89efb Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.1311029784656 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.1388182428768 b/src/__pycache__/sla_predictor.cpython-310.pyc.1388182428768 new file mode 100644 index 0000000000000000000000000000000000000000..e0cddd4b1f3dc2b01bc2fa71f94322ccdf2943d8 Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.1388182428768 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.1755997945184 b/src/__pycache__/sla_predictor.cpython-310.pyc.1755997945184 new file mode 100644 index 0000000000000000000000000000000000000000..7ca2f9b4724dc34c753d47327b04837fccf0f95c Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.1755997945184 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.1862708047952 b/src/__pycache__/sla_predictor.cpython-310.pyc.1862708047952 new file mode 100644 index 0000000000000000000000000000000000000000..3c238b16750a6c6d08d0bcd56a396bcd03d89efb Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.1862708047952 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.2043809750112 b/src/__pycache__/sla_predictor.cpython-310.pyc.2043809750112 new file mode 100644 index 0000000000000000000000000000000000000000..e0cddd4b1f3dc2b01bc2fa71f94322ccdf2943d8 Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.2043809750112 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.2400957029824 b/src/__pycache__/sla_predictor.cpython-310.pyc.2400957029824 new file mode 100644 index 0000000000000000000000000000000000000000..e3d95c8f7504b4fdae1aef48412d153183a0f44a Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.2400957029824 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.2415128730720 b/src/__pycache__/sla_predictor.cpython-310.pyc.2415128730720 new file mode 100644 index 0000000000000000000000000000000000000000..e0cddd4b1f3dc2b01bc2fa71f94322ccdf2943d8 Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.2415128730720 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.2540038859120 b/src/__pycache__/sla_predictor.cpython-310.pyc.2540038859120 new file mode 100644 index 0000000000000000000000000000000000000000..67b0cfe315865b2e6f6b537834b783b6b8bef0ce Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.2540038859120 differ diff --git a/src/__pycache__/sla_predictor.cpython-310.pyc.2822233272400 b/src/__pycache__/sla_predictor.cpython-310.pyc.2822233272400 new file mode 100644 index 0000000000000000000000000000000000000000..3c238b16750a6c6d08d0bcd56a396bcd03d89efb Binary files /dev/null and b/src/__pycache__/sla_predictor.cpython-310.pyc.2822233272400 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.1310572618912 b/src/__pycache__/ticket_validator.cpython-310.pyc.1310572618912 new file mode 100644 index 0000000000000000000000000000000000000000..dbea4d4a8121fdd83554e428b1764b0ba727b7ad Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.1310572618912 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.1389416968448 b/src/__pycache__/ticket_validator.cpython-310.pyc.1389416968448 new file mode 100644 index 0000000000000000000000000000000000000000..450bfb58055dcb8b130215e695c43811be97b889 Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.1389416968448 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.1863991649440 b/src/__pycache__/ticket_validator.cpython-310.pyc.1863991649440 new file mode 100644 index 0000000000000000000000000000000000000000..dbea4d4a8121fdd83554e428b1764b0ba727b7ad Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.1863991649440 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.2042925150464 b/src/__pycache__/ticket_validator.cpython-310.pyc.2042925150464 new file mode 100644 index 0000000000000000000000000000000000000000..450bfb58055dcb8b130215e695c43811be97b889 Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.2042925150464 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.2118868398272 b/src/__pycache__/ticket_validator.cpython-310.pyc.2118868398272 new file mode 100644 index 0000000000000000000000000000000000000000..523a4e61c8f93fb715023ff80d31e5d289de9dfd Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.2118868398272 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.2414246654208 b/src/__pycache__/ticket_validator.cpython-310.pyc.2414246654208 new file mode 100644 index 0000000000000000000000000000000000000000..450bfb58055dcb8b130215e695c43811be97b889 Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.2414246654208 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.2611872100608 b/src/__pycache__/ticket_validator.cpython-310.pyc.2611872100608 new file mode 100644 index 0000000000000000000000000000000000000000..450bfb58055dcb8b130215e695c43811be97b889 Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.2611872100608 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.2663221393200 b/src/__pycache__/ticket_validator.cpython-310.pyc.2663221393200 new file mode 100644 index 0000000000000000000000000000000000000000..dbea4d4a8121fdd83554e428b1764b0ba727b7ad Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.2663221393200 differ diff --git a/src/__pycache__/ticket_validator.cpython-310.pyc.2823706482576 b/src/__pycache__/ticket_validator.cpython-310.pyc.2823706482576 new file mode 100644 index 0000000000000000000000000000000000000000..dbea4d4a8121fdd83554e428b1764b0ba727b7ad Binary files /dev/null and b/src/__pycache__/ticket_validator.cpython-310.pyc.2823706482576 differ diff --git a/src/__pycache__/train_baseline.cpython-310.pyc.2118868509744 b/src/__pycache__/train_baseline.cpython-310.pyc.2118868509744 new file mode 100644 index 0000000000000000000000000000000000000000..6318d0cc599b6184933813329c4403fc7cf3a6c7 Binary files /dev/null and b/src/__pycache__/train_baseline.cpython-310.pyc.2118868509744 differ diff --git a/src/__pycache__/train_router.cpython-310.pyc.2118868509744 b/src/__pycache__/train_router.cpython-310.pyc.2118868509744 new file mode 100644 index 0000000000000000000000000000000000000000..b925db548771e18cbd3ff4a7e7ee257dea526244 Binary files /dev/null and b/src/__pycache__/train_router.cpython-310.pyc.2118868509744 differ diff --git a/src/__pycache__/train_sla.cpython-310.pyc.2118868509744 b/src/__pycache__/train_sla.cpython-310.pyc.2118868509744 new file mode 100644 index 0000000000000000000000000000000000000000..b674d7d5a4890e975bfa36152c72031f7d9d4031 Binary files /dev/null and b/src/__pycache__/train_sla.cpython-310.pyc.2118868509744 differ diff --git a/src/__pycache__/train_ultimate.cpython-310.pyc.2118868509744 b/src/__pycache__/train_ultimate.cpython-310.pyc.2118868509744 new file mode 100644 index 0000000000000000000000000000000000000000..46b1996c6af7606b4f615f9c7a8e6e2ab1b71c8c Binary files /dev/null and b/src/__pycache__/train_ultimate.cpython-310.pyc.2118868509744 differ diff --git a/src/api.py b/src/api.py index befd6593ac8fd56831e2bc276bc85433b28d039e..d80725a9799bfa6f2da9cb81f41cd85c2d4abf76 100644 --- a/src/api.py +++ b/src/api.py @@ -142,7 +142,8 @@ def startup_event(): get_churn() get_features() get_validator() - get_explainer() + # Explainability can be expensive with transformer models, so keep it lazy. + # The /explain endpoint initializes it only when an explanation is requested. logger.info("All ML models loaded successfully.") def get_router(): diff --git a/src/confidence_router.py b/src/confidence_router.py index 1850d976dbe982b70a8f0c7daf284b5c391846e9..ba405bc97d25fbba525147f4ae492635d2c35d45 100644 --- a/src/confidence_router.py +++ b/src/confidence_router.py @@ -6,6 +6,7 @@ import numpy as np from typing import Dict, Tuple, Optional import os import logging +import importlib.util logger = logging.getLogger(__name__) @@ -17,7 +18,7 @@ AutoTokenizer = None ROUTE_THRESHOLD = 0.85 # Higher threshold for higher quality model CLARIFY_THRESHOLD = 0.60 ENTROPY_MAX = 0.28 -MC_PASSES_CPU = 10 # Sequential passes for memory safety +MC_PASSES_CPU = int(os.getenv('SUPPORTMIND_MC_PASSES', '3')) # CPU demo default MC_PASSES_GPU = 50 # GPU allows for much better sampling CATEGORY_MAP = { @@ -58,6 +59,7 @@ class ConfidenceGatedRouter: def __init__(self, model_path: Optional[str] = None, device: str = 'auto'): self._fallback_mode = False + self.fallback_reason = None force_transformer = os.getenv('SUPPORTMIND_FORCE_TRANSFORMER', '0') == '1' if os.name == 'nt' and not force_transformer: @@ -108,9 +110,11 @@ class ConfidenceGatedRouter: logger.info(f"Device: {self.device}") try: + load_kwargs = {'num_labels': len(CATEGORY_MAP)} + if importlib.util.find_spec('accelerate') is not None: + load_kwargs['low_cpu_mem_usage'] = True self.model = AutoModelForSequenceClassification.from_pretrained( - model_name, num_labels=len(CATEGORY_MAP), - low_cpu_mem_usage=True + model_name, **load_kwargs ).to(self.device) self.tokenizer = AutoTokenizer.from_pretrained(model_name) @@ -134,6 +138,7 @@ class ConfidenceGatedRouter: self.tokenizer = _FallbackTokenizer() self.mc_passes = 1 self._fallback_mode = True + self.fallback_reason = reason logger.warning( "ConfidenceGatedRouter using lightweight fallback. %s", reason, diff --git a/src/ensemble_router.py b/src/ensemble_router.py index 038ee8524b430a6a2f37a7eacad17f2b67bfc1f9..b37ebd9e461f5fc39f4df90e0e19d03a18f743e4 100644 --- a/src/ensemble_router.py +++ b/src/ensemble_router.py @@ -38,7 +38,7 @@ CATEGORY_REVERSE = {v: k for k, v in CATEGORY_MAP.items()} ROUTE_THRESHOLD = 0.82 # ensemble conf >= this → auto-route CLARIFY_THRESHOLD = 0.58 # ensemble conf >= this → ask 1 question ENTROPY_MAX = 0.32 # ensemble entropy <= this → low ambiguity -MC_PASSES = 10 # MC Dropout stochastic passes (sequential for memory) +MC_PASSES = int(os.getenv('SUPPORTMIND_MC_PASSES', '3')) # CPU demo default # ── Ensemble weights ───────────────────────────────────────────────────────── # BERT weight is higher because it generalises better to unseen phrasing. @@ -244,7 +244,11 @@ class EnsembleRouter: from confidence_router import ConfidenceGatedRouter self._bert_router = ConfidenceGatedRouter(self.model_dir, device=device) self._bert_available = not getattr(self._bert_router, '_fallback_mode', False) - self._bert_reason = 'loaded' if self._bert_available else 'confidence_router_fallback' + fallback_reason = getattr(self._bert_router, 'fallback_reason', None) + self._bert_reason = ( + 'loaded' if self._bert_available + else f'confidence_router_fallback: {fallback_reason or "unknown"}' + ) gc.collect() if self._bert_available: logger.info(f"[EnsembleRouter] {self._bert_router.model.config.model_type.upper()} loaded successfully.") diff --git a/src/sla_predictor.py b/src/sla_predictor.py index 8c4d280fe79fd08ba27c3e44f7eb6274f1bca3bb..43de635587fcbf4ccbe36f001c068dd7920146b3 100644 --- a/src/sla_predictor.py +++ b/src/sla_predictor.py @@ -34,26 +34,49 @@ class SLABreachPredictor: "Run train_sla.py to generate it. Using heuristic fallback." ) + @staticmethod + def _heuristic_score(features: dict) -> float: + """Conservative SLA risk prior used to calibrate weak/old model outputs.""" + queue_depth = max(0, float(features.get('agent_queue_depth', 10))) + customer_tier = max(1, min(4, int(features.get('customer_tier', 2)))) + sentiment = float(features.get('sentiment_score', 0)) + similar_hours = max(0, float(features.get('similar_ticket_avg_hrs', 4))) + complexity = max(0, float(features.get('text_complexity_score', 8))) + hour = int(features.get('hour_of_day', 12)) + score = 0.10 + score += min(queue_depth / 50.0, 1.0) * 0.24 + score += ((customer_tier - 1) / 3.0) * 0.16 + score += min(max(-sentiment, 0.0), 1.0) * 0.16 + score += min(max(similar_hours - 4.0, 0.0) / 12.0, 1.0) * 0.12 + score += min(complexity / 20.0, 1.0) * 0.08 - def predict(self, features: dict) -> float: + if features.get('repeat_issue', 0): + score += 0.13 + if features.get('escalated_before', 0): + score += 0.12 + if hour < 6 or hour > 20: + score += 0.05 + + return round(min(max(score, 0.0), 0.98), 4) + + def _model_predict(self, features: dict) -> float: if self.model and HAS_XGBOOST: vec = np.array([[features.get(f, 0) for f in FEATURE_NAMES]]) dm = xgb.DMatrix(vec, feature_names=FEATURE_NAMES) return round(float(self.model.predict(dm)[0]), 4) - # Heuristic fallback - s = 0.3 - s += features.get('agent_queue_depth', 10) * 0.01 - s += features.get('repeat_issue', 0) * 0.15 - s += features.get('escalated_before', 0) * 0.10 - s -= features.get('sentiment_score', 0) * 0.15 - s += max(0, features.get('similar_ticket_avg_hrs', 4) - 4) * 0.03 - if features.get('customer_tier', 2) >= 4: s += 0.10 - h = features.get('hour_of_day', 12) - if h < 6 or h > 20: s += 0.08 - return round(min(max(s, 0.0), 1.0), 4) + return self._heuristic_score(features) + + def predict(self, features: dict) -> float: + model_prob = self._model_predict(features) + heuristic_prob = self._heuristic_score(features) + # SLA is an operational safety signal: if the trained artifact is + # under-confident on obvious risk factors, use the conservative prior. + return round(max(model_prob, heuristic_prob), 4) def explain(self, features: dict) -> dict: + model_prob = self._model_predict(features) + heuristic_prob = self._heuristic_score(features) prob = self.predict(features) risk = 'high' if prob >= 0.7 else 'medium' if prob >= 0.4 else 'low' factors = [] @@ -62,7 +85,13 @@ class SLABreachPredictor: if features.get('repeat_issue', 0): factors.append('Repeat issue') if features.get('escalated_before', 0): factors.append('Previously escalated') if features.get('customer_tier', 1) >= 4: factors.append('Enterprise SLA') + source = 'model' + if heuristic_prob > model_prob: + source = 'heuristic_guardrail' if self.model and HAS_XGBOOST else 'heuristic_fallback' return {'breach_probability': prob, 'risk_level': risk, + 'model_probability': model_prob, + 'heuristic_probability': heuristic_prob, + 'calibration_source': source, 'contributing_factors': factors, 'recommendation': 'Prioritize' if prob >= 0.6 else 'Standard'}