neural_compressor.ux.utils.parser
¶
Parsers for log files.
Module Contents¶
Classes¶
Parser abstract class. |
|
Parser class is responsible for parsing optimization log files. |
|
Parser class is responsible for parsing performance benchmark log files. |
|
Parser class is responsible for parsing accuracy benchmark log files. |
|
Benchmark parser factory. |
|
Parser class is responsible for parsing profiling log files. |
- class neural_compressor.ux.utils.parser.Parser(logs: list)¶
Bases:
abc.ABC
Parser abstract class.
- abstract property patterns: dict¶
Set patterns to get metrics from lines.
- abstract process() Dict[str, Any] ¶
Process log files.
- class neural_compressor.ux.utils.parser.OptimizationParser(logs: list)¶
Bases:
Parser
Parser class is responsible for parsing optimization log files.
- property patterns: dict¶
Set patterns to get metrics from lines.
- process() Dict[str, Any] ¶
Process files.
- class neural_compressor.ux.utils.parser.PerformanceParser(logs: list)¶
Bases:
Parser
Parser class is responsible for parsing performance benchmark log files.
- property patterns: dict¶
Set patterns to get metrics from lines.
- process() Dict[str, Any] ¶
Process files.
- static update_partial(partial: Dict[str, List], parsed_result: Dict[str, float | int]) Dict[str, List] ¶
Update partial entries.
- summarize_partial(partial: dict) dict ¶
Calculate final values.
- static summarize_value(key: str, value: list) float | int ¶
Calculate final value.
- class neural_compressor.ux.utils.parser.AccuracyParser(logs: list)¶
Bases:
Parser
Parser class is responsible for parsing accuracy benchmark log files.
- property patterns: dict¶
Set patterns to get metrics from lines.
- process() Dict[str, Any] ¶
Process accuracy logs.
- class neural_compressor.ux.utils.parser.BenchmarkParserFactory¶
Benchmark parser factory.
- class neural_compressor.ux.utils.parser.ProfilingParser(logs: list)¶
Bases:
Parser
Parser class is responsible for parsing profiling log files.
- property patterns: dict¶
Set patterns to get metrics from lines.
- static unify_time(string_value: str) float ¶
Unify time with unit to micro seconds float value.
- Parameters:
string_value (str) – time value with unit, e.g. 125.6ms
- Returns:
time value in microseconds
- Return type:
float
- process() Dict[str, Any] ¶
Process profiling logs.