summary.txt と履歴の読み込み¶
load_run、RunResult、BatchHistory と各データ型は 公開 API: beach を参照してください。
summary.txt の名前付きキーを扱う場合は次の関数と定義表を使います。
Shared parser and core contract for Fortran summary.txt files.
- beach.io.summary.parse_summary_text(text, *, source='summary.txt')[ソース]¶
Parse key/value summary text and reject duplicate normalized keys.
- パラメータ:
text (str)
source (str)
- 戻り値の型:
dict[str, str]
- beach.io.summary.load_summary_file(path, *, required_keys=())[ソース]¶
Load one summary file and enforce its required-key subset.
- パラメータ:
path (Path)
required_keys (Iterable[str])
- 戻り値の型:
dict[str, str]
- class beach.io.summary.SummaryField(key, attribute, group, kind, default=None, required=False)[ソース]¶
One persisted summary scalar and its destination in
RunResult.kindstates the scalar contract;nonnegative_floatandnonnegative_intreject negative values. Missing optional values usedefault. Complex field/matching-plane receipts have their own schema.- パラメータ:
key (str)
attribute (str)
group (Literal['summary', 'receipts', 'diagnostics', 'field'])
kind (Literal['nonnegative_int', 'nonnegative_float', 'float', 'bool', 'str', 'model'])
default (str | int | float | bool | None)
required (bool)
- key: str¶
- attribute: str¶
- group: Literal['summary', 'receipts', 'diagnostics', 'field']¶
- kind: Literal['nonnegative_int', 'nonnegative_float', 'float', 'bool', 'str', 'model']¶
- default: str | int | float | bool | None = None¶
- required: bool = False¶