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
[ ] Added relevant tests that run with python tests/__main__.py, and pass.
[ ] Added relevant documentation that builds in sphinx without error.
[ ] Added new features that are documented with examples.
[x] Artifacts produced with the main branch work as expected under this PR.
Summary
using
cached=True
creates adir_archive
that has the same name as themodel.__name__
, however sometime it is useful to specify a different name or a different archive type. Thecached
keyword should be able to acceptTrue
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 thearchive
keyword) for use only in sampling. The model will not become cached, and the archive will only be used whensample
is called.Checklist
Documentation and Tests
python tests/__main__.py
, and pass.