shelve_recorder.py

Class definition for HDF5Recorder, which uses the shelve format.

class openmdao.recorders.shelve_recorder.ShelveRecorder(out, **shelve_args)[source]

Bases: openmdao.recorders.base_recorder.BaseRecorder

A recorder that stores data using Python’s shelve.

ShelveRecorder is deprecated. Please consider using the SqliteRecorder instead.

Args:

out : str

String containing the filename for the shelve file.

**shelve_args

Additional keyword args to be passed to shelve.open().

record(params, unknowns, resids, metadata)[source]

Stores the provided data in the shelve file using the iteration coordinate for the key.

Args:

params : dict

Dictionary containing parameters. (p)

unknowns : dict

Dictionary containing outputs and states. (u)

resids : dict

Dictionary containing residuals. (r)

metadata : dict, optional

Dictionary containing execution metadata (e.g. iteration coordinate).