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

NewMatchPathValueComboDetector: Error in persistence when missing values occur #1314

Open
landauermax opened this issue Apr 19, 2024 · 1 comment · May be fixed by #1321
Open

NewMatchPathValueComboDetector: Error in persistence when missing values occur #1314

landauermax opened this issue Apr 19, 2024 · 1 comment · May be fixed by #1321
Assignees
Labels
bug Something isn't working high High priority issue
Milestone

Comments

@landauermax
Copy link
Contributor

Running the NewMatchPathValueComboDetector with allow_missing_values set to True and then having both normal values and missing values (None) in the data results in an error when persisting:

Traceback (most recent call last):
  File "/usr/bin/aminer", line 794, in <module>
    main()
  File "/usr/bin/aminer", line 479, in main
    run_analysis_child(aminer_config, program_name)
  File "/usr/bin/aminer", line 89, in run_analysis_child
    child_return_status = child.run_analysis(3)
  File "/usr/lib/logdata-anomaly-miner/aminer/AnalysisChild.py", line 459, in run_analysis
    PersistenceUtil.persist_all()
  File "/usr/lib/logdata-anomaly-miner/aminer/util/PersistenceUtil.py", line 86, in persist_all
    component.do_persist()
  File "/usr/lib/logdata-anomaly-miner/aminer/analysis/NewMatchPathValueComboDetector.py", line 159, in do_persist
    PersistenceUtil.store_json(self.persistence_file_name, sorted(list(self.known_values_set)))
TypeError: '<' not supported between instances of 'NoneType' and 'bytes'

I assume this is because both None and other values are in the known_values_set, which cannot be sorted. Sorting is not necessary since this is a set, not a list.

@landauermax landauermax added bug Something isn't working high High priority issue labels Apr 19, 2024
@landauermax landauermax added this to the 2.6.0 milestone Apr 19, 2024
@ernstleierzopf
Copy link
Contributor

Running the NewMatchPathValueComboDetector with allow_missing_values set to True and then having both normal values and missing values (None) in the data results in an error when persisting:

Traceback (most recent call last):
  File "/usr/bin/aminer", line 794, in <module>
    main()
  File "/usr/bin/aminer", line 479, in main
    run_analysis_child(aminer_config, program_name)
  File "/usr/bin/aminer", line 89, in run_analysis_child
    child_return_status = child.run_analysis(3)
  File "/usr/lib/logdata-anomaly-miner/aminer/AnalysisChild.py", line 459, in run_analysis
    PersistenceUtil.persist_all()
  File "/usr/lib/logdata-anomaly-miner/aminer/util/PersistenceUtil.py", line 86, in persist_all
    component.do_persist()
  File "/usr/lib/logdata-anomaly-miner/aminer/analysis/NewMatchPathValueComboDetector.py", line 159, in do_persist
    PersistenceUtil.store_json(self.persistence_file_name, sorted(list(self.known_values_set)))
TypeError: '<' not supported between instances of 'NoneType' and 'bytes'

I assume this is because both None and other values are in the known_values_set, which cannot be sorted. Sorting is not necessary since this is a set, not a list.

Sorting of sets is not necessary, but it also is no problem, because sets are expected to be unsorted. Sorting these sets before persisting gives more reproducable results, which helps with testing. I think the performance overhead is not too big of a deal.

@ernstleierzopf ernstleierzopf linked a pull request May 6, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high High priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants