Commit Graph

36 Commits

Author SHA1 Message Date
Witek Bedyk aea6e4858d Remove project content
This is step 2 of the project retirement process as described in [1].
Project retirement has been anounced here [2].

[1] https://docs.opendev.org/opendev/infra-manual/latest/drivers.html#step-2-remove-project-content
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-August/016830.html

Depends-On: https://review.opendev.org/751987
Change-Id: Id4c4f95fee1787e23a3156933c40c491f298128e
2020-10-22 15:11:34 +02:00
Daisuke Fujita fcfd3bbc5f Improve Unittests
Delete unnecessary unittests.

Change-Id: I88c2f517c25e6449f6013e39f78605b52bdf78f0
2019-09-12 06:42:59 -07:00
Daisuke Fujita 6c7316ebbd Support python3.5 for monasca-analytics
This patch implements followings for py35 support using six(er) and 2to3.

- Python 3 map/filter returns iterator, must be converted to list
- use six.string_types instead of basestring
- use six.iteritems instead of iteritems
- use six.moves for using cPickle and SocketServer packages
- use six.assertCountEqual instead of assertItemsEqual
- remove relative imports
- update BytecodeAssembler(monasca_analytics/
  banana/bytecode/assembler.py) for python3

Can be tested with:
  tox -e py35

Change-Id: If1b92d0ffc56492950f6a02ebdbe1596d0dce368
2019-01-28 09:47:45 +00:00
Zuul 627562cacf Merge "Remove empty files" 2019-01-22 10:14:09 +00:00
Daisuke Fujita 3542d404c5 Update requirements
This patch includes the following updates.

- Remove "findspark" and "libpgm" packages.
    There are no longer in use.

- Rename "sklearn" to "scikit-learn".
    "global-reqirements" needs "scikit-learn" instead of "sklearn" which is old package name.

- Pin scipy version less than 1.2.0.
    Currently, according to upper-constraints.txt of openstack/requirements, scipy version is '1.2.0'.
    However, this scipy version seems to be unable to import and use some scikit-learn libraries.

- Remove "docopt" and re-wite code wihtout "docopt".
    "docopt" is not used in OpenStack.

- Remove requirements-check job.
    Currently, "tornado" is a required package, but requirements-check job has a error.
    However, to remove that error, adding "tornado" package to openstack/requirements was refused.

Change-Id: I3bb98ef733ff16558d241968b06c31fa7508d047
2019-01-06 21:14:48 -08:00
Nguyen Hung Phuong 0e3d22199f Remove empty files
monasca_analytics/exception/aggregator.py
monasca_analytics/exception/ml.py
monasca_analytics/exception/sink.py
monasca_analytics/exception/source.py
test/config/test_connections.py
are empty files. We probably should delete it.

Change-Id: I7b6b3f90da3d11888f84f5e8efe0996598b875fb
2017-12-28 19:55:27 +07:00
Hisashi Osanai 94495cb4b8 Change copyright to appropriate one
When I submitted the patches, I used wrong copyright on them.
This patch changes the copyright to appropriate one.

Change-Id: I0a48e9d416b99d72b4534de1f0376fd712f3a721
2017-01-16 15:28:15 +00:00
Hisashi Osanai 5f9495f0e4 Add Svc as a SML
This patch adds a SML which uses Svc (Support Vector Classifier)
algorithm (supervised).

Change-Id: I8d5d7bd6aeaff4e325ffed206e9f1f1cd23a4612
2017-01-09 10:39:52 +00:00
Hisashi Osanai a061e26741 Add RandomForestClassifier as a SML
This patch adds a SML which uses RandomForestClassifier algorithm
(supervised).

Change-Id: I6d7f3edb1fbf386a0fd287a74ca6c12b55ad4aff
2017-01-09 09:20:22 +00:00
Hisashi Osanai 835a033681 Add LogisticRegression as a SML
This patch adds a SML which uses LogisticRegression algorithm
(supervised).

Change-Id: Ibf3e31f1976eb8beca42d33e74bb65aebba6599e
2017-01-09 09:05:31 +00:00
Hisashi Osanai 7cc09363b1 Add DecisionTreeClassifier as a SML
This patch adds a SML which uses DecisionTreeClassifier algorithm
(supervised).

Change-Id: I7e4ebe07824418d733c77c6f4750893836ecdd70
2017-01-09 08:58:30 +00:00
Hisashi Osanai 491e1b2b07 Add EllipticEnvelope as a SML
This patch adds a SML which uses EllipticEnvelope algorithm
(unsupervised).

Change-Id: I7c4357c848e9246dff009dd22bc4411517db6c5a
2017-01-09 08:52:13 +00:00
Hisashi Osanai 6bf6c14130 Add IsolationForest as a SML
This patch adds a SML which uses IsolationForest algorithm (unsupervised).

Change-Id: I77a288e530bd38544d2cce9bf9ed6bdda235b218
2017-01-02 07:42:20 +00:00
Jenkins c8cfdd54e7 Merge "Change assertTrue(isinstance()) by optimal assert" 2016-11-14 03:33:35 +00:00
Luong Anh Tuan 05f12bfffa Remove xrange for run both Python 2 and Python 3
In python 3, range() does what xrange() used to do and xrange() does not
exist. If you want to write code that will run on both Python 2 and
Python 3, you can't use xrange().

range() can actually be faster in some cases - eg. if iterating over the
same sequence multiple times. xrange() has to reconstruct the integer
object every time, but range() will have real integer objects.
(It will always perform worse in terms of memory however)

xrange() isn't usable in all cases where a real list is needed.
For instance, it doesn't support slices, or any list methods.

Change-Id: I5233438a864bb00d04ba7fb2b1688cacb0473691
2016-10-12 11:40:05 +07:00
gecong1973 9ee464db89 Change assertTrue(isinstance()) by optimal assert
Some of tests use different method of
assertTrue(isinstance(A, B)) or assertEqual(type(A), B).
The correct way is to use assertIsInstance(A, B) provided
by testtools

Change-Id: I127045563897bccf77b2ba5a8975b2d7706ec3f6
2016-10-08 09:22:03 +08:00
Joan Varvenne a2a315fb5e Improve speed in data generation while preserving semantics.
This make the fake data generation much faster and configurable.
For the cloud example, the phase 2 is now triggered in less than 5
seconds instead of 6 minutes.

Change-Id: I9967c94d28a380fa19afe9275e769f1465f4f922
2016-09-20 10:33:48 +01:00
Joan Varvenne 4c05018883 Make it possible to pick the number of samples used for SVM.
Change-Id: I72b625fcefd4b8fa87cc49f71a847e8223395305
2016-09-16 10:50:51 +01:00
Joan Varvenne 5812bd8429 This commit introduces the first version of Banana configuration language.
As of this commit, to change the configuration using Banana, we
need to make an HTTP POST request to `/banana` REST API. This API is
temporary and is likely to be changed later.

The implementation is done entirely in the `banana` module. Under this
module there are:

 * `typeck` module contains the type checker,
 * `grammar` module contains the parser and the AST and,
 * `eval` module contains the interpreter.

Additionally, a test framework has been created to ease the test of
particular conditions of the language.

Within the banana module, there is a README.md file for each associated
sub-module explaining further the details of the language.

Once this commit is merged, there's still a lot that can be improved:

 - All components should be tested in Banana.
 - The 'deadpathck' pass could be improved (see TODO)
 - We don't support generated JSON ingestors yet.
 - Imports will be key for reusability (not implemented).

Change-Id: I1305bdfa0606f30619b31404afbe0acf111c029f
2016-08-22 14:29:26 +01:00
Joan Varvenne 154594f929 Add tests for monasca_derivative.
Change-Id: I53b5e42fbae1a057e73b33a7a5f20f4f7cc513ad
2016-07-08 12:41:23 +01:00
Joan Varvenne 9b29257102 Fix some bugs with Aggregate and Combine. Add some tests as well.
Change-Id: I553f419e4a142ac19c54b4137f12ac26bbd66efa
2016-07-07 08:49:43 +01:00
Joan Varvenne efab8ebc13 Reduce duplication in tests. Add test for banana.
Change-Id: I456b94e9a50a82d6618746826a0a4dc31c1e88bc
2016-07-06 10:04:24 +01:00
Joan Varvenne b93b416fb4 Add the test back and include BytecodeAssembler in tree.
Change-Id: I5ef7469cb98d05cb78b27c5a6455d366885c1143
2016-07-05 11:11:34 +01:00
David Subiros Perez 4c14dace26 migrated config checking library from schema to voluptuous
Change-Id: I371db2461a7ecb216f00b99aaf8296bde42f02f7
2016-07-01 17:53:17 +01:00
Joan Varvenne 3f5fc11f31 Add basic analytics for Monasca metrics
This commit introduces 3 examples of LDPs that process
monasca metrics:

 * `Aggregate` - compute simple stats per metric name.
 * `Combine` - allow mixing of different metrics by providing
   a simple expression parser that gets transformed into
   CPython bytecode.
 * `Derivative` - compute a metric derivative.

While quite simple, those examples, will help us improve the
framework by emphazing some of the problems we will face when
working on more complex solution such as:

 * Spark's inability to share data between sliding windows.
 * Ordering of data.
 * Sampling of metrics / events.

Change-Id: I259022f20e9b288aa2a08c24ad4a5f41a20e6095
2016-07-01 00:20:22 -06:00
Hisashi Osanai 9bce2e15af Fix Apache license and PYTHONPATH for the gate
This patch fixes followings:
*two lines of Apache license in order to pass H103
*using homedir in PYTHONPATH

Co-Authored-By: Daisuke Fujita <fuzita.daisuke@jp.fujitsu.com>
Change-Id: I8fbe26ae8547879fdda0f840bfc5d582e0395588
2016-06-28 15:03:27 +09:00
Hisashi Osanai 56f05fa1da H238 support
This patch provies H238 support.

Change-Id: I91b6321a3517ce92cef62e6df1be0d7caf9eb82d
2016-06-06 09:36:13 +00:00
Jenkins 3881d2095e Merge "H306 support" 2016-06-06 09:22:36 +00:00
Jenkins c489a1afbd Merge "E241 support" 2016-06-06 09:14:03 +00:00
Hisashi Osanai ca10132b5d E126 support
This patch provides E126 support.

Change-Id: Ie9bbad39b247de9cdbfa8e2c7a36717665e818d0
2016-06-03 17:21:20 +00:00
Hisashi Osanai 2247787b0a E241 support
This patch provies E241 support.

Change-Id: Ice6ecacd891ecad0fe030b8fa9626d36f86fa1ac
2016-06-03 17:14:07 +00:00
Hisashi Osanai 0a828dfa06 H306 support
This patch provies H306 support.

Change-Id: I589b00b33072fc422ec4dd7d2ce9b1f8da642acf
2016-06-03 16:40:03 +00:00
Hisashi Osanai 8925e88f3a H104 support
This patch provies H104 support. As for H501 suport, patch 323988
fixes it.

Change-Id: I28031ae3f39eb425e3a3654bfd2e6bc6a9206f5f
2016-06-03 12:42:47 +00:00
Suksant Sae Lor (Hui) f2cc7124d1 Rename main package to monasca_analytics.
Change-Id: I100a1c9d61ce5d2855e276651201aedcbbc07355
2016-06-02 13:03:56 +01:00
David Subiros Perez 8a05e78227 Added long Copyright and licence note at the top of each source file
Change-Id: I4c1a993b6b36b55b3d4407b83e0a717d0cfd27b0
2016-05-24 20:19:20 +01:00
Joan Varvenne, Suksant Sae Lor and David Subiros Perez 93f184b4bf Monanas initial code release.
Co-Authored-By: Joan Varvenne <joan.varvenne@hpe.com>
Co-Authored-By: David Subiros Perez <david.perez5@hpe.com>
Co-Authored-By: Suksant Sae Lor <suksant.sae-lor@hpe.com>

Change-Id: Ib63c590d768648a46ecd007207fe8693b610af9a
2016-05-17 01:48:24 +01:00