An extantion library for creatind reports for MLDev
Project description
MLDev Reporting
Welcome to MLDev reporting - library for creating html reports for your experiment. The library provides functionaity for creating reports using Markdown templates and data from your experiment.
Start creating insightful reports today and unlock a clearer understanding of your ML experiments with MLDev reporting.
User Guide
First Step
Install MLDev Reporting using pip
with comand
pip install mldev_reporting
Don't forget to add MLDev Reorting to your
.mldev/stages/__init__.py
file
import mldev_reporting
Second Step
Create an experement using experiment.yml
pipeline: !GenericPipeline
runs:
- !BasicStage
name: report
env:
PYTHONPATH: '${env.PYTHONPATH}:./.mldev'
script:
- mldev run -f ./report.yml
Third Step
Create a report.yml
to configire your report
report: &report !Report
name: "index"
output_dir: "light_report"
template: "./template.md"
theme: "light"
lang: "ru"
report_model:
pipeline: !GenericPipeline
runs:
- *report
name
is the name of your html file. output_dir
is a folder where your report will be located. template
is a link to your tamplate file. theme
is a theme of your report. It can be light | dark | cards
. lang
is the report language. It can be ru
or en
. report_model
is where your report data will go.
Fourth Step
Create a template for the report. repo
is an object wrom with you can access your report data
# Me cool report
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sem elit, tincidunt {{repo.data.result}} consectetur aliquam eget, ornare eget nunc. Aliquam erat purus, rutrum in erat nec, sodales commodo augue. Nullam ante nibh, accumsan sit amet eleifend nec, porttitor vel tellus. Sed dapibus at sapien vel mattis. Ut commodo quam tortor, quis porta erat convallis quis.
## Subtitle 1
{{repo.table}}
## Subtitle 2
{{repo.graphic}}
Fifth Step
Specify your report data. You can do it ather by hand or by loading data from file using !LoadFile
loadfile: &load_json_file !LoadFile
url: "index.json"
loadfile: &load_cvs_file !LoadFile
url: "index.csv"
Now you can add your data to report_model
report: &report !Report
name: "index"
output_dir: "light_report"
template: "./template.md"
theme: "light"
lang: "ru"
report_model:
data: *load_json_file
To create table use this comands
report: &report !Report
name: "index"
output_dir: "light_report"
template: "./template.md"
theme: "light"
lang: "ru"
report_model:
data: *load_json_file
table: !Table
title: "Example Table"
data: *load_cvs_file
To create graphic use this comands
report: &report !Report
name: "index"
output_dir: "light_report"
template: "./template.md"
theme: "light"
lang: "ru"
report_model:
data: *load_json_file
graphic: !Graphic
datasets:
- dataset: *load_cvs_file
x: "x_axis"
y: "y_axis"
name: "Example Graphic"
graphic_type: "line"
Sixth Step
Run the following comand to generate your report
mldev run -f experiment.yml
Documentation
Report Class
Field name | Type | Values | Default Value |
name | string | Report file name | Required |
output_dir | string | Path to the folder where the report will be stored | Required |
template | string | Layout file path | Required |
report_model | object | Report data | Required |
theme | string | Topic | light |
lang | string | Language | en |
Table class
Field name | Type | Values | Default Value |
title | string | Table name | Required |
headers | string / array of strings | Object key if json file is used / Table column headers | Optional |
rows | string / array of arrays of strings | Object key if json file is used / Table rows | Optional |
data | link to data from file | Data from a file in json or csv format | Optional |
widths | string | Column width as a percentage | Optional |
header_rows | Integer | Line number to be used as header | Optional |
Class Graphic
Field name | Type | Values | Default Value |
datasets | array | Graph Datasets | Required |
config | object | Graph Configuration | Empty object |
More detailed information about the datasets can be found on the library page.
LoadFile class
Field name | Type | Values | Default Value |
url | string | File path | Required |
filter_fields | string array | A set of keys whose values will be filtered (for json) | Optional |
filter_columns | string array | A set of columns whose values will be filtered (for csv) | Optional |
Contributing
Please check the CONTRIBUTING.md guide if you'd like to participate in the project, ask a question or give a suggestion.
License
The software is licensed under Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mldev_reporting-0.1.1.tar.gz
.
File metadata
- Download URL: mldev_reporting-0.1.1.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.0rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
bf451b8911e8efb7c414dd89d8cb7518675bf82385f8bedcd209806d1a465726
|
|
MD5 |
0ef8b3138033de296d960bb27215ad3e
|
|
BLAKE2b-256 |
e8c6cb0a45be94c21db69d263ef6e950517cfac3b3ddfa523826229a98f90af3
|
File details
Details for the file mldev_reporting-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: mldev_reporting-0.1.1-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.0rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
70ba5d5fdc8552209b0c5455b2718d86837d251014c5af12842f665607f7d4c9
|
|
MD5 |
92155889d92da79f4f950549d3829794
|
|
BLAKE2b-256 |
9f619997025b378802a44f0a1e75d524486553ae1cb3eba8fc2cd5010dbf8a55
|