logpai / Drain3

A robust streaming log template miner based on the Drain algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

module-wise config

a-sapronov opened this issue · comments

Dear All,

Thanks for this nice implementation of the algo. I have one question regarding config treatment in the package.

The config object is created in the root of every module separately, which seems not to be a problem when the code is run from the command line, or once-executed script. However, this creates a nuisance when I use this library in a jupyter notebook. The objects are created in the cells where I import drain modules, and the version of config file is read at that time. Later in the notebook I'm trying to adjust the config values, but it doesn't get updated, because the module is already loaded. The only way I can use updated configuration is to reset a kernel and re run all the stuff again, which makes the try-research concept of the notebook useless.

I'd like to promote an idea to move the reading of the config file into init , so it's at least can be updated at the time of object creation.

Thanks for your help,
Andrey.

Hi Andrey,

I took the opportunity to do a minor refactoring of configuration handling. The config file is now read in the TemplateMiner.init() function as you suggested, so you can change it before you init TemplateMiner.
v0.7.7 is available at PyPI.

Hi David,

Thanks for the changes, it works smoothly for me.