Open
Description
Attempting to run any of the models using the approach in the test script results in a KeyError
. For example,
models = pyro_models.load()
model_dict = models['arm.radon_intercept']
model = model_dict['model']
data = pyro_models.data(model_dict)
Results in:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Untitled-1 in
5 model_dict = models['arm.radon_intercept']
6 model = model_dict['model']
----> 7 data = pyro_models.data(model_dict)
8 # guide = AutoDelta(model)
~/anaconda3/envs/pytorch_latest_p37/lib/python3.7/site-packages/Pyro_Models-0.0.0-py3.7.egg/pyro_models/utils.py in data(model)
49
50 def data(model):
---> 51 data = json_file_to_mem_format(model['data_file'])
52 foo = model['module']
53
KeyError: 'data_file'
Looking at the model_dict
, there is indeed no 'data_file'
key:
model_dict
{'dataset': 'arm',
'source_file': '/home/ubuntu/anaconda3/envs/pytorch_latest_p37/lib/python3.7/site-packages/Pyro_Models-0.0.0-py3.7.egg/pyro_models/arm/radon_intercept.py',
'name': 'radon_intercept',
'module': <module 'model.radon_intercept' from '/home/ubuntu/anaconda3/envs/pytorch_latest_p37/lib/python3.7/site-packages/Pyro_Models-0.0.0-py3.7.egg/pyro_models/arm/radon_intercept.py'>,
'model': functools.partial(<function load.<locals>.model_wrapped at 0x7f7c1fcf8830>, <module 'model.radon_intercept' from '/home/ubuntu/anaconda3/envs/pytorch_latest_p37/lib/python3.7/site-packages/Pyro_Models-0.0.0-py3.7.egg/pyro_models/arm/radon_intercept.py'>)}
Metadata
Metadata
Assignees
Labels
No labels