LogClass icon indicating copy to clipboard operation
LogClass copied to clipboard

I can't find "./Data/RAS_LOGS" mentioned by Quick Start in project files. Where did it come from?

Open Millet-Sea opened this issue 3 years ago • 2 comments

And when I try to run the code ,it comes to an error:

(venv) E:\LogClass\LogClass-master>python -m logclass --train --kfold 3 --logs_type "bgl" --raw_logs "data/open_source_logs" --report macro

Experiment ID: 3077882225 -------------------------------------params------------------------------------- Beginning experiment using the following configuration:

           report: ['macro']
            train: True
            force: False
         base_dir: E:\LogClass\LogClass-master\output
        logs_type: bgl
    healthy_label: unlabeled
         features: ['tfilf']
    binary_classifier: pu_learning
    multi_classifier: svm
             swap: False
         raw_logs: data\open_source_logs
            kfold: 3
             logs: E:\LogClass\LogClass-master\output\preprocessed_logs\bgl.txt
               id: 3077882225
           id_dir: E:\LogClass\LogClass-master\output\logclass_bgl_3077882225
       models_dir: E:\LogClass\LogClass-master\output\logclass_bgl_3077882225\models
     features_dir: E:\LogClass\LogClass-master\output\logclass_bgl_3077882225\features
      results_dir: E:\LogClass\LogClass-master\output\logclass_bgl_3077882225\results

Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "E:\LogClass\LogClass-master\logclass.py", line 199, in main() File "E:\LogClass\LogClass-master\logclass.py", line 188, in main preprocess = preprocess_registry.get_preprocessor(params['logs_type']) File "E:\LogClass\LogClass-master\preprocess\registry.py", line 20, in get_preprocessor return _PREPROCESSORS[data_src] KeyError: 'bgl'

Is there anything missing?

Millet-Sea avatar Jun 09 '21 04:06 Millet-Sea

I've had the same error and (as the trace suggests) this is because the preprocessor key is missing from the dictionary. I tracked this down to the __init__.py file that does not automatically execute... I found a quick workaround by simply inserting to the logclass.py the scripts that register the preprocessors.

from preprocess import bgl_preprocessor
from preprocess import open_source_logs

However, the are more hurdles along the way.. pity that this work is so difficult to reproduce.

yurypal avatar Aug 07 '21 13:08 yurypal

Regarding the RAS_LOGS. I found them here (from the reference in the README file). Using this data and after quite a bit of tinkering, I finally got to run the example successfully.

yurypal avatar Aug 07 '21 14:08 yurypal