fedora-copr / logdetective

Analyze logs using Language Model (LLM) and Drain template miner.
Apache License 2.0
5 stars 8 forks source link

user friendly logging - INFO is default level, add -q and progressbar #15

Closed xsuchy closed 4 months ago

xsuchy commented 4 months ago

Previously the logdetective does not print anything for long time and seems to be stuck. I changed default level to INFO. I added code to have meaningfull use of -v and not require -vvvvvvvvvv to get to INFO level. And I added progressbar when downloading the model. For integration I added --quite that surpress logging and only print result.

xsuchy commented 4 months ago

I used python3-progress-1.6-11.fc40.noarch and it works with that.

$ python
Python 3.12.2 (main, Feb 21 2024, 00:00:00) [GCC 14.0.1 20240217 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import progressbar
>>> progressbar.ProgressBar
<class 'progressbar.bar.ProgressBar'>
xsuchy commented 4 months ago

Adding progress into dependencies, should be ideally through poetry add progress, this also pins the version to sensible default and updates lockfile for faster installation.

Updated.

jpodivin commented 4 months ago

progressbar.ProgressBar

It doesn't work on 39 with python3-progress-1.6-9.fc39. And neither does it work with the one installed from PyPi. I suppose there must be some downstream patches between 1.6-9 and 1.6-11. I don't really know why would there be. But it does show that we can't rely on the API being stable between versions :/

Python 3.12.2 (main, Feb 21 2024, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import progressbar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'progressbar'
>>> 
xsuchy commented 4 months ago

My fault:

$ python
Python 3.12.2 (main, Feb 21 2024, 00:00:00) [GCC 14.0.1 20240217 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import progressbar
>>> progressbar.__file__
'/usr/lib/python3.12/site-packages/progressbar/__init__.py'
>>> 
$ rpm -qf /usr/lib/python3.12/site-packages/progressbar/__init__.py
python3-progressbar2-3.53.2-11.fc40.noarch