Skip to content

Add new parsers - #446

Open
ipmach wants to merge 24 commits into
developmentfrom
feat/parsers
Open

ipmach wants to merge 24 commits into
developmentfrom
feat/parsers

Conversation

@ipmach

@ipmach ipmach commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Task

Add new parsers to the party!

  • New parsers: Brain, AECID_PG
  • Add federation to Drain, Brain and AECID_PG
  • Improve parser documentation.
  • Improve overall grammar and syntax

Description

How Has This Been Tested?

Checklist

  • This Pull-Request goes to the development branch.
  • I have successfully run prek locally.
  • I have added tests to cover my changes.
  • I have linked the issue-id to the task-description.
  • I have performed a self-review of my own code.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@ipmach ipmach changed the title Feat/parsers Add new parsers Nov 20, 2026

@viktorbeck98 viktorbeck98 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see Brain and AECID-PG in, and Drain got a lot shorter with the shared base.

Main things before merging: auto-config doesn't take effect (and the Brain grid breaks it once it does), aggregation shifts eventIDs, and a few DL tests got switched off. Details inline.

Two things I couldn't put inline:

  • parsers/__init__.py doesn't export BrainParser / AECIDPGParser, so selectComponent fails with Unknown method type 'brain_parser' (same for aecid_pg_parser). Drain works.
  • base_detectors and base_alert_aggregation moved to bases/ without a re-export, so from detectmatelibrary.base_detectors import ... breaks for anyone upgrading (we have that in our experiment code). docs/auxiliar/persistency.md:229 still uses the old path too. Could we keep a small shim for a release or two?

Comment on lines +89 to +93
def set_configuration(self) -> None:
self.config = _get_best_config(
self.config_buffer, config=self.config, init_parser=self.init_parser
)
self.config_buffer = []

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.config gets the tuned values, but self.parser_gen is still the one built in __init__ from the original config, so auto-config has no effect. Rebuilding it here should do it:

self.parser_gen = self.init_parser(self.config)

The tests only check config.*, maybe assert on parser_gen too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mm... We can, but o we need it?

  • I update the init file
  • I move persistency code to a python file. Now if the path do not match it will raise an error

Comment thread src/detectmatelibrary/parsers/brain.py Resolved
Comment thread tests/test_utils/test_deep_learning.py Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants