pyfemtet.opt.history package

Module contents

class pyfemtet.opt.history.ColumnOrderMode(value)[source]

Bases: StrEnum

The order rule of the history csv columns.

important_first = 'important_first'
per_category = 'per_category'

Sort per each object.

class pyfemtet.opt.history.History[source]

Bases: object

最適化の試行の履歴を管理します。

additional_data: dict
property all_output_names: list[str]
cns_names: list[str]
get_df(equality_filters=None)[source]

Returns the optimization history.

Parameters:

equality_filters (dict, optional) – The {column: value} というフォーマットの matching filter.

Return type:

DataFrame

Returns: The optimization history.

static get_trial_name(trial=None, fidelity=None, sub_sampling=None, row=None)[source]
Parameters:

row (Series | None) –

is_restart: bool
obj_names: list[str]
other_output_names: list[str]
path: str

The existing or destination CSV path.

If not specified, the CSV file is saved in the format “pyfemtet.opt_%Y%m%d_%H%M%S.csv” when the optimization process starts.

prm_names: list[str]
save()[source]

Export the optimization history.

The destination path is History.path.

sub_fidelity_names: list[str]
class pyfemtet.opt.history.TrialState(value)[source]

Bases: StrEnum

An enumeration.

hard_constraint_violation = 'Hard constraint violation'
mesh_error = 'Mesh error'
model_error = 'Model error'
post_error = 'Post-processing error'
skipped = 'Skip'
soft_constraint_violation = 'Soft constraint violation'
solve_error = 'Solve error'
succeeded = 'Success'
undefined = 'undefined'
unknown_error = 'Unknown error'
pyfemtet.opt.history.get_trial_name(trial=None, fidelity=None, sub_sampling=None, row=None)[source]
Parameters:

row (Series | None) –