mlonmcu.session.postprocess package

Submodules

mlonmcu.session.postprocess.postprocess module

Definitions of base classes for MLonMCU postprocesses.

class mlonmcu.session.postprocess.postprocess.Postprocess(name, config=None, features=None)[source]

Bases: object

Abstract postprocess.

DEFAULTS = {}
FEATURES = {}
OPTIONAL = {}
REQUIRED = {}
process_features(features)[source]

Utility which handles postprocess_features.

class mlonmcu.session.postprocess.postprocess.RunPostprocess(name, config=None, features=None)[source]

Bases: Postprocess

Run postprocess which is applied to a single run.

post_run(report, artifacts)[source]

Called at the end of a run.

class mlonmcu.session.postprocess.postprocess.SessionPostprocess(name, config=None, features=None)[source]

Bases: Postprocess

Session postprocess which is applied to multiple runs at the end of a session. (multi-row)

post_session(report)[source]

Called at the end of a session.

mlonmcu.session.postprocess.postprocesses module

Collection of (example) postprocesses integrated in MLonMCU.

class mlonmcu.session.postprocess.postprocesses.AnalyseCoreVCountsPostprocess(features=None, config=None)[source]

Bases: RunPostprocess

Counting static instructions.

DEFAULTS = {'to_df': False, 'to_file': True}
post_run(report, artifacts)[source]

Called at the end of a run.

property to_df

Get to_df property.

property to_file

Get to_file property.

class mlonmcu.session.postprocess.postprocesses.AnalyseDumpPostprocess(features=None, config=None)[source]

Bases: RunPostprocess

Counting static instructions.

DEFAULTS = {'to_df': False, 'to_file': True}
post_run(report, artifacts)[source]

Called at the end of a run.

property to_df

Get to_df property.

property to_file

Get to_file property.

class mlonmcu.session.postprocess.postprocesses.AnalyseInstructionsPostprocess(features=None, config=None)[source]

Bases: RunPostprocess

Counting specific types of instructions.

DEFAULTS = {'corev': False, 'groups': True, 'seq_depth': 3, 'sequences': True, 'to_df': False, 'to_file': True, 'top': 10}
property corev

Get corev property.

property groups

Get groups property.

post_run(report, artifacts)[source]

Called at the end of a run.

property seq_depth

get seq_depth property.

property sequences

get sequences property.

property to_df

Get to_df property.

property to_file

Get to_file property.

property top

get top property.

class mlonmcu.session.postprocess.postprocesses.Artifact2ColumnPostprocess(features=None, config=None)[source]

Bases: RunPostprocess

Postprocess for converting artifacts to columns in the report.

DEFAULTS = {'file2colname': {}}
property file2colname

Get file2colname property.

post_run(report, artifacts)[source]

Called at the end of a run.

class mlonmcu.session.postprocess.postprocesses.Bytes2kBPostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

Postprocess which can be used to scale the memory related columns from Bytes to KiloBytes.

post_session(report)[source]

Called at the end of a session.

class mlonmcu.session.postprocess.postprocesses.CompareRowsPostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

TODO

DEFAULTS = {'baseline': 0, 'group_by': None, 'invert': False, 'percent': False, 'substract': False, 'to_compare': None}
property baseline

Get baseline property.

property group_by

Get group_by property.

property invert

Get invert property.

property percent

Get percent property.

post_session(report)[source]

Called at the end of a session.

property substract

Get substract property.

property to_compare

Get to_compare property.

class mlonmcu.session.postprocess.postprocesses.Config2ColumnsPostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

Postprocess which can be used to transform (explode) the ‘Config’ Column in a dataframe for easier filtering.

DEFAULTS = {'drop': True, 'limit': []}
property drop

Get drop property.

property limit

Get limit property.

post_session(report)[source]

Called at the end of a session.

class mlonmcu.session.postprocess.postprocesses.Features2ColumnsPostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

Postprocess which can be used to transform (explode) the ‘Features’ Column in a dataframe for easier filtering.

DEFAULTS = {'drop': True, 'limit': []}
property drop

Get drop property.

property limit

Get limit property.

post_session(report)[source]

Called at the end of a session.

class mlonmcu.session.postprocess.postprocesses.FilterColumnsPostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

Postprocess which can be used to drop unwanted columns from a report.

DEFAULTS = {'drop': None, 'drop_const': False, 'drop_empty': False, 'drop_nan': False, 'keep': None}
property drop

Get drop property.

property drop_const

Get drop_const property.

property drop_empty

Get drop_empty property.

property drop_nan

Get drop_nan property.

property keep

Get keep property.

post_session(report)[source]

Called at the end of a session.

class mlonmcu.session.postprocess.postprocesses.MyPostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

TODO

DEFAULTS = {}
post_session(report)[source]

TODO

class mlonmcu.session.postprocess.postprocesses.PassConfig2ColumnsPostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

Postprocess which can be used to transform (explode) the TVM pass_config into separate columns. requires prior Config2Columns pass.

post_session(report)[source]

Called at the end of a session.

class mlonmcu.session.postprocess.postprocesses.RenameColumnsPostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

Postprocess which can rename columns based on a provided mapping.

DEFAULTS = {'mapping': {}, 'merge': True}
property mapping
property merge
post_session(report)[source]

Called at the end of a session.

class mlonmcu.session.postprocess.postprocesses.VisualizePostprocess(features=None, config=None)[source]

Bases: SessionPostprocess

A very simple example on how to generate a plot of the results using a postprocess.

DEFAULTS = {'format': 'png'}
property format

Get format property.

post_session(report)[source]

Called at the end of a session.

mlonmcu.session.postprocess.postprocesses.match_rows(df, cols)[source]

Helper function to group similar rows in a dataframe.

Module contents

MLonMCU postprocess submodule