Skip to main content
Ctrl+K
yet-another-onnx-builder 0.1.0 documentation - Home yet-another-onnx-builder 0.1.0 documentation - Home
  • API
  • Converters
  • Core
  • Galleries
  • Command Lines
    • Installation
    • Getting Started
    • Miscellaneous
  • GitHub
  • API
  • Converters
  • Core
  • Galleries
  • Command Lines
  • Installation
  • Getting Started
  • Miscellaneous
  • GitHub

Section Navigation

  • -m yobx agg … aggregate statistics from benchmark runs
  • -m yobx dot … convert an onnx model into dot format
  • -m yobx find … find nodes consuming or producing a result
  • -m yobx partition … move layer nodes in local functions
  • -m yobx print … print an onnx model on standard output
  • -m yobx render-gallery … convert a sphinx-gallery example to RST
  • -m yobx run-doc-examples … run all runpython:: and gdot:: examples
  • Command Lines
  • -m yobx render-gallery … convert a sphinx-gallery example to RST

-m yobx render-gallery … convert a sphinx-gallery example to RST#

The command parses a sphinx-gallery Python example file (.py) and writes the equivalent RST source to the corresponding auto_examples_<category>/ folder without executing any code.

For an input file at docs/examples/<category>/plot_foo.py the output is written to docs/auto_examples_<category>/plot_foo.rst. The output directory is created automatically if it does not exist.

Description#

See yobx.helpers._gallery_helper.gallery_to_rst() and yobx._command_lines_parser._gallery_auto_output_path().

    usage: render-gallery [-h] [-v VERBOSE] inputs [inputs ...]
    
    Converts a sphinx-gallery Python example file (.py) to RST without
    executing any code and writes the result to the corresponding
    auto_examples_<category>/ folder.
    
    A sphinx-gallery example file consists of:
      - A module docstring (verbatim RST: title, description, labels, …)
      - Python code blocks separated by ``# %%`` section markers
      - Comment lines following ``# %%`` are treated as RST prose
    
    For an input file at ``docs/examples/<category>/plot_foo.py`` the
    output is written to ``docs/auto_examples_<category>/plot_foo.rst``.
    
    positional arguments:
      inputs                sphinx-gallery Python file(s) to convert to RST.
    
    options:
      -h, --help            show this help message and exit
      -v VERBOSE, --verbose VERBOSE
                            verbosity
    
    examples:
    
        # Convert a single gallery example
        python -m yobx render-gallery docs/examples/core/plot_dot_graph.py
    
        # Convert several examples at once
        python -m yobx render-gallery \
            docs/examples/core/plot_dot_graph.py \
            docs/examples/sklearn/plot_sklearn_pipeline.py

Examples#

Convert a single gallery example:

python -m yobx render-gallery docs/examples/core/plot_dot_graph.py

Convert several examples at once:

python -m yobx render-gallery \\
    docs/examples/core/plot_dot_graph.py \\
    docs/examples/sklearn/plot_sklearn_pipeline.py

previous

-m yobx print … print an onnx model on standard output

next

-m yobx run-doc-examples … run all runpython:: and gdot:: examples

On this page
  • Description
  • Examples

This Page

  • Show Source

Created using Sphinx 9.1.0.

Built with the PyData Sphinx Theme 0.16.1.