-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Previously trained messages cannot always be matched #48
Comments
Indeed an interesting edge case. I am not sure how acute is it, since another call to I committed two possible ways to solve it:
WDYT? |
Thank you for the quick response and improvements made!
I believe this would indeed solve the problem in my case.
In my case I it is important that I don't modify existing templates after the training phase. The most I could do in case Just as an extra note, I think the current documentation for the
can be found, and this is even more likely here since a restricted search was not run before. Another thing to note is that |
|
I see now I have a bug in |
Fixed. |
Got it now! Thanks again for the quick fixes. |
Changes are available at v0.9.8, released today. |
Observe the following MWE (using the current version
0.9.7
):Since
loadModel start
was previously passed in toparser.add_log_message
, it should be possible to match it later in the "interference" mode.I would expect previously trained messages to always match later on.
As illustrated above, this cannot be guaranteed for arbitrary messages.
I've analyzed what is happening by looking through the source code and came to the following explanation:
parser.match("loadModel start")
is called, there are 2 clusters present with the following templates:<*> start
: This is the cluster that includes the first occurrence ofloadModel start
.loadModel stop
tree_search
is called,loadModel
matches the prefix of 2nd template and 1st template is completely disregarded. (line 131)loadModel start
does NOT exactly matchloadModel stop
and as such no match is found. (line 134)https://github.com/IBM/Drain3/blob/6b724e7651bca2ac418dcbad01602a523a70b678/drain3/drain.py#L121-L135
The reason the first template was modified to include a wildcard (which later prevents the log message from matching), is that
training4Model
includes a number and thus will replaced by a wildcard if no other prefix matches.See: https://github.com/IBM/Drain3/blob/6b724e7651bca2ac418dcbad01602a523a70b678/drain3/drain.py#L196-L199
The following example works perfectly fine therefore:
I'm not sure how this should be optimally handled.
The text was updated successfully, but these errors were encountered: