DVC render
Project description
dvc-render is a library for rendering data stored in DVC plots format into different output formats, like Vega. It can also generate HTML and MarkDown reports containing multiple plots.
It is used internally by DVC, DVCLive, and Studio.
Features
Renderers
Take data stored in DVC plots format alongside plot properties in order to render a plot in different formats.
Reports
Take multiple renderers and build an HTML or MarkDown report.
Templates
Support for rendering Vega plots using custom of pre-defined templates.
Requirements
The basic usage of rendering Vega Plots doesn’t have any dependencies outside Python>=3.8.
Additional features are specified as optional requirements:
Installation
You can install DVC render via pip from PyPI:
$ pip install dvc-render
Usage
Renderer & Templates
from dvc_render import VegaRenderer
properties = {"template": "confusion", "x": "predicted", "y": "actual"}
datapoints = [
{"predicted": "B", "actual": "A"},
{"predicted": "A", "actual": "A"},
]
renderer = VegaRenderer(datapoints, "foo", **properties)
plot_content = renderer.get_filled_template()
plot_content contains a valid Vega plot using the confusion matrix template.
Report
from dvc_render import render_html
render_html([renderer], "report.html")
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the Apache 2.0 license, DVC render is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
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 dvc-render-1.0.0.tar.gz
.
File metadata
- Download URL: dvc-render-1.0.0.tar.gz
- Upload date:
- Size: 37.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64be22457a92d7c7983de89cb5c4da2d27e289d10f4ee5d4c51ba885ad1c7762 |
|
MD5 | 30b5507863601466db0e29af022e5a34 |
|
BLAKE2b-256 | 5c369fc411bdb829b4f65ea3b9809e922ea9c5fa98880650fff8dd9753210a5a |
File details
Details for the file dvc_render-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: dvc_render-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08ffd17c1de07fce3440a7082c18f1d7f9dc156e44b42f982f28938fb27b1376 |
|
MD5 | 9a1e2796249b32e0f8b8ea44308d79ac |
|
BLAKE2b-256 | 6683a027958b9511b72bc15e7c4c656ae507f37ead38957c16f2d9c0c405a7c0 |