Skip to content

Commit ec34fc2

Browse files
committed
pull in the changes from the .jls to the .ipynbs
1 parent 207d088 commit ec34fc2

9 files changed

+43
-19
lines changed

tutorials/A Bottom-Up Introduction to Gen.ipynb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@
442442
"source": [
443443
"using Gen: get_choices\n",
444444
"\n",
445-
"println(get_choices(trace))"
445+
"display(get_choices(trace))"
446446
]
447447
},
448448
{
@@ -629,7 +629,7 @@
629629
"source": [
630630
"using Gen: get_score\n",
631631
"trace = simulate(foo, (0.3,))\n",
632-
"println(get_choices(trace))\n",
632+
"display(get_choices(trace))\n",
633633
"println(\"log probability: $(get_score(trace))\")"
634634
]
635635
},
@@ -683,7 +683,7 @@
683683
"\n",
684684
"constraints = choicemap((:a, true), (:c, false))\n",
685685
"\n",
686-
"println(constraints)"
686+
"display(constraints)"
687687
]
688688
},
689689
{
@@ -732,7 +732,7 @@
732732
"metadata": {},
733733
"outputs": [],
734734
"source": [
735-
"println(get_choices(trace))"
735+
"display(get_choices(trace))"
736736
]
737737
},
738738
{
@@ -1154,6 +1154,12 @@
11541154
"display_name": "Julia 1.1.1",
11551155
"language": "julia",
11561156
"name": "julia-1.1"
1157+
},
1158+
"language_info": {
1159+
"file_extension": ".jl",
1160+
"mimetype": "application/julia",
1161+
"name": "julia",
1162+
"version": "1.1.1"
11571163
}
11581164
},
11591165
"nbformat": 4,

tutorials/Data-Driven Proposals in Gen.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479
"outputs": [],
480480
"source": [
481481
"(proposed_choices, _, _) = Gen.propose(custom_dest_proposal, (measurements, scene))\n",
482-
"println(proposed_choices)"
482+
"display(proposed_choices)"
483483
]
484484
},
485485
{
@@ -1495,6 +1495,12 @@
14951495
"display_name": "Julia 1.1.1",
14961496
"language": "julia",
14971497
"name": "julia-1.1"
1498+
},
1499+
"language_info": {
1500+
"file_extension": ".jl",
1501+
"mimetype": "application/julia",
1502+
"name": "julia",
1503+
"version": "1.1.1"
14981504
}
14991505
},
15001506
"nbformat": 4,

tutorials/Introduction to Modeling in Gen.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
"metadata": {},
291291
"outputs": [],
292292
"source": [
293-
"println(Gen.get_choices(trace))"
293+
"display(Gen.get_choices(trace))"
294294
]
295295
},
296296
{
@@ -1169,7 +1169,7 @@
11691169
"outputs": [],
11701170
"source": [
11711171
"trace = Gen.simulate(bar, ())\n",
1172-
"println(Gen.get_choices(trace))"
1172+
"display(Gen.get_choices(trace))"
11731173
]
11741174
},
11751175
{
@@ -1186,7 +1186,7 @@
11861186
"outputs": [],
11871187
"source": [
11881188
"trace = Gen.simulate(bar_using_namespace, ())\n",
1189-
"println(Gen.get_choices(trace))"
1189+
"display(Gen.get_choices(trace))"
11901190
]
11911191
},
11921192
{

tutorials/Iterative inference in Gen.ipynb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,12 @@
12041204
"display_name": "Julia 1.1.1",
12051205
"language": "julia",
12061206
"name": "julia-1.1"
1207+
},
1208+
"language_info": {
1209+
"file_extension": ".jl",
1210+
"mimetype": "application/julia",
1211+
"name": "julia",
1212+
"version": "1.1.1"
12071213
}
12081214
},
12091215
"nbformat": 4,

tutorials/Modeling with Black-Box Julia Code.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@
391391
"planner_params = PlannerParams(300, 3.0, 2000, 1.)\n",
392392
"(trace, _) = Gen.generate(agent_model, (scene, dt, num_ticks, planner_params));\n",
393393
"choices = Gen.get_choices(trace)\n",
394-
"println(choices)"
394+
"display(choices)"
395395
]
396396
},
397397
{
@@ -680,9 +680,9 @@
680680
],
681681
"metadata": {
682682
"kernelspec": {
683-
"display_name": "Cora Julia 1.1.1",
683+
"display_name": "Julia 1.1.1",
684684
"language": "julia",
685-
"name": "cora-julia-1.1"
685+
"name": "julia-1.1"
686686
},
687687
"language_info": {
688688
"file_extension": ".jl",

tutorials/Modeling with TensorFlow Code.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
"metadata": {},
170170
"outputs": [],
171171
"source": [
172-
"println(Gen.get_choices(trace))"
172+
"display(Gen.get_choices(trace))"
173173
]
174174
},
175175
{
@@ -246,7 +246,7 @@
246246
"metadata": {},
247247
"outputs": [],
248248
"source": [
249-
"println(Gen.get_choices(trace))"
249+
"display(Gen.get_choices(trace))"
250250
]
251251
},
252252
{

tutorials/Particle Filtering in Gen.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@
526526
"outputs": [],
527527
"source": [
528528
"trace = Gen.simulate(chain, (4, State(0., 0., 0., 0.), 0.01, 0.01))\n",
529-
"println(Gen.get_choices(trace))"
529+
"display(Gen.get_choices(trace))"
530530
]
531531
},
532532
{
@@ -584,7 +584,7 @@
584584
"outputs": [],
585585
"source": [
586586
"(trace, _) = Gen.generate(unfold_model, (4,))\n",
587-
"println(Gen.get_choices(trace))"
587+
"display(Gen.get_choices(trace))"
588588
]
589589
},
590590
{

tutorials/Reasoning About Regenerate.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
"source": [
133133
"using Gen: get_choices\n",
134134
"\n",
135-
"println(get_choices(trace))"
135+
"display(get_choices(trace))"
136136
]
137137
},
138138
{
@@ -304,7 +304,7 @@
304304
"source": [
305305
"trace, weight = generate(foo, (0.3,), choicemap((:a, true), (:b, false), (:c, true)));\n",
306306
"(trace, weight, retdiff) = regenerate(trace, (0.3,), (NoChange(),), select(:a));\n",
307-
"println(get_choices(trace))\n",
307+
"display(get_choices(trace))\n",
308308
"println(\"weight: $weight\");"
309309
]
310310
},

tutorials/Scaling with Combinators and the Static Modeling Language.ipynb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
"metadata": {},
316316
"outputs": [],
317317
"source": [
318-
"println(get_choices(trace))"
318+
"display(get_choices(trace))"
319319
]
320320
},
321321
{
@@ -356,7 +356,7 @@
356356
"outputs": [],
357357
"source": [
358358
"trace = simulate(model_with_map, (xs,));\n",
359-
"println(get_choices(trace))"
359+
"display(get_choices(trace))"
360360
]
361361
},
362362
{
@@ -799,6 +799,12 @@
799799
"display_name": "Julia 1.1.1",
800800
"language": "julia",
801801
"name": "julia-1.1"
802+
},
803+
"language_info": {
804+
"file_extension": ".jl",
805+
"mimetype": "application/julia",
806+
"name": "julia",
807+
"version": "1.1.1"
802808
}
803809
},
804810
"nbformat": 4,

0 commit comments

Comments
 (0)