logdetective 0.2.3__py3-none-any.whl → 0.2.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,8 +49,13 @@ def main():
49
49
  LOG.setLevel(log_level)
50
50
 
51
51
  # Primary model initialization
52
- model = initialize_model(args.model, filename_suffix=args.filename_suffix,
53
- verbose=args.verbose > 2)
52
+ try:
53
+ model = initialize_model(args.model, filename_suffix=args.filename_suffix,
54
+ verbose=args.verbose > 2)
55
+ except ValueError as e:
56
+ LOG.error(e)
57
+ LOG.error("You likely do not have enough memory to load the AI model")
58
+ sys.exit(3)
54
59
 
55
60
  # Log file summarizer selection and initialization
56
61
  if args.summarizer == "drain":
@@ -61,7 +66,12 @@ def main():
61
66
 
62
67
  LOG.info("Getting summary")
63
68
 
64
- log = retrieve_log_content(args.file)
69
+ try:
70
+ log = retrieve_log_content(args.file)
71
+ except ValueError as e:
72
+ # file does not exists
73
+ LOG.error(e)
74
+ sys.exit(4)
65
75
  log_summary = extractor(log)
66
76
 
67
77
  ratio = len(log_summary) / len(log.split('\n'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: logdetective
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: Log using LLM AI to search for build/test failures and provide ideas for fixing these.
5
5
  License: Apache-2.0
6
6
  Author: Jiri Podivin
@@ -19,8 +19,8 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
19
  Classifier: Topic :: Software Development :: Debuggers
20
20
  Provides-Extra: server
21
21
  Requires-Dist: drain3 (>=0.9.11,<0.10.0)
22
- Requires-Dist: huggingface-hub (>=0.23.2,<0.24.0)
23
- Requires-Dist: llama-cpp-python (>=0.2.56,<0.3.0)
22
+ Requires-Dist: huggingface-hub (>0.23.2)
23
+ Requires-Dist: llama-cpp-python (>=0.2.56,<0.3.0,!=0.2.86)
24
24
  Requires-Dist: requests (>=2.31.0,<3.0.0)
25
25
  Project-URL: homepage, https://github.com/fedora-copr/logdetective
26
26
  Project-URL: issues, https://github.com/fedora-copr/logdetective/issues
@@ -29,11 +29,21 @@ Description-Content-Type: text/markdown
29
29
  Log Detective
30
30
  =============
31
31
 
32
+ [![PyPI - Version](https://img.shields.io/pypi/v/logdetective?color=blue)][PyPI Releases]
33
+
34
+ [PyPI Releases]: https://pypi.org/project/logdetective/#history
35
+
32
36
  A Python tool to analyze logs using a Language Model (LLM) and Drain template miner.
33
37
 
34
38
  Installation
35
39
  ------------
36
40
 
41
+ ** Fedora 40+ **
42
+
43
+ dnf install logdetective
44
+
45
+ **From Pypi repository**
46
+
37
47
  The logdetective project is published on the the the the the [Pypi repository](https://pypi.org/project/logdetective/). The `pip` tool can be used for installation.
38
48
 
39
49
  First, ensure that the necessary dependencies for the `llama-cpp-python` project are installed. For Fedora, install `gcc-c++`:
@@ -41,8 +51,6 @@ First, ensure that the necessary dependencies for the `llama-cpp-python` project
41
51
  # for Fedora it will be:
42
52
  dnf install gcc-c++
43
53
 
44
- **From Pypi repository**
45
-
46
54
  Then, install the `logdetective` project using pip:
47
55
 
48
56
  # then install logdetective project
@@ -73,6 +81,7 @@ Or if the log file is stored locally:
73
81
  Example you want to use a different model:
74
82
 
75
83
  logdetective https://example.com/logs.txt --model https://huggingface.co/QuantFactory/Meta-Llama-3-8B-Instruct-GGUF/resolve/main/Meta-Llama-3-8B-Instruct.Q5_K_S.gguf?download=true
84
+ logdetective https://example.com/logs.txt --model QuantFactory/Meta-Llama-3-8B-Instruct-GGUF
76
85
 
77
86
 
78
87
  Real Example
@@ -2,11 +2,11 @@ logdetective/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  logdetective/constants.py,sha256=ObrYDQiPvZwCpokLbLQoSY_w_-wHl7l94EkXae7Xgq0,708
3
3
  logdetective/drain3.ini,sha256=ni91eCT1TwTznZwcqWoOVMQcGEnWhEDNCoTPF7cfGfY,1360
4
4
  logdetective/extractors.py,sha256=eRizRiKhC3MPTHXS5nlRKcEudEaqct7G28V1bZYGkqI,3103
5
- logdetective/logdetective.py,sha256=gOAgRqc5_GdqBAcDwpwJLjqIrJzbqujU-9rbk-_oSoE,3267
5
+ logdetective/logdetective.py,sha256=8pCnkXJ2qfSmXGHoKmTichLiI9tMAot3OOge2lgQBuI,3545
6
6
  logdetective/server.py,sha256=GAU6mggoZSf-ER3AHhmd7BKGDLh5ZcsnmkdHTFd_lTU,1715
7
7
  logdetective/utils.py,sha256=XRqVvPbAQ0ZAHGivHhAA1kTY8Tv6JAeSsA7gMMoPz8E,3034
8
- logdetective-0.2.3.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
9
- logdetective-0.2.3.dist-info/METADATA,sha256=KlWaeyLiehfcsnGe5zWg7BMqGRCV0d_L6BIMYGMXVa8,8061
10
- logdetective-0.2.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
11
- logdetective-0.2.3.dist-info/entry_points.txt,sha256=3K_vXja6PmcA8sNdUi63WdImeiNhVZcEGPTaoJmltfA,63
12
- logdetective-0.2.3.dist-info/RECORD,,
8
+ logdetective-0.2.5.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
9
+ logdetective-0.2.5.dist-info/METADATA,sha256=nSobNDJzk6iOUl0oqFRNV9Ha0LLCLDbL8uLsX3aPnWY,8362
10
+ logdetective-0.2.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
11
+ logdetective-0.2.5.dist-info/entry_points.txt,sha256=3K_vXja6PmcA8sNdUi63WdImeiNhVZcEGPTaoJmltfA,63
12
+ logdetective-0.2.5.dist-info/RECORD,,