Closed marcoct closed 8 years ago
Another related error is thrown by a related program (simulate_data.py
) running similar inference in the same model. The simulate_data.py
script that generates this error involves a number of VentureScript source files not included here, but perhaps the error message will still be useful.
Marcos-MacBook-Pro-2:crosscat marco$ python simulate_data.py
./../../core.py:1: RuntimeWarning: Parent module '../.' not found while handling absolute import
import random
./../../core.py:2: RuntimeWarning: Parent module '../.' not found while handling absolute import
import string
./../../core.py:3: RuntimeWarning: Parent module '../.' not found while handling absolute import
import numpy as np
./../../core.py:4: RuntimeWarning: Parent module '../.' not found while handling absolute import
import time
./../../core.py:6: RuntimeWarning: Parent module '../.' not found while handling absolute import
import venture.shortcuts as vs
./../../core.py:7: RuntimeWarning: Parent module '../.' not found while handling absolute import
from venture.ripl.utils import strip_types
./../../core.py:8: RuntimeWarning: Parent module '../.' not found while handling absolute import
import venture.value.dicts as v
./../../core.py:9: RuntimeWarning: Parent module '../.' not found while handling absolute import
from venture.lite import types as t
./../../core.py:10: RuntimeWarning: Parent module '../.' not found while handling absolute import
from venture.lite.sp_help import typed_nr, deterministic_typed
VentureList([Bool(True), Bool(True), Bool(True), Bool(False)])
prevcol 0
prevcol 1
Strng(inference_operator)
VentureInteger(0)
Strng(inference_operator)
VentureInteger(1)
Strng(inference_operator)
VentureInteger(2)
Traceback (most recent call last):
File "simulate_data.py", line 106, in <module>
run_inference_and_render("make_gibbs_inference_program(1)")
File "simulate_data.py", line 98, in run_inference_and_render
latents = dict(ripl.evaluate("run_inference_and_extract(%s)" % inference_prog))
File "/usr/local/lib/python2.7/site-packages/venture/ripl/ripl.py", line 718, in evaluate
'expression': program})
File "/usr/local/lib/python2.7/site-packages/venture/ripl/ripl.py", line 174, in execute_instruction
self._raise_annotated(e, instruction)
File "/usr/local/lib/python2.7/site-packages/venture/ripl/ripl.py", line 170, in execute_instruction
stringable_instruction)
File "/usr/local/lib/python2.7/site-packages/venture/ripl/ripl.py", line 185, in _execute_parsed_instruction
ans = self.sivm.execute_instruction(parsed_instruction)
File "/usr/local/lib/python2.7/site-packages/venture/sivm/venture_sivm.py", line 93, in execute_instruction
response = self._call_core_sivm_instruction(instruction)
File "/usr/local/lib/python2.7/site-packages/venture/sivm/venture_sivm.py", line 183, in _call_core_sivm_instruction
response = self.core_sivm.execute_instruction(desugared_instruction)
File "/usr/local/lib/python2.7/site-packages/venture/sivm/core_sivm.py", line 63, in execute_instruction
return f(instruction)
File "/usr/local/lib/python2.7/site-packages/venture/sivm/core_sivm.py", line 196, in _do_evaluate
(did, val) = self.engine.evaluate(e)
File "/usr/local/lib/python2.7/site-packages/venture/engine/engine.py", line 213, in evaluate
return self.raw_evaluate([v.sym("autorun"), program])
File "/usr/local/lib/python2.7/site-packages/venture/engine/engine.py", line 217, in raw_evaluate
did = self._do_raw_evaluate(program)
File "/usr/local/lib/python2.7/site-packages/venture/engine/engine.py", line 225, in _do_raw_evaluate
self.infer_trace.eval(did, program)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/trace.py", line 62, in eval
val = evaluator.eval(addr.Address(addr.List(id)), py_exp, self.env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 84, in apply
return applyPSP(spr.sp.outputPSP, OutputArgs(address, nodes[1:], env, rng.randint(1, 2**31 - 1), req_nodes, requests))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 121, in applyPSP
val = psp.simulate(args)
File "/usr/local/lib/python2.7/site-packages/venture/lite/psp.py", line 489, in simulate
self.psp.simulate(self.f_type.unwrap_args(args)))
File "/usr/local/lib/python2.7/site-packages/venture/lite/inference_sps.py", line 95, in simulate
ans = getattr(engine, self.name)(*self.operands)
File "/usr/local/lib/python2.7/site-packages/venture/engine/inference.py", line 248, in in_model
return self.engine.in_model(model, action)
File "/usr/local/lib/python2.7/site-packages/venture/engine/engine.py", line 237, in in_model
did = self._do_raw_evaluate(program)
File "/usr/local/lib/python2.7/site-packages/venture/engine/engine.py", line 225, in _do_raw_evaluate
self.infer_trace.eval(did, program)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/trace.py", line 62, in eval
val = evaluator.eval(addr.Address(addr.List(id)), py_exp, self.env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 54, in eval
v = eval(addr,subexp,env,rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 82, in apply
req_nodes = [evalRequest(req_args, spr, r, rng) for r in requests.esrs]
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 131, in evalRequest
ans = node.Node(new_addr, eval(new_addr, r.exp, r.env, rng))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 58, in eval
val = apply(address, nodes, env, rng)
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 84, in apply
return applyPSP(spr.sp.outputPSP, OutputArgs(address, nodes[1:], env, rng.randint(1, 2**31 - 1), req_nodes, requests))
File "/usr/local/lib/python2.7/site-packages/venture/untraced/evaluator.py", line 121, in applyPSP
val = psp.simulate(args)
File "/usr/local/lib/python2.7/site-packages/venture/lite/psp.py", line 489, in simulate
self.psp.simulate(self.f_type.unwrap_args(args)))
File "/usr/local/lib/python2.7/site-packages/venture/lite/inference_sps.py", line 85, in simulate
ans = engine.primitive_infer(self.exp)
File "/usr/local/lib/python2.7/site-packages/venture/engine/inference.py", line 122, in primitive_infer
def primitive_infer(self, exp): return self.engine.primitive_infer(exp)
File "/usr/local/lib/python2.7/site-packages/venture/engine/engine.py", line 317, in primitive_infer
def primitive_infer(self, exp): return self.model.primitive_infer(exp)
File "/usr/local/lib/python2.7/site-packages/venture/engine/trace_set.py", line 340, in primitive_infer
return self.traces.map('primitive_infer', exp)
File "/usr/local/lib/python2.7/site-packages/venture/multiprocess.py", line 203, in map
return self.handle_result_list(res)
File "/usr/local/lib/python2.7/site-packages/venture/multiprocess.py", line 236, in handle_result_list
raise exception_handler.gen_exception()
venture.exception.VentureException: *** evaluation: 'NoneType' object has no attribute 'esrs'
(cell (quote integer<0>) (quote integer<0>))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(mem (make_csp (quote (row col)) (quote ((component_model col (category (view col) row))))))
^^^^^^^^^^^^^^^^^^^^^^^^^
**************************************************
Stack trace from worker:
**************************************************
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/venture/multiprocess.py", line 104, in wrapped
res = f(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/venture/multiprocess.py", line 342, in <lambda>
return safely(lambda *args,**kwargs: getattr(self.obj, attrname)(*args, **kwargs))
File "/usr/local/lib/python2.7/site-packages/venture/lite/trace.py", line 546, in primitive_infer
infer.EnumerativeGibbsOperator())
File "/usr/local/lib/python2.7/site-packages/venture/lite/infer/mh.py", line 75, in mixMH
proposedTrace, logAlpha = operator.propose(trace, index)
File "/usr/local/lib/python2.7/site-packages/venture/lite/infer/egibbs.py", line 86, in propose
(xiParticles, xiWeights) = self.compute_particles(trace, scaffold)
File "/usr/local/lib/python2.7/site-packages/venture/lite/infer/egibbs.py", line 78, in compute_particles
regenAndAttach(xiParticle, scaffold, shouldRestore, omegaDB, OrderedDict()))
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 42, in regenAndAttach
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 55, in regenAndAttachAtBorder
weight += regen(trace, node, scaffold, shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 139, in regen
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 121, in regenParents
weight += regen(trace, parent, scaffold, shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 139, in regen
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 123, in regenParents
weight += regen(trace, parent, scaffold, shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 139, in regen
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 123, in regenParents
weight += regen(trace, parent, scaffold, shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 139, in regen
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 121, in regenParents
weight += regen(trace, parent, scaffold, shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 139, in regen
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 121, in regenParents
weight += regen(trace, parent, scaffold, shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 139, in regen
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 121, in regenParents
weight += regen(trace, parent, scaffold, shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 147, in regen
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 295, in evalRequests
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 204, in evalFamily
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 230, in apply
shouldRestore, omegaDB, gradients)
File "/usr/local/lib/python2.7/site-packages/venture/lite/regen.py", line 287, in evalRequests
for esr in request.esrs:
VentureException: *** evaluation: 'NoneType' object has no attribute 'esrs'
{'cause': AttributeError("'NoneType' object has no attribute 'esrs'",), 'address': [[95], [[]], [94, 1, 2, 1, 0, 2], [[]]]}
Caused by
'NoneType' object has no attribute 'esrs'
Caused by
'NoneType' object has no attribute 'esrs'
This is blocking the following: https://github.com/probcomp/measurement/issues/18
Related to and possible duplicate of https://github.com/probcomp/Venturecxx/issues/590
The errors do not occur when Gibbs is only used or the "cluster"
scope and MH is used for the "view"
scope. It's possible that this is because Gibbs is undefined for changes to the view of a column, due to the need to propose somehow new values for the cluster assignments within each potential view---is there a way to express this notion more clearly in the error messages?
I think the crash is an actual bug. The expected behavior in that case is that it samples the new cluster variables from the prior, once per possible value of the view variable.
The "related error" definitely looks like an instance of #590. I think that one will be the first bug I attack after completing the draft of subproblem selection.
For what it's worth, Puma runs this program to completion (on 6 initial seeds out of 6 attempted).
I think that as of commit 5693560, this issue is fixed. Even if the simulate_data.py
crash persists, I think that's an instance of #590, which leaves the added issue that this ticket is about resolved. Reopen if there is still a problem.
When running single site Gibbs sampling in the the barebones CrossCat implementation below, several distinct but seemingly related Python error messages are stochastically generated. A minimal example that reproduces the bug is in the file
gibbs_bug_minimal_example.vnts
shown below:To run:
This generates the following errors stochastically on different runs:
Error A
Error B