In LogParsingPostProcessingStage::__get_label_dicts there is a possibility that the new_label and new_confidence variables are undefined.
The code defines these inside an if block inside of a for-loop, and assumes one of two situations is true:
1) The if statement evaluated to True and are defined
2) The if statement evaluated to False but the variables were defined in a previous iteration of the loop.
There are situations where neither of the above are true and the code fails.
This was encountered recently parsing a new dataset that was not in the format expected.
We should either (or both):
Define both variables outside the loop and handle these
Detect that the input file does not match the format and raise a reasonable error
Minimum reproducible example
No response
Relevant log output
Click here to see error details
[Paste the error here, it will be hidden by default]
Full env printout
Click here to see environment details
[Paste the results of print_env.sh here, it will be hidden by default]
Other/Misc.
No response
Code of Conduct
[X] I agree to follow Morpheus' Code of Conduct
[X] I have searched the open bugs and have found no duplicates for this bug report
Version
24.06
Which installation method(s) does this occur on?
Source
Describe the bug.
In
LogParsingPostProcessingStage::__get_label_dicts
there is a possibility that thenew_label
andnew_confidence
variables are undefined.The code defines these inside an
if
block inside of a for-loop, and assumes one of two situations is true: 1) Theif
statement evaluated toTrue
and are defined 2) Theif
statement evaluated toFalse
but the variables were defined in a previous iteration of the loop.There are situations where neither of the above are true and the code fails. This was encountered recently parsing a new dataset that was not in the format expected.
We should either (or both):
Minimum reproducible example
No response
Relevant log output
Click here to see error details
Full env printout
Click here to see environment details
Other/Misc.
No response
Code of Conduct