Comments (2)
I drafted a bit of markdown for the Postprocess documentation to show my ideas:
Postprocesses
Postprocesses are a feature which was recently added to MLonMCU which is intended to help with automating common tasks for benchmarking and visualizations. These processes mainly operate on the Rows and columns of the report generated after a completed run or session. Their complexity can vary from very minimal utilities to powerful evaluation scripts.
Stages
Currently postprocesses can be applied at two different stages:
- after a
Run
which means you are only operating on a single row of a report - or after a
Session
which has a variety of rows and columns
In the future it might be possible to also insert postprocesses at earlier stages.
Examples
AverageCyclesPostprocess
: average over a number of similar runs (useful for non-deterministic targets)DetailedCyclesPostprocess
: determine the number of cycles required for the model initialization and invocation from two runs with a different--num
valueFlattenConfig
: Turn each dictionary item in theConfig
column into a new Column which makes their values filterableFlattenFeatures
: Convert the list of enabled features into one column per feature with boolean values in every row
Base Types
There are a few abstract base classes integrated in MLonMCU:
AlterColumnsPostprocess
AlterRowsPostprocess
AlterRowsAndColumnsPostprocess
Usage of Postprocesses
Implement custom postprocesses
To extend the list of predefined post-processes with a custom implementation a Python class has to be developed as follows:
TODO
from mlonmcu.postproces import Postprocess, ProcessStage
class MyPostprocess(Postprocess):
def __init__(self, features=None, config=None):
super().__init__("foo", stage=ProcessStage.SESSION, features=features, config=config)
def process(self, data):
pass
It is also possible to inherit another base-class such "AggregatePostprocess" to reuse some of their functionalities.
To use the newly implemented process, it needs to be registered. There are two approaches to do so:
-
Call the registration function manually:
from mlonmcu.postprocess import register_postprocess register_postprocess("foo", MyPostprocess)
-
Use a decorator for the registration. However this option is only available when playing the new postprocess in
mlonmcu/postprocess/postprocesses.py
as the decorators are only processed in this file.@register_postprocess("foo") class MyPostprocess(Postprocess): ...
from mlonmcu.
Done. I just forgot to add POSTRROCESS.md
to the docs...
from mlonmcu.
Related Issues (20)
- [ETISS] Only run get_metrics.py if tracing dynamic memory metrics.
- [Plugins] Provide Example on how to use plugin interface
- [SW] Eliminate all compiler warnings in MLIF
- Support New RVV Targets
- Support for multi-core / multi-hart / cluster targets
- Test 64-bit support in RISC-V targets
- [Infrastructure] Refactor toolchain support
- Support custom (user/feature-defined) stages
- FreeRTOS support
- Add support for non-ML benchmarks HOT 1
- Allow using MLonMCU as MicroTVM backend target
- [TVM][MicroTVM] Finish metascheduler integration
- [TVM][MicroTVM] Finish Autoscheduler integration
- [TVM][MicroTVM] support graph tuner
- Fix 3rd party platform (ESP-IDF and Zephyr)
- Postprocesses very slow due to Python’s GIL HOT 1
- Reduce RAM consumption during MLonMCU Flow
- Avoid Paramiko (SSH) warning HOT 1
- SSHTarget: Only connect once
- Resolve compiler warnings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlonmcu.