Conversation
# Conflicts: # uv.lock
|
looking good so far! But we need to discuss about the notebooks, because I dont know if we want them in the main branch. They present multiple issues:
|
|
@ipmach regarding the notebooks, that would probably be the cleanest solution, but I personally think they are the easiest way to show how smth works. I will remove them for now. Maybe we can think of it at a later point. |
Reorganize trackers.py into a proper package with separate modules for event tracking, multi-tracking, stability classification and conversion. Also removes unused demo notebooks and fixes method signatures for consistency. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
||
| def test_initialization(self): | ||
| """Test EventVariableTrackerData initialization.""" | ||
| evt = EventTracker(tracker_type=SingleStabilityTracker) |
|
|
||
| def test_add_data(self): | ||
| """Test adding data.""" | ||
| evt = EventTracker(tracker_type=SingleStabilityTracker) |
|
|
||
| def test_get_variables(self): | ||
| """Test retrieving variable names.""" | ||
| evt = EventTracker(tracker_type=SingleStabilityTracker) |
|
|
||
| def test_get_stable_variables(self): | ||
| """Test retrieving stable variables.""" | ||
| evt = EventTracker(tracker_type=SingleStabilityTracker) |
|
|
||
| def test_integration_with_stability_tracker(self): | ||
| """Test full integration with SingleVariableTracker.""" | ||
| evt = EventTracker(tracker_type=SingleStabilityTracker) |
|
|
||
| def test_to_data_with_variable_level(self): | ||
| """Test to_data method with variable level (default).""" | ||
| evt = EventTracker(tracker_type=SingleStabilityTracker, feature_type="variable") |
|
|
||
| def test_to_data_with_variable_combo_level(self): | ||
| """Test to_data method with variable_combo level.""" | ||
| evt = EventTracker(tracker_type=SingleStabilityTracker, feature_type="variable_combo") |
|
|
||
| def test_to_data_integration_with_add_data(self): | ||
| """Test that to_data and add_data work together correctly.""" | ||
| evt = EventTracker(tracker_type=SingleStabilityTracker, feature_type="variable") |
|
|
||
| def test_conversion_function_assignment(self): | ||
| """Test that converter is correctly assigned based on feature_type.""" | ||
| evt_var = EventTracker(tracker_type=SingleStabilityTracker, feature_type="variable") |
| def test_conversion_function_assignment(self): | ||
| """Test that converter is correctly assigned based on feature_type.""" | ||
| evt_var = EventTracker(tracker_type=SingleStabilityTracker, feature_type="variable") | ||
| evt_combo = EventTracker(tracker_type=SingleStabilityTracker, feature_type="variable_combo") |
1c46752 to
91c325d
Compare
There was a problem hiding this comment.
This should be add it in the docs branch once that one is merge. I suggest remove it for now and add it later.
ipmach
left a comment
There was a problem hiding this comment.
The PR is too big, it has many changes and many are not related with the topic. In the future please focus in smaller PR because it breaks the Agile principle and it makes code harder to maintain because it its harder to review and follow.
I added different comments in the files, the main highlights are:
- The folder common is not a good place for persistency. It should be part of utils because it is an ad on, not a common component.
- I did not review persistency files as is a big review and not a critical component. Is the first version so probably will be future changes so I am not worry. I am ok leaving it like this for now.
- Critical the datasets that are not from AIT should not be part of AIT software. They should be remove from the repository. It is ok adding a script to download them, but should not be part of the repository.
- Relevant classes like CoreDetector, ComboDetector, NewValueDetector need minor improvements to increase readability.
- Parsers modifications are weird that were added. Some functions inside the matcher are terrible for performance and redability. I suggest removing parsers changes from the PR as well as the changes in the reader.
I did not yet test it locally but I think there are many changes that need to be done before approval.
It is clear that you put a lot of work in this and I do not want to discourage you. The configuration engine will be definitely a great feature in DetectMate. But it needs a little of fine-tunning.
Best,
Andre
There was a problem hiding this comment.
correct_single_template is a terrible function in readability and efficiency. The overiteration of templates is really inefficient.
Also it does nothing to do with the PR topic
There was a problem hiding this comment.
This function was taken from LogBatcher which improves template quality significantly which is also proven in literatue. This was solely for the demo and will come in a separate PR. I had to change TemplateMatcher since it didn't work anymore after your changes ...
There was a problem hiding this comment.
It's an abstraction that makes sure that the repr functions of classes have a unified representation
There was a problem hiding this comment.
We do not own this dataset. It should be remove from the repository.
There was a problem hiding this comment.
We do not own this dataset. It should be remove from the repository.
There was a problem hiding this comment.
We do not own this dataset. It should be remove from the repository.
There was a problem hiding this comment.
Do we use polaris? Because if not is a strict dependency because it does not have big support in many hardwares-
There was a problem hiding this comment.
As we discussed previously, no we dont need it and it should be removed as a strict dependency. We can add it as an optional dependency in pyproject.toml + lazy import in the class
|
@ipmach see this PR more as a draft. It took simply too long with all the changes that were necessary and the demos which made it messy but I just went with it. I wanted to have inital feedback from you. I'll closee the PR and create new smaller ones, improved with your feedback |
|
@viktorbeck98 Yes, I get it. It is hard to separate things when we have to develop the tool and do the demos at the same time. Let me know if you any questions from my feedback! :) |
First version for the persistency and the configuration engine. The core of the configuration engine is integrated in the persistency. So far I implemented:
Some todos: