uqfoundation / mystic

constrained nonlinear optimization for scientific machine learning, UQ, and AI
http://mystic.rtfd.io
Other
467 stars 50 forks source link

ouq_models can specify archive with cached keyword #205

Closed mmckerns closed 1 year ago

mmckerns commented 1 year ago

Summary

using cached=True creates a dir_archive that has the same name as the model.__name__, however sometime it is useful to specify a different name or a different archive type. The cached keyword should be able to accept True for the default behavior, or an archive name or archive instance when the default is not desired.

This also impacts sample, where an archive can be specified (using the archive keyword) for use only in sampling. The model will not become cached, and the archive will only be used when sample is called.

Checklist

Documentation and Tests