-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Pyro version 1.9.1 causes tests in tests/test_inference.py to fail when loading guides.
======================================================================== FAILURES =========================================================================
_____________________________________ test_smoke_CausalInsigth[1-industry_real_estate_total-spending_transportation] ______________________________________
intervention = 'spending_transportation', outcome = 'industry_real_estate_total', shift = 1
@pytest.mark.parametrize("intervention", interventions)
@pytest.mark.parametrize("outcome", outcomes)
@pytest.mark.parametrize("shift", shifts)
def test_smoke_CausalInsigth(intervention, outcome, shift):
ci = CausalInsight(
outcome_dataset=outcome,
intervention_dataset=intervention,
num_samples=5,
)
> ci.load_guide(forward_shift=2)
/Users/Admin/Documents/cities/tests/test_inference.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/Admin/Documents/cities/cities/queries/causal_insight.py:99: in load_guide
self.guide = dill.load(file)
/Users/Admin/Documents/cities/venv/lib/python3.12/site-packages/dill/_dill.py:289: in load
return Unpickler(file, ignore=ignore, **kwds).load()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dill._dill.Unpickler object at 0x177a33a80>
def load(self): #NOTE: if settings change, need to update attributes
> obj = StockUnpickler.load(self)
E AttributeError: 'CondIndepStackFrame' object has no attribute '__dict__'. Did you mean: '__dir__'?
/Users/Admin/Documents/cities/venv/lib/python3.12/site-packages/dill/_dill.py:444: AttributeError
_____________________________________ test_smoke_CausalInsigth[2-industry_real_estate_total-spending_transportation] ______________________________________
intervention = 'spending_transportation', outcome = 'industry_real_estate_total', shift = 2
@pytest.mark.parametrize("intervention", interventions)
@pytest.mark.parametrize("outcome", outcomes)
@pytest.mark.parametrize("shift", shifts)
def test_smoke_CausalInsigth(intervention, outcome, shift):
ci = CausalInsight(
outcome_dataset=outcome,
intervention_dataset=intervention,
num_samples=5,
)
> ci.load_guide(forward_shift=2)
/Users/Admin/Documents/cities/tests/test_inference.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/Admin/Documents/cities/cities/queries/causal_insight.py:99: in load_guide
self.guide = dill.load(file)
/Users/Admin/Documents/cities/venv/lib/python3.12/site-packages/dill/_dill.py:289: in load
return Unpickler(file, ignore=ignore, **kwds).load()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dill._dill.Unpickler object at 0x177a33bb0>
def load(self): #NOTE: if settings change, need to update attributes
> obj = StockUnpickler.load(self)
E AttributeError: 'CondIndepStackFrame' object has no attribute '__dict__'. Did you mean: '__dir__'?
/Users/Admin/Documents/cities/venv/lib/python3.12/site-packages/dill/_dill.py:444: AttributeError
_____________________________________ test_smoke_CausalInsigth[3-industry_real_estate_total-spending_transportation] ______________________________________
intervention = 'spending_transportation', outcome = 'industry_real_estate_total', shift = 3
@pytest.mark.parametrize("intervention", interventions)
@pytest.mark.parametrize("outcome", outcomes)
@pytest.mark.parametrize("shift", shifts)
def test_smoke_CausalInsigth(intervention, outcome, shift):
ci = CausalInsight(
outcome_dataset=outcome,
intervention_dataset=intervention,
num_samples=5,
)
> ci.load_guide(forward_shift=2)
/Users/Admin/Documents/cities/tests/test_inference.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/Admin/Documents/cities/cities/queries/causal_insight.py:99: in load_guide
self.guide = dill.load(file)
/Users/Admin/Documents/cities/venv/lib/python3.12/site-packages/dill/_dill.py:289: in load
return Unpickler(file, ignore=ignore, **kwds).load()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dill._dill.Unpickler object at 0x177a33360>
def load(self): #NOTE: if settings change, need to update attributes
> obj = StockUnpickler.load(self)
E AttributeError: 'CondIndepStackFrame' object has no attribute '__dict__'. Did you mean: '__dir__'?
/Users/Admin/Documents/cities/venv/lib/python3.12/site-packages/dill/_dill.py:444: AttributeError
================================================================= short test summary info =================================================================
FAILED tests/test_inference.py::test_smoke_CausalInsigth[1-industry_real_estate_total-spending_transportation] - AttributeError: 'CondIndepStackFrame' object has no attribute '__dict__'. Did you mean: '__dir__'?
FAILED tests/test_inference.py::test_smoke_CausalInsigth[2-industry_real_estate_total-spending_transportation] - AttributeError: 'CondIndepStackFrame' object has no attribute '__dict__'. Did you mean: '__dir__'?
FAILED tests/test_inference.py::test_smoke_CausalInsigth[3-industry_real_estate_total-spending_transportation] - AttributeError: 'CondIndepStackFrame' object has no attribute '__dict__'. Did you mean: '__dir__'?
Installing pyro-ppl==1.8.5 resolves the test failures.
Reactions are currently unavailable