File tree Expand file tree Collapse file tree 5 files changed +63
-4
lines changed
Expand file tree Collapse file tree 5 files changed +63
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ pytest src/metrax
2121Develop the docs locally:
2222
2323```
24+ pip install -r ./docs/requirements.txt
2425sphinx-build ./docs /tmp/metrax_docs
2526python -m http.server --directory /tmp/metrax_docs
2627```
Original file line number Diff line number Diff line change 1515"""Configuration file for the Sphinx documentation builder."""
1616
1717import sphinx_rtd_theme
18+ import os
19+ import sys
20+
21+ # Import local version of metrax.
22+ sys .path .insert (0 , os .path .abspath ('../src' ))
23+ print ('DEBUG: PATH' , sys .path )
1824
1925# -- Project information
2026
2127project = 'metrax'
2228copyright = '2025, The metrax Authors'
2329author = 'The metrax Authors'
2430
25- release = '0.0.2 '
26- version = '0.0.2 '
31+ release = ''
32+ version = ''
2733
2834
2935# -- General configuration
3440 'sphinx.ext.intersphinx' ,
3541 'sphinx.ext.napoleon' ,
3642 'sphinx_rtd_theme' ,
43+ 'sphinx.ext.autodoc' ,
44+ 'sphinx.ext.autosummary' ,
3745]
3846
3947intersphinx_mapping = {
5058
5159# -- Options for EPUB output
5260epub_show_urls = 'footnote'
61+
62+
63+ # -- Extension configuration
64+
65+ autodoc_member_order = 'bysource'
66+
67+ autodoc_default_options = {
68+ 'members' : None ,
69+ 'undoc-members' : True ,
70+ 'show-inheritance' : True ,
71+ 'special-members' : '__call__, __init__' ,
72+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,38 @@ metrax Documentation
33
44**metrax ** provides common evaluation metric implementations for JAX.
55
6- .. note ::
6+ Getting Started
7+ ---------------
78
8- This project is under active development.
9+ Metrics are based on `clu.Metric `.
10+
11+ .. code-block ::
12+
13+ # Run model:
14+ y_true, y_pred = model(inputs)
15+
16+ # Create metric class:
17+ metric = metrics.Precision.from_model_output(
18+ predictions=y_pred,
19+ labels=y_true,
20+ )
21+
22+ # Update metric with new inputs:
23+ metric = metric.merge(
24+ metrics.Precision.from_model_output(
25+ predictions=y_pred,
26+ labels=y_true,
27+ )
28+ )
29+
30+ # Get result:
31+ result = metric.compute()
32+
33+
34+ Metrax API
35+ ==========
36+
37+ .. toctree ::
38+ :maxdepth: 2
39+
40+ metrax API <metrax >
Original file line number Diff line number Diff line change 1+ metrax
2+ ======
3+
4+ .. automodule :: metrax
Original file line number Diff line number Diff line change 11sphinx-rtd-theme == 1.3.0rc1
2+ clu == 0.0.12
3+ scikit-learn == 1.6.1
You can’t perform that action at this time.
0 commit comments