You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use of a dict_archive in sample for an OUQModel fails to write back to the model cache when a dict_archive is used.
Python 3.8.17 (default, Jun 11 2023, 01:54:00)
[Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ouq_models import WrapModel
>>> from emulators import cost4 as cost, bounds4 as bounds
>>> from mystic.cache.archive import dict_archive, read as create_db
>>> archive = create_db('truth', type=dict_archive)
>>> archive
dict_archive({}, cached=False)
>>> truth = WrapModel("truth", cost, nx=4, ny=None, cached=archive)
>>> truth([1,2,3,4])
1510.3774284161302
>>> archive
dict_archive({(1, 2, 3, 4): 1510.3774284161302}, cached=False)
>>> data = truth.sample(bounds, pts=[2, 1, 1, 1])
>>> archive
dict_archive({(1, 2, 3, 4): 1510.3774284161302}, cached=False)
This actually makes sense, as the archives used in sample is potentially different than the archive used as the model's cache... and one might specify the sampling archive to be different than the cache, or the cache might not exist.
However... if one explicitly specifies the same dict_archive as used with the model's cache, it still doesn't work... and this would seem to be a bug.
mmckerns
changed the title
sampling fails to write to model cache for dict_archive in ouq_models
sample fails to write to cache for dict_archive in ouq_models
Aug 14, 2023
Use of a
dict_archive
insample
for anOUQModel
fails to write back to the model cache when adict_archive
is used.This actually makes sense, as the archives used in
sample
is potentially different than the archive used as the model's cache... and one might specify the sampling archive to be different than the cache, or the cache might not exist.However... if one explicitly specifies the same
dict_archive
as used with the model's cache, it still doesn't work... and this would seem to be a bug.The text was updated successfully, but these errors were encountered: