yasfpy.benchmark.mstm4#
Convenience wrapper around the MSTM4 binary.
Provides a manager object that prepares inputs, launches MSTM4, and parses outputs for comparison with YASF.
Attributes#
Classes#
Manage MSTM4 benchmark runs. |
Module Contents#
- yasfpy.benchmark.mstm4.project_root#
- class yasfpy.benchmark.mstm4.MSTM4Manager(/, **data)#
Bases:
pydantic.BaseModelManage MSTM4 benchmark runs.
The manager constructs an MSTM4 input file from a YASF configuration, runs the external MSTM4 binary, and parses the output into a structured dict.
Notes
This class is designed for benchmarking/comparisons with YASF. It does not aim to expose the full MSTM4 input space.
- workdir: pathlib.Path | None = None#
- log: logging.Logger | None = None#
- config: yasfpy.config.Config | None = None#
- model_config: ClassVar[pydantic.ConfigDict]#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(__context)#
Finalize configuration after Pydantic initialization.
Notes
This resolves
workdirand constructsyasfpy.config.Configfrom the configured paths and scaling factors.
- clean()#
Delete generated MSTM4 input/output files.
- run(runner=None, cleanup=True, *, silent=False, parse=True)#
Run MSTM4 and optionally parse output.
- Parameters:
runner – Optional
pyperf.Runnerto benchmark execution.cleanup – If True, delete generated files after the run.
silent – If True, suppress subprocess output.
parse – If True, parse the output file into
self.output.
- read_output()#
Parse the MSTM4 output file into
output.
- export(cleanup=False)#
Export MSTM4 results to a YASF
yasfpy.export.Exportbundle.- Parameters:
cleanup – If True, remove generated MSTM4 files after exporting.
- yasfpy.benchmark.mstm4.workdir_tmp#