Conversation
…mprove-mlflow-detection
…s is set to false
…s is set to false
JiwaniZakir
left a comment
There was a problem hiding this comment.
In init_log_file(), the file handle self.log_file is opened with open(self.log_path, "w") but there's no visible close() call — this is a resource leak. Since FlowMLDetection is a long-running module, this should use a context manager or at minimum close the handle in the module's shutdown() or __del__ method.
There's also a latent AttributeError bug: if self.mode is neither "train" nor "test" (e.g., a misconfiguration), init_log_file falls through without setting self.log_file, yet write_to_log only guards on self.enable_logs — so any call to write_to_log in that scenario will raise AttributeError: 'FlowMLDetection' object has no attribute 'log_file'. Adding an else branch or initializing self.log_file = None with a corresponding guard in write_to_log would make this robust.
The default mode in config/slips.yaml was silently flipped from test to train — this is a potentially disruptive change for existing deployments where users expect detection behavior out of the box, not model training. This warrants a prominent note in the changelog or at minimum a comment in the config explaining why train is now the default.
The added flowmlanalysis.ipynb notebook contains two completely empty code cells after the imports, suggesting it was committed prematurely; it adds repository noise without contributing anything functional.
No description provided.