bencher
Bencher: parameter sweeps, result collection and reports.
Every public name loads on first use (PEP 562 __getattr__), not at import
bencher. Most of the package needs numpy, xarray, param, holoviews and panel, but
some entry points do not: bencher.scorecard only reads summary JSON and renders
HTML. An eager __init__ made import bencher.scorecard load the whole plotting
stack, so a consumer that only renders scorecards paid for all of it.
from bencher import X and bencher.X work as before; the TYPE_CHECKING
block below gives type checkers and IDEs the same names, and
test/test_lazy_init.py keeps it and _EXPORTS in step.
Submodules
- bencher.ab
- bencher.bench_cfg
- bencher.bench_plot_server
- bencher.bench_report
- bencher.bench_runner
- bencher.bencher
- bencher.blob_store
- bencher.cache_management
- bencher.change_stats
- bencher.claims
- bencher.class_enum
- bencher.complete_report
- bencher.evidence
- bencher.evidence_ref
- bencher.evidence_report
- bencher.evidence_stats
- bencher.execution
- bencher.factories
- bencher.file_server
- bencher.gcloud_store
- bencher.git_info
- bencher.history
- bencher.history_transfer
- bencher.identity
- bencher.infographic
- bencher.job
- bencher.launch_env
- bencher.object_store
- bencher.optional_deps
- bencher.optuna_conversions
- bencher.perf_tracker
- bencher.plotting
- bencher.plugins
- bencher.publication_pointers
- bencher.publication_target
- bencher.publishing
- bencher.publishing_cli
- bencher.regression
- bencher.render
- bencher.report_export
- bencher.report_inventory
- bencher.rerun_web_viewer
- bencher.result_collector
- bencher.results
- bencher.run
- bencher.sample_order
- bencher.scorecard
- bencher.sparkline
- bencher.sprt
- bencher.sweep_executor
- bencher.sweep_spec
- bencher.sweep_timings
- bencher.test_timing_report
- bencher.utils
- bencher.utils_rerun
- bencher.utils_rrd
- bencher.variables
- bencher.verdict
- bencher.video_writer
- bencher.worker_job
- bencher.worker_manager
Attributes
Classes
Functions
|
Build a stand-in for a |
|
|
|
Package Contents
- bencher.VideoResult
- bencher._EXPORTS: dict[str, tuple[str, ...]]
- bencher._NAME_TO_MODULE
- bencher._ALIASES
- bencher._RERUN_EXPORTS = ('capture_rerun_rrd', 'capture_rerun_window', 'rerun_to_pane')
- bencher._DEPRECATED_ALIASES
- bencher.__all__
- bencher._requires_rerun(name: str) type
Build a stand-in for a
rerun-only export that is not importable.bencher.utils_rerunis the one module in the package that importsrerunat module scope, so it is the one whose names could go missing. They used to be bound only inside atry/except ModuleNotFoundError: on an install withoutrerun-sdkthey simply did not exist, andbn.capture_rerun_rrdraisedAttributeError: module 'bencher' has no attribute ..., naming neither the optional dependency nor how to get it. It also madebencher’s public surface partial – the statetyreports aspossibly-missing-attribute, which a reader has no way to discharge. The names now always exist; using one without the extra raises anImportErrorthat says what to install.A class rather than a function, so
isinstanceagainst the placeholder stays legal. Deliberately a plain class: an earlier revision gave it a metaclass whose__getattr__raisedImportErrorso attribute access would be branded too, buthasattrandgetattr(x, n, default)only swallowAttributeError, so that turned every defensive feature probe into an uncatchable-by-idiom crash – on exactly the installs least able to diagnose it. All three names here are functions, called rather than read, so there is nothing for such a hook to protect.
- bencher.__getattr__(name: str) Any
- bencher.__dir__() list[str]
- bencher._SHADOWED_BY_SUBMODULE