Python API

Contents

Python API#

This section is generated with Sphinx autodoc directly from the docstrings in the medvision_bm source tree. It documents the importable helpers — the functions and constants you would import when building on top of MedVision (computing metrics, loading and formatting datasets, wiring up trainers).

Note

Most day-to-day use of MedVision happens through the command line, not the Python API — see the Command-line reference for the full list of python -m medvision_bm.* entry points. The modules below are the reusable building blocks those commands are made of.

The heavy machine-learning dependencies (torch, transformers, vllm, …) and the vendored lmms-eval fork are mocked at build time, so signatures render even though those packages are not installed on the docs builder.

Modules by area#

Metrics & parsing

utils.parse_utils — IoU / F1 / MAE / MRE and answer extraction.

parse_utils
Constants

utils.configs — seeds, thresholds, label maps, dataset mappings.

configs
I/O & task status

utils.utils — atomic JSON, task lists, run status tracking.

utils
Data download

utils.data_utils — resolve tasks to configs and fetch datasets.

data_utils
Environment setup

utils.install_utils — install the dataset, the vendored harness, CUDA/vLLM.

install_utils
SFT

sft.sft_utils + sft.sft_prompts — dataset prep, trainers, samplers, prompts.

sft_utils
RFT (verl)

rft.verl.verl_utils + rft.verl.rft_prompts — parquet builders and system prompts.

verl_utils
benchmark pipeline

benchmark.eval_utils, parse_outputs, summarize_* — the scoring backend.

benchmark pipeline