Skip to content
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

[BUG]: undefined variable error in examples/log_parsing/postprocessing.py #1765

Closed
2 tasks done
dagardner-nv opened this issue Jun 27, 2024 · 0 comments · Fixed by #1809
Closed
2 tasks done

[BUG]: undefined variable error in examples/log_parsing/postprocessing.py #1765

dagardner-nv opened this issue Jun 27, 2024 · 0 comments · Fixed by #1809
Assignees
Labels
bug Something isn't working

Comments

@dagardner-nv
Copy link
Contributor

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 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

  • I agree to follow Morpheus' Code of Conduct
  • I have searched the open bugs and have found no duplicates for this bug report
@dagardner-nv dagardner-nv added the bug Something isn't working label Jun 27, 2024
@dagardner-nv dagardner-nv self-assigned this Jul 11, 2024
@dagardner-nv dagardner-nv moved this from Todo to In Progress in Morpheus Boards Jul 11, 2024
@morpheus-bot-test morpheus-bot-test bot moved this from In Progress to Review - Ready for Review in Morpheus Boards Jul 11, 2024
@rapids-bot rapids-bot bot closed this as completed in a527ee7 Jul 25, 2024
@github-project-automation github-project-automation bot moved this from Review - Ready for Review to Done in Morpheus Boards Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant