diff --git a/udf/anomaly-detection/poetry.lock b/udf/anomaly-detection/poetry.lock index 2084a2b5..eaa185a4 100644 --- a/udf/anomaly-detection/poetry.lock +++ b/udf/anomaly-detection/poetry.lock @@ -803,119 +803,119 @@ test = ["objgraph", "psutil"] [[package]] name = "grpcio" -version = "1.56.0" +version = "1.56.2" description = "HTTP/2-based RPC framework" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "grpcio-1.56.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:fb34ace11419f1ae321c36ccaa18d81cd3f20728cd191250be42949d6845bb2d"}, - {file = "grpcio-1.56.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:008767c0aed4899e657b50f2e0beacbabccab51359eba547f860e7c55f2be6ba"}, - {file = "grpcio-1.56.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:17f47aeb9be0da5337f9ff33ebb8795899021e6c0741ee68bd69774a7804ca86"}, - {file = "grpcio-1.56.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43c50d810cc26349b093bf2cfe86756ab3e9aba3e7e681d360930c1268e1399a"}, - {file = "grpcio-1.56.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187b8f71bad7d41eea15e0c9812aaa2b87adfb343895fffb704fb040ca731863"}, - {file = "grpcio-1.56.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:881575f240eb5db72ddca4dc5602898c29bc082e0d94599bf20588fb7d1ee6a0"}, - {file = "grpcio-1.56.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c243b158dd7585021d16c50498c4b2ec0a64a6119967440c5ff2d8c89e72330e"}, - {file = "grpcio-1.56.0-cp310-cp310-win32.whl", hash = "sha256:8b3b2c7b5feef90bc9a5fa1c7f97637e55ec3e76460c6d16c3013952ee479cd9"}, - {file = "grpcio-1.56.0-cp310-cp310-win_amd64.whl", hash = "sha256:03a80451530fd3b8b155e0c4480434f6be669daf7ecba56f73ef98f94222ee01"}, - {file = "grpcio-1.56.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:64bd3abcf9fb4a9fa4ede8d0d34686314a7075f62a1502217b227991d9ca4245"}, - {file = "grpcio-1.56.0-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:fdc3a895791af4addbb826808d4c9c35917c59bb5c430d729f44224e51c92d61"}, - {file = "grpcio-1.56.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:4f84a6fd4482e5fe73b297d4874b62a535bc75dc6aec8e9fe0dc88106cd40397"}, - {file = "grpcio-1.56.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:14e70b4dda3183abea94c72d41d5930c333b21f8561c1904a372d80370592ef3"}, - {file = "grpcio-1.56.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b5ce42a5ebe3e04796246ba50357f1813c44a6efe17a37f8dc7a5c470377312"}, - {file = "grpcio-1.56.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:8219f17baf069fe8e42bd8ca0b312b875595e43a70cabf397be4fda488e2f27d"}, - {file = "grpcio-1.56.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:defdd14b518e6e468466f799aaa69db0355bca8d3a5ea75fb912d28ba6f8af31"}, - {file = "grpcio-1.56.0-cp311-cp311-win32.whl", hash = "sha256:50f4daa698835accbbcc60e61e0bc29636c0156ddcafb3891c987e533a0031ba"}, - {file = "grpcio-1.56.0-cp311-cp311-win_amd64.whl", hash = "sha256:59c4e606993a47146fbeaf304b9e78c447f5b9ee5641cae013028c4cca784617"}, - {file = "grpcio-1.56.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:b1f4b6f25a87d80b28dd6d02e87d63fe1577fe6d04a60a17454e3f8077a38279"}, - {file = "grpcio-1.56.0-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:c2148170e01d464d41011a878088444c13413264418b557f0bdcd1bf1b674a0e"}, - {file = "grpcio-1.56.0-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:0409de787ebbf08c9d2bca2bcc7762c1efe72eada164af78b50567a8dfc7253c"}, - {file = "grpcio-1.56.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66f0369d27f4c105cd21059d635860bb2ea81bd593061c45fb64875103f40e4a"}, - {file = "grpcio-1.56.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38fdf5bd0a1c754ce6bf9311a3c2c7ebe56e88b8763593316b69e0e9a56af1de"}, - {file = "grpcio-1.56.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:79d4c5911d12a7aa671e5eb40cbb50a830396525014d2d6f254ea2ba180ce637"}, - {file = "grpcio-1.56.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:5d2fc471668a7222e213f86ef76933b18cdda6a51ea1322034478df8c6519959"}, - {file = "grpcio-1.56.0-cp37-cp37m-win_amd64.whl", hash = "sha256:991224fd485e088d3cb5e34366053691a4848a6b7112b8f5625a411305c26691"}, - {file = "grpcio-1.56.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:c6f36621aabecbaff3e70c4d1d924c76c8e6a7ffec60c331893640a4af0a8037"}, - {file = "grpcio-1.56.0-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:1eadd6de258901929223f422ffed7f8b310c0323324caf59227f9899ea1b1674"}, - {file = "grpcio-1.56.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:72836b5a1d4f508ffbcfe35033d027859cc737972f9dddbe33fb75d687421e2e"}, - {file = "grpcio-1.56.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f92a99ab0c7772fb6859bf2e4f44ad30088d18f7c67b83205297bfb229e0d2cf"}, - {file = "grpcio-1.56.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa08affbf672d051cd3da62303901aeb7042a2c188c03b2c2a2d346fc5e81c14"}, - {file = "grpcio-1.56.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e2db108b4c8e29c145e95b0226973a66d73ae3e3e7fae00329294af4e27f1c42"}, - {file = "grpcio-1.56.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8674fdbd28266d8efbcddacf4ec3643f76fe6376f73283fd63a8374c14b0ef7c"}, - {file = "grpcio-1.56.0-cp38-cp38-win32.whl", hash = "sha256:bd55f743e654fb050c665968d7ec2c33f03578a4bbb163cfce38024775ff54cc"}, - {file = "grpcio-1.56.0-cp38-cp38-win_amd64.whl", hash = "sha256:c63bc5ac6c7e646c296fed9139097ae0f0e63f36f0864d7ce431cce61fe0118a"}, - {file = "grpcio-1.56.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:c0bc9dda550785d23f4f025be614b7faa8d0293e10811f0f8536cf50435b7a30"}, - {file = "grpcio-1.56.0-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:d596408bab632ec7b947761e83ce6b3e7632e26b76d64c239ba66b554b7ee286"}, - {file = "grpcio-1.56.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:76b6e6e1ee9bda32e6e933efd61c512e9a9f377d7c580977f090d1a9c78cca44"}, - {file = "grpcio-1.56.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7beb84ebd0a3f732625124b73969d12b7350c5d9d64ddf81ae739bbc63d5b1ed"}, - {file = "grpcio-1.56.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83ec714bbbe9b9502177c842417fde39f7a267031e01fa3cd83f1ca49688f537"}, - {file = "grpcio-1.56.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4feee75565d1b5ab09cb3a5da672b84ca7f6dd80ee07a50f5537207a9af543a4"}, - {file = "grpcio-1.56.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b4638a796778329cc8e142e4f57c705adb286b3ba64e00b0fa91eeb919611be8"}, - {file = "grpcio-1.56.0-cp39-cp39-win32.whl", hash = "sha256:437af5a7673bca89c4bc0a993382200592d104dd7bf55eddcd141cef91f40bab"}, - {file = "grpcio-1.56.0-cp39-cp39-win_amd64.whl", hash = "sha256:4241a1c2c76e748023c834995cd916570e7180ee478969c2d79a60ce007bc837"}, - {file = "grpcio-1.56.0.tar.gz", hash = "sha256:4c08ee21b3d10315b8dc26f6c13917b20ed574cdbed2d2d80c53d5508fdcc0f2"}, + {file = "grpcio-1.56.2-cp310-cp310-linux_armv7l.whl", hash = "sha256:bf0b9959e673505ee5869950642428046edb91f99942607c2ecf635f8a4b31c9"}, + {file = "grpcio-1.56.2-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:5144feb20fe76e73e60c7d73ec3bf54f320247d1ebe737d10672480371878b48"}, + {file = "grpcio-1.56.2-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:a72797549935c9e0b9bc1def1768c8b5a709538fa6ab0678e671aec47ebfd55e"}, + {file = "grpcio-1.56.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c3f3237a57e42f79f1e560726576aedb3a7ef931f4e3accb84ebf6acc485d316"}, + {file = "grpcio-1.56.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:900bc0096c2ca2d53f2e5cebf98293a7c32f532c4aeb926345e9747452233950"}, + {file = "grpcio-1.56.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:97e0efaebbfd222bcaac2f1735c010c1d3b167112d9d237daebbeedaaccf3d1d"}, + {file = "grpcio-1.56.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c0c85c5cbe8b30a32fa6d802588d55ffabf720e985abe9590c7c886919d875d4"}, + {file = "grpcio-1.56.2-cp310-cp310-win32.whl", hash = "sha256:06e84ad9ae7668a109e970c7411e7992751a116494cba7c4fb877656527f9a57"}, + {file = "grpcio-1.56.2-cp310-cp310-win_amd64.whl", hash = "sha256:10954662f77dc36c9a1fb5cc4a537f746580d6b5734803be1e587252682cda8d"}, + {file = "grpcio-1.56.2-cp311-cp311-linux_armv7l.whl", hash = "sha256:c435f5ce1705de48e08fcbcfaf8aee660d199c90536e3e06f2016af7d6a938dd"}, + {file = "grpcio-1.56.2-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:6108e5933eb8c22cd3646e72d5b54772c29f57482fd4c41a0640aab99eb5071d"}, + {file = "grpcio-1.56.2-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:8391cea5ce72f4a12368afd17799474015d5d3dc00c936a907eb7c7eaaea98a5"}, + {file = "grpcio-1.56.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:750de923b456ca8c0f1354d6befca45d1f3b3a789e76efc16741bd4132752d95"}, + {file = "grpcio-1.56.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fda2783c12f553cdca11c08e5af6eecbd717280dc8fbe28a110897af1c15a88c"}, + {file = "grpcio-1.56.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:9e04d4e4cfafa7c5264e535b5d28e786f0571bea609c3f0aaab13e891e933e9c"}, + {file = "grpcio-1.56.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:89a49cc5ad08a38b6141af17e00d1dd482dc927c7605bc77af457b5a0fca807c"}, + {file = "grpcio-1.56.2-cp311-cp311-win32.whl", hash = "sha256:6a007a541dff984264981fbafeb052bfe361db63578948d857907df9488d8774"}, + {file = "grpcio-1.56.2-cp311-cp311-win_amd64.whl", hash = "sha256:af4063ef2b11b96d949dccbc5a987272f38d55c23c4c01841ea65a517906397f"}, + {file = "grpcio-1.56.2-cp37-cp37m-linux_armv7l.whl", hash = "sha256:a6ff459dac39541e6a2763a4439c4ca6bc9ecb4acc05a99b79246751f9894756"}, + {file = "grpcio-1.56.2-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:f20fd21f7538f8107451156dd1fe203300b79a9ddceba1ee0ac8132521a008ed"}, + {file = "grpcio-1.56.2-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:d1fbad1f9077372b6587ec589c1fc120b417b6c8ad72d3e3cc86bbbd0a3cee93"}, + {file = "grpcio-1.56.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ee26e9dfb3996aff7c870f09dc7ad44a5f6732b8bdb5a5f9905737ac6fd4ef1"}, + {file = "grpcio-1.56.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a4c60abd950d6de3e4f1ddbc318075654d275c29c846ab6a043d6ed2c52e4c8c"}, + {file = "grpcio-1.56.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1c31e52a04e62c8577a7bf772b3e7bed4df9c9e0dd90f92b6ffa07c16cab63c9"}, + {file = "grpcio-1.56.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:345356b307cce5d14355e8e055b4ca5f99bc857c33a3dc1ddbc544fca9cd0475"}, + {file = "grpcio-1.56.2-cp37-cp37m-win_amd64.whl", hash = "sha256:42e63904ee37ae46aa23de50dac8b145b3596f43598fa33fe1098ab2cbda6ff5"}, + {file = "grpcio-1.56.2-cp38-cp38-linux_armv7l.whl", hash = "sha256:7c5ede2e2558f088c49a1ddda19080e4c23fb5d171de80a726b61b567e3766ed"}, + {file = "grpcio-1.56.2-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:33971197c47965cc1d97d78d842163c283e998223b151bab0499b951fd2c0b12"}, + {file = "grpcio-1.56.2-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:d39f5d4af48c138cb146763eda14eb7d8b3ccbbec9fe86fb724cd16e0e914c64"}, + {file = "grpcio-1.56.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ded637176addc1d3eef35331c39acc598bac550d213f0a1bedabfceaa2244c87"}, + {file = "grpcio-1.56.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c90da4b124647547a68cf2f197174ada30c7bb9523cb976665dfd26a9963d328"}, + {file = "grpcio-1.56.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:3ccb621749a81dc7755243665a70ce45536ec413ef5818e013fe8dfbf5aa497b"}, + {file = "grpcio-1.56.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4eb37dd8dd1aa40d601212afa27ca5be255ba792e2e0b24d67b8af5e012cdb7d"}, + {file = "grpcio-1.56.2-cp38-cp38-win32.whl", hash = "sha256:ddb4a6061933bd9332b74eac0da25f17f32afa7145a33a0f9711ad74f924b1b8"}, + {file = "grpcio-1.56.2-cp38-cp38-win_amd64.whl", hash = "sha256:8940d6de7068af018dfa9a959a3510e9b7b543f4c405e88463a1cbaa3b2b379a"}, + {file = "grpcio-1.56.2-cp39-cp39-linux_armv7l.whl", hash = "sha256:51173e8fa6d9a2d85c14426bdee5f5c4a0654fd5fddcc21fe9d09ab0f6eb8b35"}, + {file = "grpcio-1.56.2-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:373b48f210f43327a41e397391715cd11cfce9ded2fe76a5068f9bacf91cc226"}, + {file = "grpcio-1.56.2-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:42a3bbb2bc07aef72a7d97e71aabecaf3e4eb616d39e5211e2cfe3689de860ca"}, + {file = "grpcio-1.56.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5344be476ac37eb9c9ad09c22f4ea193c1316bf074f1daf85bddb1b31fda5116"}, + {file = "grpcio-1.56.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3fa3ab0fb200a2c66493828ed06ccd1a94b12eddbfb985e7fd3e5723ff156c6"}, + {file = "grpcio-1.56.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b975b85d1d5efc36cf8b237c5f3849b64d1ba33d6282f5e991f28751317504a1"}, + {file = "grpcio-1.56.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cbdf2c498e077282cd427cfd88bdce4668019791deef0be8155385ab2ba7837f"}, + {file = "grpcio-1.56.2-cp39-cp39-win32.whl", hash = "sha256:139f66656a762572ae718fa0d1f2dce47c05e9fbf7a16acd704c354405b97df9"}, + {file = "grpcio-1.56.2-cp39-cp39-win_amd64.whl", hash = "sha256:830215173ad45d670140ff99aac3b461f9be9a6b11bee1a17265aaaa746a641a"}, + {file = "grpcio-1.56.2.tar.gz", hash = "sha256:0ff789ae7d8ddd76d2ac02e7d13bfef6fc4928ac01e1dcaa182be51b6bcc0aaa"}, ] [package.extras] -protobuf = ["grpcio-tools (>=1.56.0)"] +protobuf = ["grpcio-tools (>=1.56.2)"] [[package]] name = "grpcio-tools" -version = "1.56.0" +version = "1.56.2" description = "Protobuf code generator for gRPC" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "grpcio-tools-1.56.0.tar.gz", hash = "sha256:39f5877cea514b3da9f2683dfb3ffb45ef47b05f4ff39c287d7d61c5057f48b8"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:cdbae7312e6d132d38ec2c1611b8cafb783e0416cc5c6deae04efde5f16fb190"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:5f5c416b88d76fbdb548cfee0486928748816b700ece6e591006e5b1dc67598f"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:23e2ef1dc6a9bf766f091e2c52a68e54d0aff3548f94562e61fb0ac3874d514a"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8870ab60f8a76b4a7e43184ee03d28112b976d83c43d41cec821f47b3a297da2"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e59ab6c0bf4a8bb975553ad578d4425bd192775ae384f9406d77d31ad00f6efe"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:b309659534b5d930f9ab6d521670c2dd86cb6ef7f47f37f73f96557e2ec13a49"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8115b416ea2cad8a87dc3aadfaf26da684e003c3770b12e7219b462505bb5b85"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-win32.whl", hash = "sha256:e4cb62a521efbca4cb1ad50233aa400574b3daaf6eb26707d661a0afe8191d92"}, - {file = "grpcio_tools-1.56.0-cp310-cp310-win_amd64.whl", hash = "sha256:4d59009ed52220eb2d62f5cefa4e58dec930fb92fab27bb390c4cf1d360ac7e1"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:cd69107705794e815a8b262722c6fea995911cb1dfc1310abf63b476165335d6"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:2d1ee9e13ce135a6ed451b428ef14af131dc7df2551a5344ff4f8aee2d9fab99"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:142530b9fdfabe04f0c7e5dacd45b6c419d39704fa439cc0aabf73ea0d8f916d"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b7a4eb5003a29eecd71707589f93ae7e8fa2e681366a811b3f86695055d8666"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa6d9bdd75d3625dae38372b43696e159c10aa98719b4302b1e94f1ff7878d47"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c43b4fe8c8df4c52d3106bba2cf427f0e46bbebb80e127fbbc3134db0fead7be"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:168940a4a955b6c65da978dbf62e1c36e3a311bb27f649fd201a228e2583a6d4"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-win32.whl", hash = "sha256:3a4b06169493f9454a7f2516c5d41b566d9734e553bbc505f2a7837f7f4a2df1"}, - {file = "grpcio_tools-1.56.0-cp311-cp311-win_amd64.whl", hash = "sha256:1bd361fcc967c21672ba855fc77ea0e7afa51664033a746df96545f84edc4670"}, - {file = "grpcio_tools-1.56.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:7e6bcb194b81e372411494d8ed69fab89aa3452b7275fce4f7917fbe7b04fb72"}, - {file = "grpcio_tools-1.56.0-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:02b23a12b91287ebea14b3685735d1d675e77c3cd365ec1771c3e9afbeba1ec6"}, - {file = "grpcio_tools-1.56.0-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:80d75856f8ec949847386ad2f56a460f21c63bf82ce99ca5b6aa512c0b875fb1"}, - {file = "grpcio_tools-1.56.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9cffff0b4af80285fa49637d69b69d640eb775dc74b23635e4de5faad9e7e744"}, - {file = "grpcio_tools-1.56.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3de6c08b545920a39b31ed13305f946c00b19ac1b13d26119f111b6360f22ccf"}, - {file = "grpcio_tools-1.56.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:128bb13fe9a2681eeb08175f5fbc8e2d8953d7d0dd240e96f9244b9d2547a1aa"}, - {file = "grpcio_tools-1.56.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:b57f7f01eafbfe3a293f2efffb675774dbe4074c4627975ec4dc4aa5766801fb"}, - {file = "grpcio_tools-1.56.0-cp37-cp37m-win_amd64.whl", hash = "sha256:282176066fb082ad21c403b84f9d6b440a20482e6f52b83bb2adf54d6fdcae9f"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:d9b8d1c42854d3433c058795f52b1418b53dd8c1e9811fecb1312202e803a2c5"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:accf713f51da74b1a18aa4b31df0ab135510704661f735a938081777b79a4c25"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:ac33fd2d02d24101ea389be8e05b928acb58be56403d4ebc3aecfab473fa4a25"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4acdc7b957abfd76581717f0ac8e4408e0a85b7d0ac8d2cdf4d964f16926b897"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79291bfb1fe5f21d99f4839f43d3c5d44c5402c830a24dbb2811d785dd21264b"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:0a8767e4de0f573c678313c5de075ac0e163a192bb135018e45015a22f234387"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:96fe2f7f5805d88cb7f2e3e3502550b2883dfab0f9efcf3cbd444942cf2ee1da"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-win32.whl", hash = "sha256:21cf32ccffd4f1800b0dcdf58aa1fc7f626795c9da784c3d817c944edcf2d3ae"}, - {file = "grpcio_tools-1.56.0-cp38-cp38-win_amd64.whl", hash = "sha256:f3ab1a9fad636302f7307d143f64a9fbd11bc041652bf53bb016006e9a5ca820"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:8989d363ac1996238fee61c8f5663f15a8fc362cb1e758c4a686b76cb457cd70"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:11cdd9cbf0c09c3a761c6f59dfd7128104be7cd393334efe386d4fc3f990ee1a"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:5fd4c005a4afec16578849bc522ddf3298d6d499b3d37bf51314b086c714cdd5"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f7302acaa07cf4966c926fcd6a60c8d30a697f730c38168bf83e1519b464115b"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c1c43d185ebf904c3deec23c36ca2ba4e95db999cf00fc8f85eda4551622a26"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b12bb8c1d408ae40e4c806a3a8ebda2d107310e46696e1da13d0dc3f91fbd19d"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:781cf09e4d5c9288708f6ec9c3eae64d9d5a0f4c46c7ebe70ebb7ab4f6384789"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-win32.whl", hash = "sha256:c62f07452dee3f1ed23aeaef821797c5e516f79535e97fe6a6b0a0ee8db1cc91"}, - {file = "grpcio_tools-1.56.0-cp39-cp39-win_amd64.whl", hash = "sha256:7f063443870650e55012fdb3a58ff4ce5f4042b81dad6b749333ee8146157511"}, + {file = "grpcio-tools-1.56.2.tar.gz", hash = "sha256:82af2f4040084141a732f0ef1ecf3f14fdf629923d74d850415e4d09a077e77a"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-linux_armv7l.whl", hash = "sha256:42272376e9a5a1c631863cda056c143c98d21e5b670db5c8c5b7ed0ba3a1a6eb"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:a8735d7aa34be99dddfbd476eff6005e684bb2c893c0f62a5811528b84c5b371"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:68ef3aa7509e5e7a6e7c0ecc183e28118e73da4bef0fc77079648601ce35e58f"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:380985b8d95ea2469e103945bd83a815d1213e370f580631fdd5a3dbaa17e446"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bfb375eb4f1946d68b8bc7b963c756defa31aa573a35c152a7233d06c0ad6ad"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:13388a22fcba9a1a87f217130a1a01365716af74bd5d0a8a54fc383b8e048ef2"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7a26160bc0ea5b464715789d4d2a66f01816271677673d65da39bac65b9ea838"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-win32.whl", hash = "sha256:ff16dd0b086e75f574dbc122e018a44dbd1c6dae3f3621ea99e8e5a6b2706e12"}, + {file = "grpcio_tools-1.56.2-cp310-cp310-win_amd64.whl", hash = "sha256:2037109c1ce253a8e013c9e3ad3722e887d28a1807acdeb1a51b295c8200137b"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-linux_armv7l.whl", hash = "sha256:6dc43300189a69807857c52a3d782e9d3bbfb1cb72dcb27b4043c25161919601"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:e7009623635ebcd3dd7fe974883fc2d9a3ff0fcef419bfc0a2da8071b372d9f5"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:c7ca2272022f90b73efe900244aaebe9dd7cf3b379e99e08a88984e2fdd229c2"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:493775d17ea09cea6047ba81e4d3f0eb82e34d2fbd3b96e43f72b44ce74726ee"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41af279cf5359b123138236c0980440f4cb4d3d18f03b5c1c314cc1512048351"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:857d72e991d449ec4d2f8337e5e24ddf77b4539965f5cabc84d4b63585832982"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c0640728d63c9fa56e9a1679943ae4e33ad43a10802dd7a93255870731f44d07"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-win32.whl", hash = "sha256:355204d1b33c7a19e7d69afda411e6595d39ba1e9cbf561770ac1d5403296554"}, + {file = "grpcio_tools-1.56.2-cp311-cp311-win_amd64.whl", hash = "sha256:ea5d108d28b4cd2e28539241c6aee96bda83086d8888c36785d9f84ea690d896"}, + {file = "grpcio_tools-1.56.2-cp37-cp37m-linux_armv7l.whl", hash = "sha256:28444615b7a76b3d9267f81d1487fcad21a581d00564164d9e25ccc28635a811"}, + {file = "grpcio_tools-1.56.2-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:45d8b5ad6716848d5b68d9cee29a1a9c5c4baa1824ec5b92d9e35acedddba076"}, + {file = "grpcio_tools-1.56.2-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:31d1183d28ffc8da242333cb9f683f5093941da80dd5281db0fa93077aecb518"}, + {file = "grpcio_tools-1.56.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0059dfc9bea8f7bca69c15ca62c88904c4f907fde1137e0743b5eee054661873"}, + {file = "grpcio_tools-1.56.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24fc857252181c9950ed2d8cee3df5bd0f42861c4ad0db2a57400186827f96e5"}, + {file = "grpcio_tools-1.56.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3a74a5e4fc8121a51401665f96f9a70aee50a2f1221e4a199e67b3b8f55881e8"}, + {file = "grpcio_tools-1.56.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:bec47db5d8b5c3b2a44afdbc3f3bf306e34279289a206d20222824381ca3cb13"}, + {file = "grpcio_tools-1.56.2-cp37-cp37m-win_amd64.whl", hash = "sha256:c0dbaac63a25c088f864295f394230eeb7be48dac2264433fda2603f86c36b25"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-linux_armv7l.whl", hash = "sha256:0a4f9cce5a16613b6d3123c89f9d50e0d13b466799af17bc723dc7d2901a54e4"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:ea5fc1b49514b44a3e5a45156c025002f172ade4c509e58c51967865c7c6fa45"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:54da410124547bacb97a54546c1a95f1af0125e48edc8b5679412ef8b2844f81"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5223668649172d879ee780253b8e4a79144c56a3cc1bb021847f583508c2b0be"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:483256d5f5be6a77b24d8a5f06ca152d1571c62bf5c738834da61107c7563afe"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1f334718eb796799bfadbac5567456fb745cee8c7b438c93b74d1ce676c6ad07"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:26751f69cbbc8ea19cf0657b7d109a6db7df81f80caf16380ebcd20eea27652c"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-win32.whl", hash = "sha256:4056ff13e30813d42a30ce1cdfeaeb6bbee915515c161c1df896dac3143ae643"}, + {file = "grpcio_tools-1.56.2-cp38-cp38-win_amd64.whl", hash = "sha256:878b9269ceb0dd934b61697a9dd9a5c3e9552521e8f46ab32cf4d72a223f7b6c"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-linux_armv7l.whl", hash = "sha256:216e86d3a6ccc31b27fa4c12491981a0a39d4787d2358b6df05baffa40084494"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:778224fcbc1cc7eaf222ce94676afbac8d72b4f84cf4239e30b01d2450a46126"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:14120fb2c6f7894fac5b689934368c692ec50f50a320e8073277ab7778fd612f"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:014da3ed176beb2b1c8430ccc34c8fe962cdd5480e56fb4ab9de60e60c315f3f"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8febb4f90b8fab3179f5bdaa159f1d2a20523ea17ec0d66bdec7732f9532de91"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:ffae7df3318266614f7aa440acb2098c064b6b5ae061fc22125092386349e526"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7d86e24eb6e3973c55e9c74412ff755d1b9d15518c4eaf95676acff49d0162a2"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-win32.whl", hash = "sha256:506d00a86950adf4017395551a4547c0b7fcefa90e4c220135fc3e34e31be81b"}, + {file = "grpcio_tools-1.56.2-cp39-cp39-win_amd64.whl", hash = "sha256:8da04f033b8f4c597e8fc990e2f626bad2b269227bdd554592ea618f624f1aa9"}, ] [package.dependencies] -grpcio = ">=1.56.0" +grpcio = ">=1.56.2" protobuf = ">=4.21.6,<5.0dev" setuptools = "*" diff --git a/udf/anomaly-detection/src/_config.py b/udf/anomaly-detection/src/_config.py index a105ea26..30c4ade7 100644 --- a/udf/anomaly-detection/src/_config.py +++ b/udf/anomaly-detection/src/_config.py @@ -36,7 +36,7 @@ class DataSource(str, Enum): @dataclass class StreamConf: - name: str = "default" + config_id: str = "default" source: str = DataSource.PROMETHEUS.value window_size: int = 12 composite_keys: List[str] = field(default_factory=list) diff --git a/udf/anomaly-detection/src/connectors/sentinel.py b/udf/anomaly-detection/src/connectors/sentinel.py index 062b5395..83ad81aa 100644 --- a/udf/anomaly-detection/src/connectors/sentinel.py +++ b/udf/anomaly-detection/src/connectors/sentinel.py @@ -73,7 +73,7 @@ def get_redis_client( else: SENTINEL_CLIENT = sentinel.slave_for(mastername) _LOGGER.info( - "Sentinel redis params: %S, master_node: %s",conn_kwargs,master_node) + "Sentinel redis params: %s, master_node: %s", conn_kwargs, master_node) return SENTINEL_CLIENT diff --git a/udf/anomaly-detection/src/entities.py b/udf/anomaly-detection/src/entities.py index da25cc52..865a5dcb 100644 --- a/udf/anomaly-detection/src/entities.py +++ b/udf/anomaly-detection/src/entities.py @@ -51,6 +51,7 @@ def to_json(self): @dataclass(repr=False) class StreamPayload(_BasePayload): + config_id: str data: Matrix raw_data: Matrix metrics: List[str] @@ -102,6 +103,8 @@ def to_json(self): @dataclass class InputPayload: + uuid: str + config_id: str start_time: int end_time: int data: list[dict[str, Any]] @@ -113,6 +116,8 @@ def to_json(self): @dataclass class OutputPayload: + uuid: str + config_id: str timestamp: int unified_anomaly: float data: dict[str, Any] diff --git a/udf/anomaly-detection/src/udf/inference.py b/udf/anomaly-detection/src/udf/inference.py index ec37dd01..23de712f 100644 --- a/udf/anomaly-detection/src/udf/inference.py +++ b/udf/anomaly-detection/src/udf/inference.py @@ -37,7 +37,7 @@ def _run_inference( artifact_data: ArtifactData, ) -> np.ndarray: model = artifact_data.artifact - win_size = ConfigManager.get_stream_config(config_name=keys[0]).window_size + win_size = ConfigManager.get_stream_config(config_id=payload.config_id).window_size data_arr = payload.get_data() stream_loader = DataLoader(StreamingDataset(data_arr, win_size)) @@ -71,8 +71,8 @@ def inference( return static_response # Load config - retrain_config = ConfigManager.get_retrain_config(config_name=keys[0]) - numalogic_conf = ConfigManager.get_numalogic_config(config_name=keys[0]) + retrain_config = ConfigManager.get_retrain_config(config_id=payload.config_id) + numalogic_conf = ConfigManager.get_numalogic_config(config_id=payload.config_id) # Load inference artifact try: diff --git a/udf/anomaly-detection/src/udf/postprocess.py b/udf/anomaly-detection/src/udf/postprocess.py index 3c3b75ae..144f8229 100644 --- a/udf/anomaly-detection/src/udf/postprocess.py +++ b/udf/anomaly-detection/src/udf/postprocess.py @@ -16,8 +16,8 @@ class Postprocess: @classmethod def postprocess(cls, keys: list[str], payload: StreamPayload) -> (float, dict): - static_thresh = ConfigManager.get_static_threshold_config(config_name=keys[0]) - postprocess_conf = ConfigManager.get_postprocess_config(config_name=keys[0]) + static_thresh = ConfigManager.get_static_threshold_config(config_id=payload.config_id) + postprocess_conf = ConfigManager.get_postprocess_config(config_id=payload.config_id) # Compute static threshold score if header is static inference metric_arr = payload.get_data() @@ -49,13 +49,13 @@ def postprocess(cls, keys: list[str], payload: StreamPayload) -> (float, dict): for i in range(len(payload.metrics)): metric_scores[payload.metrics[i]] = final_score[i] - return cls.get_unified_anomaly(keys, final_score.tolist(), payload), metric_scores + return cls.get_unified_anomaly(final_score.tolist(), payload), metric_scores @classmethod def get_unified_anomaly( - cls, keys: List[str], scores: list[float], payload: StreamPayload + cls, scores: list[float], payload: StreamPayload ) -> float: - unified_config = ConfigManager.get_stream_config(config_name=keys[0]).unified_config + unified_config = ConfigManager.get_stream_config(config_id=payload.config_id).unified_config unified_weights = unified_config.weights if unified_weights: weighted_anomalies = np.multiply(scores, unified_weights) @@ -91,11 +91,18 @@ def run(self, keys: List[str], datum: Datum) -> Messages: # Perform postprocess final_score, metric_scores = self.postprocess(keys, payload) + stream_conf = ConfigManager.get_stream_config(config_id=payload.config_id) + metadata = payload.metadata + metadata["composite_keys"] = list(stream_conf.composite_keys) + + # Construct output payload out_payload = OutputPayload( + uuid=payload.uuid, + config_id=payload.config_id, timestamp=payload.timestamps[-1], unified_anomaly=final_score, data=metric_scores, - metadata=payload.metadata, + metadata=metadata, ) _LOGGER.info("%s - Sending Msg: { Keys: %s, Payload: %s }", payload.uuid, keys, out_payload) diff --git a/udf/anomaly-detection/src/udf/preprocess.py b/udf/anomaly-detection/src/udf/preprocess.py index 04d3a609..33ef96de 100644 --- a/udf/anomaly-detection/src/udf/preprocess.py +++ b/udf/anomaly-detection/src/udf/preprocess.py @@ -1,7 +1,6 @@ import json import os import time -import uuid import numpy as np import pandas as pd @@ -48,7 +47,7 @@ def get_df(cls, data_payload: dict, features: List[str]) -> (pd.DataFrame, List[ def preprocess( self, keys: List[str], payload: StreamPayload ) -> (np.ndarray, Status): - preprocess_cfgs = ConfigManager.get_preprocess_config(config_name=keys[0]) + preprocess_cfgs = ConfigManager.get_preprocess_config(config_id=keys[0]) local_cache = LocalLRUCache(ttl=LOCAL_CACHE_TTL) model_registry = RedisRegistry(client=get_redis_client_from_conf(master_node=False), cache_registry=local_cache) @@ -95,25 +94,25 @@ def run(self, keys: List[str], datum: Datum) -> Messages: _start_time = time.perf_counter() _ = datum.event_time _ = datum.watermark - _uuid = uuid.uuid4().hex - _LOGGER.info("%s - Received Msg: { Keys: %s, Value: %s }", _uuid, keys, datum.value) + _LOGGER.info("Received Msg: { Keys: %s, Value: %s }", keys, datum.value) messages = Messages() try: data_payload = json.loads(datum.value) - _LOGGER.info("%s - Data payload: %s", _uuid, data_payload) + _LOGGER.info("%s - Data payload: %s", data_payload["uuid"], data_payload) except Exception as e: _LOGGER.error("%s - Error while reading input json %r", e) messages.append(Message.to_drop()) return messages # Load config - stream_conf = ConfigManager.get_stream_config(config_name=keys[0]) + stream_conf = ConfigManager.get_stream_config(config_id=data_payload["config_id"]) raw_df, timestamps = self.get_df(data_payload, stream_conf.metrics) # Prepare payload for forwarding payload = StreamPayload( - uuid=_uuid, + uuid=data_payload["uuid"], + config_id=data_payload["config_id"], composite_keys=keys, data=np.asarray(raw_df.values.tolist()), raw_data=np.asarray(raw_df.values.tolist()), diff --git a/udf/anomaly-detection/src/udf/threshold.py b/udf/anomaly-detection/src/udf/threshold.py index 51ccadb7..76de02de 100644 --- a/udf/anomaly-detection/src/udf/threshold.py +++ b/udf/anomaly-detection/src/udf/threshold.py @@ -32,8 +32,8 @@ def threshold( metric_arr = payload.get_data() # Load config - static_thresh = ConfigManager.get_static_threshold_config(config_name=keys[0]) - thresh_cfg = ConfigManager.get_threshold_config(config_name=keys[0]) + static_thresh = ConfigManager.get_static_threshold_config(config_id=payload.config_id) + thresh_cfg = ConfigManager.get_threshold_config(config_id=payload.config_id) # Check if metric needs static inference if payload.header == Header.STATIC_INFERENCE: diff --git a/udf/anomaly-detection/src/udsink/train.py b/udf/anomaly-detection/src/udsink/train.py index 732034ee..238df654 100644 --- a/udf/anomaly-detection/src/udsink/train.py +++ b/udf/anomaly-detection/src/udsink/train.py @@ -1,7 +1,5 @@ import os import time - -import numpy as np import orjson import pandas as pd from typing import List, Iterator @@ -70,7 +68,7 @@ def fetch_druid_data(cls, payload: TrainerPayload) -> pd.DataFrame: return data_fetcher.fetch_data( datasource=fetcher_conf.datasource, filter_keys=stream_config.composite_keys, - filter_values=payload.composite_keys[1:], # skip config name and add metric name + filter_values=payload.composite_keys, dimensions=OmegaConf.to_container(fetcher_conf.dimensions), granularity=fetcher_conf.granularity, aggregations=OmegaConf.to_container(fetcher_conf.aggregations), diff --git a/udf/anomaly-detection/src/watcher.py b/udf/anomaly-detection/src/watcher.py index 9ff68eb2..536119b5 100644 --- a/udf/anomaly-detection/src/watcher.py +++ b/udf/anomaly-detection/src/watcher.py @@ -47,9 +47,9 @@ def update_configs(cls): cls.config["user_configs"] = dict() for _config in user_configs: - cls.config["user_configs"][_config.name] = _config + cls.config["user_configs"][_config.config_id] = _config - cls.config["default_configs"] = dict(map(lambda c: (c.name, c), default_configs)) + cls.config["default_configs"] = dict(map(lambda c: (c.config_id, c), default_configs)) cls.config["default_numalogic"] = default_numalogic cls.config["pipeline_config"] = pipeline_config @@ -57,19 +57,19 @@ def update_configs(cls): return cls.config @classmethod - def get_stream_config(cls, config_name: str) -> StreamConf: + def get_stream_config(cls, config_id: str) -> StreamConf: if not cls.config: cls.update_configs() stream_conf = None # search and load from user configs - if config_name in cls.config["user_configs"]: - stream_conf = cls.config["user_configs"][config_name] + if config_id in cls.config["user_configs"]: + stream_conf = cls.config["user_configs"][config_id] # if not search and load from default configs - if not stream_conf and config_name in cls.config["default_configs"]: - stream_conf = cls.config["default_configs"][config_name] + if not stream_conf and config_id in cls.config["default_configs"]: + stream_conf = cls.config["default_configs"][config_id] # if not in default configs, initialize conf with default values if not stream_conf: @@ -82,8 +82,8 @@ def get_stream_config(cls, config_name: str) -> StreamConf: return stream_conf @classmethod - def get_unified_config(cls, config_name: str) -> UnifiedConf: - stream_conf = cls.get_stream_config(config_name) + def get_unified_config(cls, config_id: str) -> UnifiedConf: + stream_conf = cls.get_stream_config(config_id) return stream_conf.unified_config @classmethod @@ -105,32 +105,32 @@ def get_druid_config(cls) -> Optional[DruidConf]: return None @classmethod - def get_numalogic_config(cls, config_name: str): - return cls.get_stream_config(config_name=config_name).numalogic_conf + def get_numalogic_config(cls, config_id: str): + return cls.get_stream_config(config_id=config_id).numalogic_conf @classmethod - def get_preprocess_config(cls, config_name: str): - return cls.get_numalogic_config(config_name=config_name).preprocess + def get_preprocess_config(cls, config_id: str): + return cls.get_numalogic_config(config_id=config_id).preprocess @classmethod - def get_retrain_config(cls, config_name: str, ): - return cls.get_stream_config(config_name=config_name).retrain_conf + def get_retrain_config(cls, config_id: str, ): + return cls.get_stream_config(config_id=config_id).retrain_conf @classmethod - def get_static_threshold_config(cls, config_name: str): - return cls.get_stream_config(config_name=config_name).static_threshold + def get_static_threshold_config(cls, config_id: str): + return cls.get_stream_config(config_id=config_id).static_threshold @classmethod - def get_threshold_config(cls, config_name: str): - return cls.get_stream_config(config_name=config_name).numalogic_conf.threshold + def get_threshold_config(cls, config_id: str): + return cls.get_stream_config(config_id=config_id).numalogic_conf.threshold @classmethod - def get_postprocess_config(cls, config_name: str): - return cls.get_numalogic_config(config_name=config_name).postprocess + def get_postprocess_config(cls, config_id: str): + return cls.get_numalogic_config(config_id=config_id).postprocess @classmethod - def get_trainer_config(cls, config_name: str): - return cls.get_numalogic_config(config_name=config_name).trainer + def get_trainer_config(cls, config_id: str): + return cls.get_numalogic_config(config_id=config_id).trainer class ConfigHandler(FileSystemEventHandler): diff --git a/udf/anomaly-detection/tests/resources/configs/default_config.yaml b/udf/anomaly-detection/tests/resources/configs/default_config.yaml index 2e36c419..f1f45e47 100644 --- a/udf/anomaly-detection/tests/resources/configs/default_config.yaml +++ b/udf/anomaly-detection/tests/resources/configs/default_config.yaml @@ -1,33 +1,22 @@ configs: - - name: "fciAsset" + - config_id: "druid-config" source: "druid" composite_keys: [ "assetId" ] metrics: [ "failed" , "degraded" ] + static_threshold: + weight: [ 0.7,0.3 ] + upper_limit: [ 3, 3 ] druid_fetcher: dimensions: [ "ciStatus" ] - datasource: "tech-ip-customer-interaction-metrics" + datasource: "druid-metrics-table-name" group_by: [ "timestamp", "ciStatus" ] pivot: columns: - "ciStatus" - static_threshold: - weight: [ 0.7,0.3 ] - upper_limit: [ 3, 3 ] - - name: "service-mesh" - composite_keys: [ "destination_asset_id" ] + - config_id: "prometheus-config" + source: "prometheus" + composite_keys: [ "namespace", "name", "rollout_pod_template_hash" ] metrics: [ "error_rate" , "error_count" ] static_threshold: weight: [ 0.7,0.3 ] - upper_limit: [ 3, 3 ] - - name: "service-mesh-s2s" - composite_keys: ["source_asset_id, destination_asset_id"] - metrics: [ "error_rate", "error_count" ] - static_threshold: - weight: [ 0.7,0.3 ] - upper_limit: [ 3, 3 ] - - name: "argo-rollouts" - composite_keys: [ "namespace", "name", "app", "rollouts_pod_template_hash" ] - metrics: [ "namespace_app_rollouts_http_request_error_rate"] - static_threshold: - weight: [0.7] - upper_limit: [3] \ No newline at end of file + upper_limit: [ 3, 3 ] \ No newline at end of file diff --git a/udf/anomaly-detection/tests/resources/configs/users_config.yaml b/udf/anomaly-detection/tests/resources/configs/users_config.yaml index ab9190c7..73436933 100644 --- a/udf/anomaly-detection/tests/resources/configs/users_config.yaml +++ b/udf/anomaly-detection/tests/resources/configs/users_config.yaml @@ -1,19 +1,22 @@ configs: - - name: "sandbox_numalogic_demo1" - composite_keys: [ "namespace", "name", "hash_id" ] - metrics: ["rollout_error_rate"] + - config_id: "app1-config" + source: "prometheus" + composite_keys: [ "namespace", "name", "rollout_pod_template_hash" ] + metrics: ["error_rate"] static_threshold: weight: [0.6] upper_limit: [3] - - name: "sandbox_numalogic_demo2" - composite_keys: [ "namespace", "name", "hash_id" ] - metrics: ["rollout_error_rate"] + - config_id: "app2-config" + source: "prometheus" + composite_keys: [ "namespace", "name", "rollout_pod_template_hash" ] + metrics: ["error_rate", "error_count"] static_threshold: weight: [0.7, 0.3] upper_limit: [3, 3] unified_config: weights: [0.7, 0.3] - - name: "sandbox_numalogic_demo3" + - config_id: "app2-config" + source: "prometheus" metrics: ["namespace_app_rollouts_http_request_error_rate", "namespace_app_rollouts_http_request_latency"] composite_keys: [ "namespace", "name", "app", "rollouts_pod_template_hash" ] static_threshold: diff --git a/udf/anomaly-detection/tests/resources/data/stream.json b/udf/anomaly-detection/tests/resources/data/stream.json index 4fcaa24a..149d60b5 100644 --- a/udf/anomaly-detection/tests/resources/data/stream.json +++ b/udf/anomaly-detection/tests/resources/data/stream.json @@ -1,43 +1,59 @@ { + "uuid": "1234567890", + "config_id": "druid-config", + "start_time": "1684472580000", + "end_time": "1684473300000", "data": [ { "timestamp": "1684472580000", "error_rate": "56.97", - "error_count": "10" + "error_count": "10", + "failed": "6", + "degraded": "4" }, { "timestamp": "1684472700000", "error_rate": "70.46", - "error_count": "15" + "error_count": "15", + "failed": "10", + "degraded": "5" }, { "timestamp": "1684472820000", "error_rate": "65.02", - "error_count": "12" + "error_count": "12", + "failed": "8", + "degraded": "4" }, { "timestamp": "1684472940000", "error_rate": "16.75", - "error_count": "3" + "error_count": "3", + "failed": "1", + "degraded": "2" }, { "timestamp": "1684473060000", "error_rate": "86.91", - "error_count": "18" + "error_count": "18", + "failed": "10", + "degraded": "8" }, { "timestamp": "1684473180000", "error_rate": "13.49", - "error_count": "1" + "error_count": "1", + "failed": "0", + "degraded": "1" }, { "timestamp": "1684473240000", "error_rate": "62.74", - "error_count": "11" + "error_count": "11", + "failed": "8", + "degraded": "3" } ], - "start_time": "1684472580000", - "end_time": "1684473300000", "metadata": { "source": "kafka", "label": "value" diff --git a/udf/anomaly-detection/tests/resources/data/stream1.json b/udf/anomaly-detection/tests/resources/data/stream1.json deleted file mode 100644 index d0d680da..00000000 --- a/udf/anomaly-detection/tests/resources/data/stream1.json +++ /dev/null @@ -1,74 +0,0 @@ -[ - { - "timestamp": "1684193070196", - "source_asset_id": "6055107291188110321", - "destination_asset_id": "1218463880781465009", - "error_rate": "56.97" - }, - { - "timestamp": "1684193130196", - "source_asset_id": "6055107291188110321", - "destination_asset_id": "1218463880781465009", - "error_rate": "70.46" - }, - { - "timestamp": "1684193190196", - "source_asset_id": "6055107291188110321", - "destination_asset_id": "1218463880781465009", - "error_rate": "65.02" - }, - { - "timestamp": "1684193250196", - "source_asset_id": "6055107291188110321", - "destination_asset_id": "1218463880781465009", - "error_rate": "16.75" - }, - { - "timestamp": "1684193310196", - "source_asset_id": "6055107291188110321", - "destination_asset_id": "1218463880781465009", - "error_rate": "86.91" - }, - { - "timestamp": "1684193370196", - "source_asset_id": "6055107291188110321", - "destination_asset_id": "1218463880781465009", - "error_rate": "13.49" - }, - { - "timestamp": "1684193133192", - "unique_key": "service-mesh:6055107291188110321", - "error_rate": "33.97", - "latency": "0.8" - }, - { - "timestamp": "1684193193192", - "unique_key": "service-mesh:6055107291188110321", - "error_rate": "30.51", - "latency": "0.2" - }, - { - "timestamp": "1684193253192", - "unique_key": "service-mesh:6055107291188110321", - "error_rate": "60.92", - "latency": "0.6" - }, - { - "timestamp": "1684193313192", - "unique_key": "service-mesh:6055107291188110321", - "error_rate": "26.28", - "latency": "0.1" - }, - { - "timestamp": "1684193373192", - "unique_key": "service-mesh:6055107291188110321", - "error_rate": "85.37", - "latency": "0.5" - }, - { - "timestamp": "1684193433192", - "unique_key": "service-mesh:6055107291188110321", - "error_rate": "62.74", - "latency": "0.3" - } -] \ No newline at end of file diff --git a/udf/anomaly-detection/tests/resources/data/stream_nan.json b/udf/anomaly-detection/tests/resources/data/stream_nan.json index 8031a01e..9dfece74 100644 --- a/udf/anomaly-detection/tests/resources/data/stream_nan.json +++ b/udf/anomaly-detection/tests/resources/data/stream_nan.json @@ -1,43 +1,59 @@ { + "uuid": "0987654321", + "config_id": "druid-config", + "start_time": "1684472580000", + "end_time": "1684473300000", "data": [ { "timestamp": "1684472580000", "error_rate": "NaN", - "error_count": "NaN" + "error_count": "NaN", + "failed": "NaN", + "degraded": "NaN" }, { "timestamp": "1684472700000", "error_rate": "70.46", - "error_count": "15" + "error_count": "15", + "failed": "15", + "degraded": "NaN" }, { "timestamp": "1684472820000", "error_rate": "65.02", - "error_count": "12" + "error_count": "12", + "failed": "NaN", + "degraded": "12" }, { "timestamp": "1684472940000", "error_rate": "16.75", - "error_count": "3" + "error_count": "3", + "failed": "NaN", + "degraded": "3" }, { "timestamp": "1684473060000", "error_rate": "NaN", - "error_count": "NaN" + "error_count": "NaN", + "failed": "NaN", + "degraded": "NaN" }, { "timestamp": "1684473180000", "error_rate": "13.49", - "error_count": "1" + "error_count": "1", + "failed": "1", + "degraded": "NaN" }, { "timestamp": "1684473240000", "error_rate": "62.74", - "error_count": "11" + "error_count": "11", + "failed": "5", + "degraded": "6" } ], - "start_time": "1684472580000", - "end_time": "1684473300000", "metadata": { "source": "kafka", "label": "value" diff --git a/udf/anomaly-detection/tests/test_druid.py b/udf/anomaly-detection/tests/test_druid.py index 26eaba7e..e11ff0e0 100644 --- a/udf/anomaly-detection/tests/test_druid.py +++ b/udf/anomaly-detection/tests/test_druid.py @@ -57,8 +57,7 @@ def test_fetch_data(self): value=["count"], ) ) - _out.to_csv("test.csv") - self.assertEqual(_out.shape, (2, 1)) + self.assertEqual(_out.shape, (2, 2)) if __name__ == "__main__": diff --git a/udf/anomaly-detection/tests/test_tools.py b/udf/anomaly-detection/tests/test_tools.py index 4433de32..20d0d1e9 100644 --- a/udf/anomaly-detection/tests/test_tools.py +++ b/udf/anomaly-detection/tests/test_tools.py @@ -27,16 +27,11 @@ def test_is_host_reachable_err(self): @patch.object(ConfigManager, "load_configs", Mock(return_value=mock_configs())) class TestWindowScorer(unittest.TestCase): def test_get_winscore(self): - static_threshold = ConfigManager().get_static_threshold_config( - config_name="sandbox_numalogic_demo2", - metric_name="namespace_app_rollouts_http_request_error_rate", - ) - postprocess_conf = ConfigManager().get_postprocess_config( - config_name="sandbox_numalogic_demo2", - metric_name="namespace_app_rollouts_http_request_error_rate", - ) + static_threshold = ConfigManager().get_static_threshold_config(config_id="druid-config") + postprocess_conf = ConfigManager().get_postprocess_config(config_id="druid-config") stream = np.random.uniform(low=1, high=2, size=(10, 1)) winscorer = WindowScorer(static_threshold, postprocess_conf) - final_score = winscorer.get_ensemble_score(stream) - self.assertLess(final_score, 3.0) + final_scores = winscorer.get_ensemble_score(stream) + for score in final_scores: + self.assertLess(score, 3.0) diff --git a/udf/anomaly-detection/tests/test_trainer.py b/udf/anomaly-detection/tests/test_trainer.py index cbe4010a..49f1d2f1 100644 --- a/udf/anomaly-detection/tests/test_trainer.py +++ b/udf/anomaly-detection/tests/test_trainer.py @@ -64,7 +64,7 @@ def test_druid_01(self): _out = Train().run(datums=iter([as_datum(self.train_payload2)])) print(_out) self.assertTrue(_out[0].success) - self.assertEqual("2", _out[0].id) + self.assertEqual("1", _out[0].id) if __name__ == "__main__": diff --git a/udf/anomaly-detection/tests/test_watcher.py b/udf/anomaly-detection/tests/test_watcher.py index c811c6c0..0a6a800f 100644 --- a/udf/anomaly-detection/tests/test_watcher.py +++ b/udf/anomaly-detection/tests/test_watcher.py @@ -25,49 +25,49 @@ def test_load_configs(self): def test_get_datastream_config(self): # from users config - stream_conf = self.cm.get_stream_config(config_name="sandbox_numalogic_demo1") + stream_conf = self.cm.get_stream_config(config_id="app1-config") self.assertTrue(stream_conf) - self.assertEqual(stream_conf.name, "sandbox_numalogic_demo1") + self.assertEqual(stream_conf.config_id, "app1-config") # from given default config - stream_conf = self.cm.get_stream_config(config_name="argo-rollouts") + stream_conf = self.cm.get_stream_config(config_id="druid-config") self.assertTrue(stream_conf) - self.assertEqual(stream_conf.name, "argo-rollouts") + self.assertEqual(stream_conf.config_id, "druid-config") # default config - stream_conf = self.cm.get_stream_config(config_name="random") + stream_conf = self.cm.get_stream_config(config_id="random") self.assertTrue(stream_conf) - self.assertEqual(stream_conf.name, "default") + self.assertEqual(stream_conf.config_id, "default") def test_get_unified_config(self): - # from given config - unified_config = self.cm.get_unified_config(config_name="sandbox_numalogic_demo1") + # from given user config + unified_config = self.cm.get_unified_config(config_id="app1-config") self.assertTrue(unified_config) # from given default config - unified_config = self.cm.get_unified_config(config_name="default-argorollouts") + unified_config = self.cm.get_unified_config(config_id="prometheus-config") self.assertTrue(unified_config) # default config - will not have unified config - unified_config = self.cm.get_unified_config(config_name="random") + unified_config = self.cm.get_unified_config(config_id="random") self.assertTrue(unified_config.strategy, "max") def test_get_datastream_config_time(self): _start_time = time.perf_counter() - ConfigManager.get_stream_config(config_name="sandbox_numalogic_demo1") + ConfigManager.get_stream_config(config_id="druid-config") time1 = time.perf_counter() - _start_time _start_time = time.perf_counter() - ConfigManager.get_stream_config(config_name="sandbox_numalogic_demo1") + ConfigManager.get_stream_config(config_id="druid-config") time2 = time.perf_counter() - _start_time _start_time = time.perf_counter() self.assertTrue(time2 <= time1) def test_get_unified_config_time(self): _start_time = time.perf_counter() - ConfigManager().get_unified_config(config_name="sandbox_numalogic_demo1") + ConfigManager().get_unified_config(config_id="druid-config") time1 = time.perf_counter() - _start_time _start_time = time.perf_counter() - ConfigManager().get_unified_config(config_name="sandbox_numalogic_demo1") + ConfigManager().get_unified_config(config_id="druid-config") time2 = time.perf_counter() - _start_time self.assertTrue(time2 < time1) diff --git a/udf/anomaly-detection/tests/udf/test_postprocess.py b/udf/anomaly-detection/tests/udf/test_postprocess.py index fedc1acb..6ee5b43f 100644 --- a/udf/anomaly-detection/tests/udf/test_postprocess.py +++ b/udf/anomaly-detection/tests/udf/test_postprocess.py @@ -15,7 +15,7 @@ class TestPostProcess(unittest.TestCase): - keys: list[str] = ["service-mesh", "1", "2"] + keys: list[str] = ["1"] def setUp(self) -> None: redis_client.flushall() diff --git a/udf/anomaly-detection/tests/udf/test_preprocess.py b/udf/anomaly-detection/tests/udf/test_preprocess.py index 59cb2782..dde61c68 100644 --- a/udf/anomaly-detection/tests/udf/test_preprocess.py +++ b/udf/anomaly-detection/tests/udf/test_preprocess.py @@ -22,7 +22,7 @@ class TestPreprocess(unittest.TestCase): preproc_input: Datum = None - keys: list[str] = ["service-mesh", "1", "2"] + keys: list[str] = ["1", "2"] @classmethod def setUpClass(cls) -> None: