Skip to content

Commit 687c7f5

Browse files
authored
Final check for release (salesforce#39)
* Modify `README` and update version * Update documentation * Add release and pypi version badges
1 parent dc059af commit 687c7f5

File tree

4 files changed

+203
-59
lines changed

4 files changed

+203
-59
lines changed

README.md

Lines changed: 45 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ For full license text, see the LICENSE file in the repo root or https://opensour
1919
<a href="https://github.com/salesforce/logai/actions/workflows/pages/pages-build-deployment">
2020
<img alt="pages-build-deployment" src="https://github.com/salesforce/logai/actions/workflows/pages/pages-build-deployment/badge.svg" />
2121
</a>
22+
<a href="https://github.com/salesforce/logai/releases">
23+
<img alt="Latest Release" src="https://img.shields.io/github/release/salesforce/logai.svg" />
24+
</a>
25+
<a href="https://badge.fury.io/py/logai">
26+
<img src="https://badge.fury.io/py/logai.svg" alt="PyPI version">
27+
</a>
2228
<a href="https://opensource.org/licenses/BSD-3-Clause">
2329
<img alt="license" src="https://img.shields.io/badge/License-BSD_3--Clause-blue.svg"/>
2430
</a>
@@ -76,7 +82,8 @@ like NewRelic and DataDog, or popular log analysis open source tools on Github.
7682

7783
## Installation
7884

79-
You can install LogAI using `pip install` with the instruction below:
85+
### Quick Install
86+
You can install LogAI core library using `pip install`:
8087

8188
```shell
8289

@@ -85,32 +92,36 @@ git clone https://git.soma.salesforce.com/SalesforceResearch/logai.git
8592
cd logai
8693

8794
# [Optional] Create virtual environment
88-
python3 -m venv venv # create virtual environment
89-
source venv/bin/activate # activate virtual env
90-
pip install . # install LogAI from root directory
91-
```
92-
To conduct deep learning model related tasks, please install extra requirements by:
95+
python3 -m venv venv
96+
source venv/bin/activate
97+
98+
# Install LogAI
99+
pip install logai
93100

94-
```shell
95-
pip install ".[deep-learning]"
96101
```
97102

98-
To use LogAI GUI portal, please install extra requirements by:
103+
### Install Optional Dependencies
104+
LogAI core library is light-weight with limited dependent packages installed. Users can install optional dependencies
105+
to enable extended functionalities of LogAI.
99106

100-
```shell
101-
pip install ".[gui]"
102-
```
107+
**Deep Learning Log Analysis**. To conduct deep learning model related tasks and run benchmarking,
108+
please install extra requirements by `pip install "logai[deep-learning]"`.
103109

104-
To develop LogAI, run build and testing tools, please install extra requirements by:
110+
**Enable LogAI GUI Portal***. To use LogAI GUI portal,
111+
please install extra requirements by `pip install "logai[gui]"`.
105112

106-
```shell
107-
pip install ".[dev]"
108-
```
113+
**LogAI Development**. To contribute to LogAI development, build and test code changes,
114+
please install extra requirements by `pip install "logai[dev]"`.
109115

110-
Or you can install the full dependencies by:
111-
```shell
112-
pip install ".[all]"
113-
```
116+
**Complete Installation**. you can install the full list of dependencies by `pip install "logai[all]"`.
117+
118+
### Known Issues
119+
120+
> :warning: You may see `Resource punkt not found` while using LogAI. You can download `punkt`
121+
> package from NLTK to solve the problem.
122+
> ```shell
123+
> python -m nltk.downloader punkt
124+
> ```
114125
115126
## Getting Started
116127
@@ -236,7 +247,6 @@ Make sure to set `filepath` to the target log dataset file path.
236247

237248
Then to run log anomaly detection. You can simply create below python script:
238249

239-
240250
```python
241251
import json
242252

@@ -264,10 +274,10 @@ For full context of this example please check
264274
[Tutorial: Use Log Anomaly Detection Application](./examples/jupyter_notebook/log_anomaly_detection_example.ipynb).
265275

266276
### Build Customized LogAI Applications
267-
You can build your own customized log analysis applications using LogAI.
268-
Please refer to [Build LogAI Application in Jupyter Notebook](examples/jupyter_notebook/jupyter_tutorial.md)
269-
for more information about how to
270-
use LogAI modules to create E2E applications in Jupyter Notebook.
277+
You can build your own customized log analysis applications using LogAI. Here we show two examples:
278+
279+
* [Tutorial: Log Clustering Using LogAI](./examples/jupyter_notebook/tutorial_log_clustering.ipynb)
280+
* [Tutorial: Log Anomaly Detection Using LogAI](./examples/jupyter_notebook/tutorial_log_anomaly_detection.ipynb)
271281

272282
### Deep-learning Anomaly Detection Benchmarking
273283

@@ -284,19 +294,20 @@ For more detail about LogAI library and advanced use cases, please visit
284294

285295
## Technical Report and Citing LogAI
286296

287-
You can find more details about LogAI in the [technical report]().
288-
297+
You can find more details about LogAI in the [technical report](https://arxiv.org/abs/2301.13415).
289298
If you're using LogAI in your research or applications, please cite using this BibTeX:
290299

291300
```
292-
@article{logai2023,
293-
title={LogAI: A Toolkit for AI-based Log Analysis},
294-
author={Qian Cheng, Amrita Saha, Wenzhuo Yang, Chenghao Liu, Gerald Woo, Doyen Sahoo, Steven HOI},
295-
year={2023},
296-
eprint={?},
297-
archivePrefix={arXiv},
298-
primaryClass={cs.LG}
301+
@misc{https://doi.org/10.48550/arxiv.2301.13415,
302+
title = {LogAI: A Library for Log Analytics and Intelligence},
303+
author = {Cheng, Qian and Saha, Amrita and Yang, Wenzhuo and Liu, Chenghao and Sahoo, Doyen and Hoi, Steven},
304+
publisher = {arXiv},
305+
year = {2023},
306+
doi = {10.48550/ARXIV.2301.13415},
307+
url = {https://arxiv.org/abs/2301.13415},
308+
copyright = {arXiv.org perpetual, non-exclusive license}
299309
}
310+
300311
```
301312

302313
## Contact

docs/source/getting_started.rst

Lines changed: 140 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,159 @@ Getting Started
1313
Installation
1414
-----------------------------------------------
1515

16-
You can install LogAI using :file:`pip install` with the instruction below:
16+
You can install LogAI core library using :file:`pip install`:
1717

1818
.. code-block:: shell
1919
20-
git clone https://git.soma.salesforce.com/SalesforceResearch/logai.git
21-
cd logai
22-
python3 -m venv venv # create virtual environment
23-
source venv/bin/activate # activate virtual env
24-
pip install ./ # install LogAI from root directory
20+
# Check out LogAI code repo from Github
21+
git clone https://git.soma.salesforce.com/SalesforceResearch/logai.git
22+
cd logai
2523
26-
Setup LogAI GUI Portal
24+
# [Optional] Create virtual environment
25+
python3 -m venv venv
26+
source venv/bin/activate
27+
28+
# Install LogAI
29+
pip install logai
30+
31+
Install Optional Dependencies
32+
-----------------------------------------------
33+
34+
LogAI core library is light-weight with limited dependent packages installed. Users can install optional dependencies
35+
to enable extended functionalities of LogAI.
36+
37+
**Deep Learning Log Analysis**. To conduct deep learning model related tasks and run benchmarking,
38+
please install extra requirements by :file:`pip install "logai[deep-learning]"`.
39+
40+
**Enable LogAI GUI portal***. To use LogAI GUI portal,
41+
please install extra requirements by :file:`pip install "logai[gui]"`.
42+
43+
**LogAI Development**. To contribute to LogAI development, build and test code changes,
44+
please install extra requirements by :file:`pip install "logai[dev]"`.
45+
46+
**Complete installation**. you can install the full list of dependencies by :file:`pip install "logai[all]"`.
47+
48+
Use LogAI
2749
-----------------------------------------------
2850

51+
Below we briefly introduce several ways to explore and use LogAI, including exploring LogAI GUI
52+
portal, benchmarking deep-learning based log anomaly detection using LogAI, and building your
53+
own log analysis application with LogAI.
54+
55+
56+
Explore LogAI GUI Portal
57+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58+
2959
You can also start a local LogAI service and use the GUI portal to explore LogAI.
3060

3161
.. code-block:: shell
3262
33-
export PYTHONPATH='.' # make sure to add current root to PYTHONPATH
34-
python3 gui/application.py # Run local plotly dash server.
63+
# Check out LogAI code repo from Github
64+
git clone https://git.soma.salesforce.com/SalesforceResearch/logai.git
65+
cd logai
66+
67+
# [Optional] Create virtual environment
68+
python3 -m venv venv # create virtual environment
69+
source venv/bin/activate # activate virtual env
70+
71+
# install LogAI and GUI dependencies
72+
pip install ".[dev]"
73+
pip install ".[gui]"
74+
75+
# Start LogAI service
76+
export PYTHONPATH='.' # make sure to add current root to PYTHONPATH
77+
python3 gui/application.py # Run local plotly dash server.
78+
3579
3680
Then open the LogAI portal via :file:`http://localhost:8050/` or :file:`http://127.0.0.1:8050/` in your browser:
3781

3882
.. image:: _static/logai_summarization_res.png
3983
:width: 750
4084

85+
Run Simple Time-series Anomaly Detection Application
86+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87+
88+
You can also use LogAI in more programtic ways. LogAI supports configuration files in `.json` or `.yaml`.
89+
Below is a sample `log_anomaly_detection_config.json` configuration for anomaly detection application.
90+
Make sure to set `filepath` to the target log dataset file path.
91+
92+
.. code-block:: json
93+
94+
{
95+
"open_set_data_loader_config": {
96+
"dataset_name": "HDFS",
97+
"filepath": ""
98+
},
99+
"preprocessor_config": {
100+
"custom_delimiters_regex":[]
101+
},
102+
"log_parser_config": {
103+
"parsing_algorithm": "drain",
104+
"parsing_algo_params": {
105+
"sim_th": 0.5,
106+
"depth": 5
107+
}
108+
},
109+
"feature_extractor_config": {
110+
"group_by_category": ["Level"],
111+
"group_by_time": "1s"
112+
},
113+
"log_vectorizer_config": {
114+
"algo_name": "word2vec"
115+
},
116+
"categorical_encoder_config": {
117+
"name": "label_encoder"
118+
},
119+
"anomaly_detection_config": {
120+
"algo_name": "one_class_svm"
121+
}
122+
}
123+
124+
125+
126+
Then to run log anomaly detection. You can simply create below python script:
127+
128+
.. code-block:: python
129+
130+
import json
131+
132+
from logai.applications.application_interfaces import WorkFlowConfig
133+
from logai.applications.log_anomaly_detection import LogAnomalyDetection
134+
135+
# path to json configuration file
136+
json_config = "./log_anomaly_detection_config.json"
137+
138+
# Create log anomaly detection application workflow configuration
139+
config = json.loads(json_config)
140+
workflow_config = WorkFlowConfig.from_dict(config)
141+
142+
# Create LogAnomalyDetection Application for given workflow_config
143+
app = LogAnomalyDetection(workflow_config)
144+
145+
# Execute App
146+
app.execute()
147+
148+
149+
Then you can check anomaly detection results by calling :file:`app.anomaly_results`.
150+
151+
For full context of this example please check
152+
`Tutorial: Use Log Anomaly Detection Application
153+
<https://github.com/salesforce/logai/blob/main/examples/jupyter_notebook/log_anomaly_detection_example.ipynb>`_.
154+
155+
Build Customized LogAI Applications
156+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157+
You can build your own customized log analysis applications using LogAI. Here we show two examples:
158+
159+
* `Tutorial: Log Clustering Using LogAI <https://github.com/salesforce/logai/blob/main/examples/jupyter_notebook/tutorial_log_clustering.ipynb>`_
160+
161+
* `Tutorial: Log Anomaly Detection Using LogAI <https://github.com/salesforce/logai/blob/main/examples/jupyter_notebook/tutorial_log_anomaly_detection.ipynb>`_
162+
163+
Deep-learning Anomaly Detection Benchmarking
164+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165+
166+
LogAI can be used to benchmark deep-learning anomaly detection results.
167+
A `tutorial <https://github.com/salesforce/logai/blob/main/examples/jupyter_notebook/tutorial_deep_ad.md>`_ is provided for
168+
Anomaly Detection Benchmarking using LSTM anomaly detector for HDFS Dataset. More examples of deep-learning anomaly
169+
detection benchmarking on different datasets and algorithms can be found in
170+
`Deep Anomaly Detection Benchmarking Examples <https://github.com/salesforce/logai/tree/main/examples/jupyter_notebook/nn_ad_benchmarking>`_.
171+

docs/source/intro.rst

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
Introduction
66
===============================================
77

8-
Logs are the machine generated text messages of a computer program. In modern computer systems, logs are one of the most
9-
critical observability data for developers to understand system behavior, monitor system health and resolve issues.
10-
The volume of logs are huge for complex distributed systems, such as cloud, search engine, social media, etc. Log analytics,
11-
are tools for developers to process huge volume of raw logs and generate insights, in order to better handle system
12-
operations. While artificial intelligence (AI) and machine learning (ML) technologies are proven to be capable to improve
13-
productivity in a lot of domains, recently more and more AI tools are integrated in log analytics solutions, in both
14-
commercial and opensource software. However, there is still no sufficient toolkit that can handle multiple AI-based
15-
log analysis tasks in uniform way. We introduce LogAI, an one-stop toolkit for AI-based log analytics.
16-
LogAI provides AI and ML capabilities for log analysis. LogAI can be used for a variety of tasks such as log summarization,
17-
log clustering and log anomaly detection. LogAI adopts the same log data model as OpenTelemetry so the developed applications
18-
and models are eligible to logs from different log management platforms. LogAI provides a unified model interface and
19-
integrates with popular time-series models, statistical learning models and deep learning models. LogAI also provides
20-
an out-of-the-box GUI for users to conduct interactive analysis. With LogAI, we can also easily benchmark popular deep
21-
learning algorithms for log anomaly detection without putting in redundant effort to process the logs. LogAI can be used
22-
for different purposes from academic research to industrial prototyping.
8+
Software and System logs record runtime information about processes executing within a system.
9+
These logs have become the most critical and ubiquitous forms of observability data that help developers
10+
understand system behavior, monitor system health and resolve issues. However, the volume of logs generated can be
11+
humongous (of the order of petabytes per day) especially for complex distributed systems, such as cloud,
12+
search engine, social media, etc. This has propelled a lot of research on developing AI-based log based analytics and
13+
intelligence solutions that can process huge volume of raw logs and generate insights. In order to enable
14+
users to perform multiple types of AI-based log analysis tasks in a uniform manner,
15+
we introduce LogAI, a one-stop open source library for log analytics and intelligence.
16+
LogAI supports tasks such as log summarization, log clustering and log anomaly detection.
17+
It adopts the OpenTelemetry data model, to enable compatibility with different log management platforms.
18+
LogAI provides an unified model interface and provides popular time-series, statistical learning and deep
19+
learning models. Alongside this, LogAI also provides an out-of-the-box GUI for users to conduct interactive
20+
analysis. With LogAI, we can also easily benchmark popular deep learning algorithms for log anomaly detection
21+
without putting in redundant effort to process the logs. We have opensourced LogAI to cater to a wide range of
22+
applications benefiting both academic research and industrial prototyping.
2323

2424
LogAI Architecture
2525
-----------------------------------------------
@@ -45,3 +45,5 @@ of a GUI portal that talks to backend analysis applications. The portal is suppo
4545

4646
.. image:: _static/logai_summarization_res.png
4747
:width: 750
48+
49+

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
setup(
4848
name="logai",
49-
version="v0.1.2",
49+
version="v0.1.3",
5050
description="LogAI is unified framework for AI-based log analytics",
5151
long_description_content_type="text/markdown",
5252
long_description=readme,

0 commit comments

Comments
 (0)