From 17d24882ec4934035285062bc1f02856cd9446a1 Mon Sep 17 00:00:00 2001 From: Dilara Gokay Date: Thu, 5 May 2022 21:58:37 +0200 Subject: [PATCH] Update inspect.py --- pyro/infer/inspect.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyro/infer/inspect.py b/pyro/infer/inspect.py index ad49b443bc..9bb5ca2520 100644 --- a/pyro/infer/inspect.py +++ b/pyro/infer/inspect.py @@ -552,6 +552,9 @@ def render_model( assert model_args is None or isinstance( model_args, tuple ), "model_args must be None or tuple" + assert model_kwargs is None or isinstance( + model_kwargs, dict + ), "model_kwargs must be None or dict" relations = get_model_relations(model, model_args, model_kwargs) graph_spec = generate_graph_specification(relations, render_params=render_params) graph = render_graph(graph_spec, render_distributions=render_distributions)