AnomalyDetector | Samples for the Anomaly Detection API documentation | Predictive Analytics library
kandi X-RAY | AnomalyDetector Summary
kandi X-RAY | AnomalyDetector Summary
Samples for the Anomaly Detection API documentation:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of AnomalyDetector
AnomalyDetector Key Features
AnomalyDetector Examples and Code Snippets
Community Discussions
Trending Discussions on AnomalyDetector
QUESTION
In the latest version of the Anomaly Detection Service by Azure which supports the Multi-variate Cognitive Service, we need to train a model and then consume it.
The quickstart documentation for Python mentions a few libraries which are not getting imported:
...ANSWER
Answered 2021-Apr-23 at 06:11This error was with version azure-ai-anomalydetector==3.0.0b2
. With version azure-ai-anomalydetector==3.0.0b3
, this has been addressed.
The problem is because of the change of the response format recently. To solve that issue, you can change the line with error to
QUESTION
While testing microsoft's anomaly detector project (https://github.com/microsoft/anomalydetector), this showed up:
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils_msvccompiler.py", line 414, in compile raise CompileError(msg) ImportError: Building module msanomalydetector._anomaly_kernel_cython failed: ["distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2\n"]
I've googled the error message but found that most people met this problem while using pip install
, which is not my case, and their solutions do not work for me. I've also tried running the program outside the anaconda virtual environment too, but the same message still shows.
Here is the full message:
(srcnn_python38) C:\Users\jimsu\OneDrive\桌面\srcnn\anomalydetector-master>python generate_data.py -- samples sample
_anomaly_kernel_cython.c
C:\Users\jimsu.pyxbld\temp.win-amd64-3.8\Release\pyrex\msanomalydetector_anomaly_kernel_cython.c(612): fatal error C1083: Cannot open include file: 'numpy/arrayobject.h': No such file or directory
Traceback (most recent call last):
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils_msvccompiler.py", line 412, in compile
self.spawn(args)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils_msvccompiler.py", line 518, in spawn
return super().spawn(cmd)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\spawn.py", line 80, in _spawn_nt
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\pyximport\pyximport.py", line 214, in load_module
so_path = build_module(module_name, pyxfilename, pyxbuild_dir,
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\pyximport\pyximport.py", line 186, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\command\build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils_msvccompiler.py", line 414, in compile
raise CompileError(msg)
distutils.errors.CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "generate_data.py", line 28, in
from srcnn.utils import *
File "C:\Users\jimsu\OneDrive\桌面\srcnn\anomalydetector-master\srcnn\utils.py", line 37, in
from msanomalydetector.util import average_filter
File "C:\Users\jimsu\OneDrive\桌面\srcnn\anomalydetector-master\msanomalydetector_init_.py", line 1, in
from msanomalydetector.spectral_residual import SpectralResidual
File "C:\Users\jimsu\OneDrive\桌面\srcnn\anomalydetector-master\msanomalydetector\spectral_residual.py", line 31, in
import msanomalydetector.boundary_utils as boundary_helper
File "C:\Users\jimsu\OneDrive\桌面\srcnn\anomalydetector-master\msanomalydetector\boundary_utils.py", line 5, in
from msanomalydetector._anomaly_kernel_cython import median_filter
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\pyximport\pyximport.py", line 459, in load_module
module = load_module(fullname, self.path,
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\pyximport\pyximport.py", line 231, in load_module
raise exc.with_traceback(tb)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\pyximport\pyximport.py", line 214, in load_module
so_path = build_module(module_name, pyxfilename, pyxbuild_dir,
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\pyximport\pyximport.py", line 186, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils\command\build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "C:\Users\jimsu\anaconda3\envs\srcnn_python38\lib\distutils_msvccompiler.py", line 414, in compile
raise CompileError(msg)
ImportError: Building module msanomalydetector._anomaly_kernel_cython failed: ["distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2\n"]
ANSWER
Answered 2021-Apr-18 at 07:23You've somehow(?) decided to use pyximport yourself, and it doesn't know how to find the Numpy files. I honestly don't know how you've done this since it isn't in any of their files. You also seem to be using Pyrex (which was the precursor to Cython); again, I don't really know how but this isn't what you want.
Either way, this is not the way you should be importing their Cython modules.
The correct way to set the msanomalydetector package up is to run python setup.py build_ext --inplace
, or by installing it using Pip. I suggest you do that in a fresh Anaconda environment with on Cython, Numpy and Pandas.
QUESTION
Can someone provide a generic example of AWS Cloudwatch Alarm based on Anomaly Detection of a metric built with AWS CDK in Python3?
I have tried mapping aws cloudformation example of it to aws_cdk.aws_cloudwatch.Alarm
and aws_cdk.aws_cloudwatch.CfnAlarm
with little to no luck.
ANSWER
Answered 2020-Mar-07 at 07:50There is no high level constructor for AbnormalDetector in current CDK(v1.27.0).
Pls directly use low level class CfnAnomalyDetector.
There is an example usage of AbnormalDetector with Alarm in CloudFormation doc. Use CDK low level Cfn*
classes to create corresponding CFN configuration.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install AnomalyDetector
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page