Skip to content

Commit 199f935

Browse files
juaduanv-shuaweiluxiong-ms1CodeFree-xzkdependabot[bot]
committed
Merge Anomaly Detector code into main (#43)
* update python version & add tests for different python versions * update python version & add tests for different python versions (#14) * update setup.py (#13) * add uvad and test * step1 * setp2 * update Readme.md * add dockerfile ,move get_margins * fix predict * delete pyd * build success * add build.py but no .pyd file generated * update setup.py * fix some error * add model folder --------- Co-authored-by: Duan Juanyong <[email protected]> * update gitignore * remove r dependency (#16) * remove r dependency * replace rpy2 with rstl * update * add build and release workflow (#12) * Bump gitpython from 3.1.40 to 3.1.41 in /anomaly-detector (#4) Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.40 to 3.1.41. - [Release notes](https://github.com/gitpython-developers/GitPython/releases) - [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES) - [Commits](gitpython-developers/GitPython@3.1.40...3.1.41) --- updated-dependencies: - dependency-name: gitpython dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jinja2 from 3.1.2 to 3.1.3 in /anomaly-detector (#6) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](pallets/jinja@3.1.2...3.1.3) --- updated-dependencies: - dependency-name: jinja2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add build workflow * add build workflow * add build workflow * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * merge --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * test on different python version (#17) * Bump gitpython from 3.1.40 to 3.1.41 in /anomaly-detector (#4) Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.40 to 3.1.41. - [Release notes](https://github.com/gitpython-developers/GitPython/releases) - [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES) - [Commits](gitpython-developers/GitPython@3.1.40...3.1.41) --- updated-dependencies: - dependency-name: gitpython dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jinja2 from 3.1.2 to 3.1.3 in /anomaly-detector (#6) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](pallets/jinja@3.1.2...3.1.3) --- updated-dependencies: - dependency-name: jinja2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add build workflow * add build workflow * add build workflow * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * merge * add more test cases * delete some uvad test cases * delete some uvad test cases * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add caching packages dependencies * add cache dependencies to boost test * add cache dependencies to boost test * Update ci.yml --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update param check * test mlflow on UnivariateAnomalyDetector, add new class (#18) * add e2e_test for UnivariateAnomalyDetector * add EntireAnomalyDetector, LatestAnomalyDetector * rename * update model output & usage * update test, remove saving results * update model output to avoid duplicated keys * check insufficient predict data * test output (#20) * Bump gitpython from 3.1.40 to 3.1.41 in /anomaly-detector (#4) Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.40 to 3.1.41. - [Release notes](https://github.com/gitpython-developers/GitPython/releases) - [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES) - [Commits](gitpython-developers/GitPython@3.1.40...3.1.41) --- updated-dependencies: - dependency-name: gitpython dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump jinja2 from 3.1.2 to 3.1.3 in /anomaly-detector (#6) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](pallets/jinja@3.1.2...3.1.3) --- updated-dependencies: - dependency-name: jinja2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add build workflow * add build workflow * add build workflow * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * test poetry install * merge * add more test cases * delete some uvad test cases * delete some uvad test cases * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add different python version * add caching packages dependencies * add cache dependencies to boost test * add cache dependencies to boost test * Update ci.yml * test output * test output * test output * add license to all .py file --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update numpy version to 1.26.x (#21) * add e2e_test for UnivariateAnomalyDetector * add EntireAnomalyDetector, LatestAnomalyDetector * rename * update numpy version to 1.26.x * update Dockerfile & pandas version * Update pyproject.toml numpy>=1.23.5 * update ci.yml * fix expectedValue error * Update pipeline for pypi publish (#22) * update gitignore * update build pipeline to push to pypi * Merge (#23) * update gitignore * update build pipeline to push to pypi * install deps * update pipeline (#24) * update pipeline (#25) * update pipeline (#26) * update build option * add wheel * update pipeline * add long description * add long text description type * change package name * uploade src only * update maintainer * update build * Bump mlflow from 2.9.2 to 2.10.0 in /anomaly-detector Bumps [mlflow](https://github.com/mlflow/mlflow) from 2.9.2 to 2.10.0. - [Release notes](https://github.com/mlflow/mlflow/releases) - [Changelog](https://github.com/mlflow/mlflow/blob/master/CHANGELOG.md) - [Commits](mlflow/mlflow@v2.9.2...v2.10.0) --- updated-dependencies: - dependency-name: mlflow dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * change package name * update version * Update README.md * update pipeline * update workflow file * add sample notebook * update workflow and ignore file * add numpy for build * change trigger condition * release version v0.2.2 (#41) * fix error in publish pipeline --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: shuawei <[email protected]> Co-authored-by: luxiong-ms1 <[email protected]> Co-authored-by: Zeke Xia <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jr-MS <[email protected]> Co-authored-by: Zeke Xia <[email protected]>
1 parent 5b11a75 commit 199f935

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

Diff for: src/anomaly_detector/univariate/util/critical_table.txt

+1
Large diffs are not rendered by default.

Diff for: src/build.py

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# ---------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# ---------------------------------------------------------
4+
5+
import os
6+
import os
7+
import numpy as np
8+
from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError
9+
10+
# See if Cython is installed
11+
try:
12+
from Cython.Build import cythonize
13+
# Do nothing if Cython is not available
14+
except ImportError:
15+
# Got to provide this function. Otherwise, poetry will fail
16+
def build(setup_kwargs):
17+
pass
18+
# Cython is installed. Compile
19+
else:
20+
from setuptools import Extension
21+
from setuptools.dist import Distribution
22+
from setuptools.command.build_ext import build_ext
23+
# use cythonize to build the extensions
24+
modules = ["./anomaly_detector/univariate/*.pyx"]
25+
extensions = cythonize(modules,
26+
language_level=3,
27+
compiler_directives={'linetrace': True},
28+
)
29+
30+
31+
# cmdclass = {'build_ext': build_ext}
32+
class BuildFailed(Exception):
33+
pass
34+
35+
36+
class ExtBuilder(build_ext):
37+
38+
def run(self):
39+
try:
40+
build_ext.run(self)
41+
except (DistutilsPlatformError, FileNotFoundError):
42+
raise BuildFailed('File not found. Could not compile C extension.')
43+
44+
def build_extension(self, ext):
45+
try:
46+
build_ext.build_extension(self, ext)
47+
except (CCompilerError, DistutilsExecError, DistutilsPlatformError, ValueError):
48+
raise BuildFailed('Could not compile C extension.')
49+
50+
51+
cmdclass = {"build_ext": ExtBuilder}
52+
53+
54+
def build(setup_kwargs):
55+
"""Needed for the poetry building interface."""
56+
57+
os.environ['CFLAGS'] = '-O3'
58+
59+
setup_kwargs.update({
60+
'ext_modules': extensions,
61+
'include_dirs': [np.get_include()],
62+
'cmdclass': cmdclass
63+
})

0 commit comments

Comments
 (0)