Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Simulate in Normal preset not working #4848

Closed
YohannParis opened this issue Sep 19, 2024 · 1 comment · Fixed by #4921
Closed

[BUG]: Simulate in Normal preset not working #4848

YohannParis opened this issue Sep 19, 2024 · 1 comment · Fixed by #4921
Assignees
Labels
bug Something isn't working Q&A Quality Assurance

Comments

@YohannParis
Copy link
Member

Describe the issue
The following error was returned instead: 7a052ce4-6fe0-4c23-85a3-f6c95f6fa22a

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/pyro/poutine/trace_messenger.py", line 174, in __call__ ret = self.fn(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/messenger.py", line 12, in _context_wrap return fn(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/messenger.py", line 12, in _context_wrap return fn(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyciemss/interfaces.py", line 499, in wrapped_model full_trajectory = model( File "/usr/local/lib/python3.10/site-packages/pyro/nn/module.py", line 449, in __call__ result = super().__call__(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyciemss/compiled_dynamics.py", line 126, in forward simulate(self.deriv, self.initial_state(), start_time, end_time) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/runtime.py", line 281, in _fn apply_stack(msg) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/runtime.py", line 212, in apply_stack frame._process_message(msg) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/messenger.py", line 162, in _process_message return method(msg) File "/usr/local/lib/python3.10/site-packages/chirho/dynamical/internals/solver.py", line 109, in _pyro_simulate state, start_time, next_interruption = simulate_to_interruption( File "/usr/local/lib/python3.10/site-packages/pyro/poutine/runtime.py", line 281, in _fn apply_stack(msg) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/runtime.py", line 212, in apply_stack frame._process_message(msg) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/messenger.py", line 162, in _process_message return method(msg) File "/usr/local/lib/python3.10/site-packages/chirho/dynamical/handlers/solver.py", line 89, in _pyro_simulate_to_interruption msg["value"] = torchdiffeq_simulate_to_interruption( File "/usr/local/lib/python3.10/site-packages/chirho/dynamical/internals/backends/torchdiffeq.py", line 248, in torchdiffeq_simulate_to_interruption (next_interruption,), interruption_time = _torchdiffeq_get_next_interruptions( ValueError: too many values to unpack (expected 1) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/rq/worker.py", line 1428, in perform_job rv = job.perform() File "/usr/local/lib/python3.10/site-packages/rq/job.py", line 1278, in perform self._result = self._execute() File "/usr/local/lib/python3.10/site-packages/rq/job.py", line 1315, in _execute result = self.func(*self.args, **self.kwargs) File "/service/./execute.py", line 37, in run output = eval(operation_name)(**kwargs) File "/usr/local/lib/python3.10/site-packages/pyciemss/integration_utils/custom_decorators.py", line 29, in wrapped raise e File "/usr/local/lib/python3.10/site-packages/pyciemss/integration_utils/custom_decorators.py", line 10, in wrapped result = function(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyciemss/interfaces.py", line 526, in sample samples = pyro.infer.Predictive( File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyro/infer/predictive.py", line 273, in forward return _predictive( File "/usr/local/lib/python3.10/site-packages/pyro/infer/predictive.py", line 127, in _predictive return _predictive_sequential( File "/usr/local/lib/python3.10/site-packages/pyro/infer/predictive.py", line 48, in _predictive_sequential trace = poutine.trace(poutine.condition(model, samples[i])).get_trace( File "/usr/local/lib/python3.10/site-packages/pyro/poutine/trace_messenger.py", line 198, in get_trace self(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/trace_messenger.py", line 180, in __call__ raise exc from e File "/usr/local/lib/python3.10/site-packages/pyro/poutine/trace_messenger.py", line 174, in __call__ ret = self.fn(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/messenger.py", line 12, in _context_wrap return fn(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/messenger.py", line 12, in _context_wrap return fn(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyciemss/interfaces.py", line 499, in wrapped_model full_trajectory = model( File "/usr/local/lib/python3.10/site-packages/pyro/nn/module.py", line 449, in __call__ result = super().__call__(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyciemss/compiled_dynamics.py", line 126, in forward simulate(self.deriv, self.initial_state(), start_time, end_time) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/runtime.py", line 281, in _fn apply_stack(msg) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/runtime.py", line 212, in apply_stack frame._process_message(msg) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/messenger.py", line 162, in _process_message return method(msg) File "/usr/local/lib/python3.10/site-packages/chirho/dynamical/internals/solver.py", line 109, in _pyro_simulate state, start_time, next_interruption = simulate_to_interruption( File "/usr/local/lib/python3.10/site-packages/pyro/poutine/runtime.py", line 281, in _fn apply_stack(msg) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/runtime.py", line 212, in apply_stack frame._process_message(msg) File "/usr/local/lib/python3.10/site-packages/pyro/poutine/messenger.py", line 162, in _process_message return method(msg) File "/usr/local/lib/python3.10/site-packages/chirho/dynamical/handlers/solver.py", line 89, in _pyro_simulate_to_interruption msg["value"] = torchdiffeq_simulate_to_interruption( File "/usr/local/lib/python3.10/site-packages/chirho/dynamical/internals/backends/torchdiffeq.py", line 248, in torchdiffeq_simulate_to_interruption (next_interruption,), interruption_time = _torchdiffeq_get_next_interruptions( ValueError: too many values to unpack (expected 1) Trace Shapes: Param Sites: numeric_initial_state_func$$$_nodes.0._value numeric_initial_state_func$$$_nodes.1._value numeric_initial_state_func$$$_nodes.2._value Sample Sites: persistent_β dist | value | persistent_γ dist | value |
@YohannParis YohannParis added bug Something isn't working Q&A Quality Assurance labels Sep 19, 2024
@mwdchang
Copy link
Member

I cannot reproduce the pyciemss error, at least not with the model-config that I am playing with. However there does seem to be problems switching between normal/fast in that some settings (eg samples) are sticky does not change according to the preset options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Q&A Quality Assurance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants