Closed sabinala closed 3 months ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
@sabinala , could you resolve conflicts and then tag me when this is ready for review again? Thanks!
@SamWitty I resolved the branch conflicts, and then went to run the notebook again and now I'm getting an error when trying to sample
with interventions. I'm confused because I thought this came up and was resolved, but please see: https://github.com/ciemss/pyciemss/issues/524
I get an error with this notebook at the dynamic parameter intervention (which explains why the notebook CI test fails), but it is successfully running the static interventions. See my comment about a fresh environment in #524.
@sabinala , I fixed the notebook up to optimize
. I believe in your merge you erased changes to the API that @anirban-chaudhuri had made. Once you resolve your PyCIEMSS and ChiRho version errors you should be able to pick up from there.
@SamWitty Thanks, trying that now
Adding @anirban-chaudhuri as a reviewer to confirm that this did not revert previous changes to optimize
. Once Anirban approves (after the remaining issue is fixed) we can merge.
@SamWitty starting with a fresh environment did fix the errors I was getting before. Are you no longer getting an error for dynamic_parameter_intervention
? When I run it with make_var_threshold
defined as:
def make_var_threshold(var: str, threshold: torch.Tensor):
def var_threshold(time, state):
return state[var] - threshold
return var_threshold
I get a KeyError
:
File ~/anaconda3/lib/python3.10/site-packages/pyro/infer/predictive.py:55, in <dictcomp>(.0)
52 collected.append(trace)
53 else:
54 collected.append(
---> 55 {site: trace.nodes[site]["value"] for site in return_site_shapes}
56 )
58 if return_trace:
59 return collected
KeyError: 'parameter_intervention_value_p_cbeta_0'
@SamWitty @anirban-chaudhuri This notebook is ready to go and includes the new optimize
interface implementations
@SamWitty @anirban-chaudhuri This notebook is ready to go and includes the new
optimize
interface implementations
Nevermind...cannot get the notebook test to pass :(
@sabinala , unfortunately the CI does not return very informative error messages for the notebook tests. When I run the test_notebooks.sh
script locally I get an error ERROR docs/source/interfaces.ipynb::Cell 0 - jupyter_client.kernelspec.NoSuchKernel: No such kernel named pyciemss
which is a bit more informative. It looks like you made some accidental changes to the kernel from python3
to pyciemss
, which doesn't exist in the CI build.
@sabinala , this issue looks slightly more nuanced. I'll figure it out. Please hold off on making more commits.
Closes #438