compiled-knowledge 4.0.0__cp312-cp312-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of compiled-knowledge might be problematic. Click here for more details.

Files changed (182) hide show
  1. ck/__init__.py +0 -0
  2. ck/circuit/__init__.py +17 -0
  3. ck/circuit/_circuit_cy.c +37513 -0
  4. ck/circuit/_circuit_cy.cp312-win32.pyd +0 -0
  5. ck/circuit/_circuit_cy.pxd +32 -0
  6. ck/circuit/_circuit_cy.pyx +768 -0
  7. ck/circuit/_circuit_py.py +836 -0
  8. ck/circuit/tmp_const.py +75 -0
  9. ck/circuit_compiler/__init__.py +2 -0
  10. ck/circuit_compiler/circuit_compiler.py +27 -0
  11. ck/circuit_compiler/cython_vm_compiler/__init__.py +1 -0
  12. ck/circuit_compiler/cython_vm_compiler/_compiler.c +19833 -0
  13. ck/circuit_compiler/cython_vm_compiler/_compiler.cp312-win32.pyd +0 -0
  14. ck/circuit_compiler/cython_vm_compiler/_compiler.pyx +380 -0
  15. ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py +128 -0
  16. ck/circuit_compiler/interpret_compiler.py +255 -0
  17. ck/circuit_compiler/llvm_compiler.py +388 -0
  18. ck/circuit_compiler/llvm_vm_compiler.py +552 -0
  19. ck/circuit_compiler/named_circuit_compilers.py +57 -0
  20. ck/circuit_compiler/support/__init__.py +0 -0
  21. ck/circuit_compiler/support/circuit_analyser/__init__.py +13 -0
  22. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c +10618 -0
  23. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp312-win32.pyd +0 -0
  24. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.pyx +98 -0
  25. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_py.py +93 -0
  26. ck/circuit_compiler/support/input_vars.py +148 -0
  27. ck/circuit_compiler/support/llvm_ir_function.py +251 -0
  28. ck/example/__init__.py +53 -0
  29. ck/example/alarm.py +366 -0
  30. ck/example/asia.py +28 -0
  31. ck/example/binary_clique.py +32 -0
  32. ck/example/bow_tie.py +33 -0
  33. ck/example/cancer.py +37 -0
  34. ck/example/chain.py +38 -0
  35. ck/example/child.py +199 -0
  36. ck/example/clique.py +33 -0
  37. ck/example/cnf_pgm.py +39 -0
  38. ck/example/diamond_square.py +70 -0
  39. ck/example/earthquake.py +36 -0
  40. ck/example/empty.py +10 -0
  41. ck/example/hailfinder.py +539 -0
  42. ck/example/hepar2.py +628 -0
  43. ck/example/insurance.py +504 -0
  44. ck/example/loop.py +40 -0
  45. ck/example/mildew.py +38161 -0
  46. ck/example/munin.py +22982 -0
  47. ck/example/pathfinder.py +53747 -0
  48. ck/example/rain.py +39 -0
  49. ck/example/rectangle.py +161 -0
  50. ck/example/run.py +30 -0
  51. ck/example/sachs.py +129 -0
  52. ck/example/sprinkler.py +30 -0
  53. ck/example/star.py +44 -0
  54. ck/example/stress.py +64 -0
  55. ck/example/student.py +43 -0
  56. ck/example/survey.py +46 -0
  57. ck/example/triangle_square.py +56 -0
  58. ck/example/truss.py +51 -0
  59. ck/in_out/__init__.py +3 -0
  60. ck/in_out/parse_ace_lmap.py +216 -0
  61. ck/in_out/parse_ace_nnf.py +322 -0
  62. ck/in_out/parse_net.py +482 -0
  63. ck/in_out/parser_utils.py +189 -0
  64. ck/in_out/pgm_pickle.py +42 -0
  65. ck/in_out/pgm_python.py +268 -0
  66. ck/in_out/render_bugs.py +111 -0
  67. ck/in_out/render_net.py +177 -0
  68. ck/in_out/render_pomegranate.py +184 -0
  69. ck/pgm.py +3482 -0
  70. ck/pgm_circuit/__init__.py +1 -0
  71. ck/pgm_circuit/marginals_program.py +352 -0
  72. ck/pgm_circuit/mpe_program.py +236 -0
  73. ck/pgm_circuit/pgm_circuit.py +88 -0
  74. ck/pgm_circuit/program_with_slotmap.py +217 -0
  75. ck/pgm_circuit/slot_map.py +35 -0
  76. ck/pgm_circuit/support/__init__.py +0 -0
  77. ck/pgm_circuit/support/compile_circuit.py +78 -0
  78. ck/pgm_circuit/target_marginals_program.py +103 -0
  79. ck/pgm_circuit/wmc_program.py +323 -0
  80. ck/pgm_compiler/__init__.py +2 -0
  81. ck/pgm_compiler/ace/__init__.py +1 -0
  82. ck/pgm_compiler/ace/ace.py +299 -0
  83. ck/pgm_compiler/factor_elimination.py +395 -0
  84. ck/pgm_compiler/named_pgm_compilers.py +60 -0
  85. ck/pgm_compiler/pgm_compiler.py +19 -0
  86. ck/pgm_compiler/recursive_conditioning.py +231 -0
  87. ck/pgm_compiler/support/__init__.py +0 -0
  88. ck/pgm_compiler/support/circuit_table/__init__.py +17 -0
  89. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c +16396 -0
  90. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp312-win32.pyd +0 -0
  91. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.pyx +332 -0
  92. ck/pgm_compiler/support/circuit_table/_circuit_table_py.py +304 -0
  93. ck/pgm_compiler/support/clusters.py +572 -0
  94. ck/pgm_compiler/support/factor_tables.py +406 -0
  95. ck/pgm_compiler/support/join_tree.py +332 -0
  96. ck/pgm_compiler/support/named_compiler_maker.py +43 -0
  97. ck/pgm_compiler/variable_elimination.py +91 -0
  98. ck/probability/__init__.py +0 -0
  99. ck/probability/empirical_probability_space.py +52 -0
  100. ck/probability/pgm_probability_space.py +36 -0
  101. ck/probability/probability_space.py +627 -0
  102. ck/program/__init__.py +3 -0
  103. ck/program/program.py +137 -0
  104. ck/program/program_buffer.py +180 -0
  105. ck/program/raw_program.py +106 -0
  106. ck/sampling/__init__.py +0 -0
  107. ck/sampling/forward_sampler.py +211 -0
  108. ck/sampling/marginals_direct_sampler.py +113 -0
  109. ck/sampling/sampler.py +62 -0
  110. ck/sampling/sampler_support.py +234 -0
  111. ck/sampling/uniform_sampler.py +72 -0
  112. ck/sampling/wmc_direct_sampler.py +171 -0
  113. ck/sampling/wmc_gibbs_sampler.py +153 -0
  114. ck/sampling/wmc_metropolis_sampler.py +165 -0
  115. ck/sampling/wmc_rejection_sampler.py +115 -0
  116. ck/utils/__init__.py +0 -0
  117. ck/utils/iter_extras.py +164 -0
  118. ck/utils/local_config.py +278 -0
  119. ck/utils/map_list.py +128 -0
  120. ck/utils/map_set.py +128 -0
  121. ck/utils/np_extras.py +51 -0
  122. ck/utils/random_extras.py +64 -0
  123. ck/utils/tmp_dir.py +94 -0
  124. ck_demos/__init__.py +0 -0
  125. ck_demos/ace/__init__.py +0 -0
  126. ck_demos/ace/copy_ace_to_ck.py +15 -0
  127. ck_demos/ace/demo_ace.py +49 -0
  128. ck_demos/ace/simple_ace_demo.py +18 -0
  129. ck_demos/all_demos.py +88 -0
  130. ck_demos/circuit/__init__.py +0 -0
  131. ck_demos/circuit/demo_circuit_dump.py +22 -0
  132. ck_demos/circuit/demo_derivatives.py +43 -0
  133. ck_demos/circuit_compiler/__init__.py +0 -0
  134. ck_demos/circuit_compiler/compare_circuit_compilers.py +32 -0
  135. ck_demos/circuit_compiler/show_llvm_program.py +26 -0
  136. ck_demos/getting_started/__init__.py +0 -0
  137. ck_demos/getting_started/simple_demo.py +18 -0
  138. ck_demos/pgm/__init__.py +0 -0
  139. ck_demos/pgm/demo_pgm_dump.py +18 -0
  140. ck_demos/pgm/demo_pgm_dump_stress.py +18 -0
  141. ck_demos/pgm/demo_pgm_string_rendering.py +15 -0
  142. ck_demos/pgm/show_examples.py +25 -0
  143. ck_demos/pgm_compiler/__init__.py +0 -0
  144. ck_demos/pgm_compiler/compare_pgm_compilers.py +63 -0
  145. ck_demos/pgm_compiler/demo_compiler_dump.py +60 -0
  146. ck_demos/pgm_compiler/demo_factor_elimination.py +47 -0
  147. ck_demos/pgm_compiler/demo_join_tree.py +25 -0
  148. ck_demos/pgm_compiler/demo_marginals_program.py +53 -0
  149. ck_demos/pgm_compiler/demo_mpe_program.py +55 -0
  150. ck_demos/pgm_compiler/demo_pgm_compiler.py +38 -0
  151. ck_demos/pgm_compiler/demo_recursive_conditioning.py +33 -0
  152. ck_demos/pgm_compiler/demo_variable_elimination.py +33 -0
  153. ck_demos/pgm_compiler/demo_wmc_program.py +29 -0
  154. ck_demos/pgm_compiler/time_fe_compiler.py +93 -0
  155. ck_demos/pgm_inference/__init__.py +0 -0
  156. ck_demos/pgm_inference/demo_inferencing_basic.py +188 -0
  157. ck_demos/pgm_inference/demo_inferencing_mpe_cancer.py +45 -0
  158. ck_demos/pgm_inference/demo_inferencing_wmc_and_mpe_sprinkler.py +154 -0
  159. ck_demos/pgm_inference/demo_inferencing_wmc_student.py +110 -0
  160. ck_demos/programs/__init__.py +0 -0
  161. ck_demos/programs/demo_program_buffer.py +24 -0
  162. ck_demos/programs/demo_program_multi.py +24 -0
  163. ck_demos/programs/demo_program_none.py +19 -0
  164. ck_demos/programs/demo_program_single.py +23 -0
  165. ck_demos/programs/demo_raw_program_dump.py +17 -0
  166. ck_demos/programs/demo_raw_program_interpreted.py +21 -0
  167. ck_demos/programs/demo_raw_program_llvm.py +21 -0
  168. ck_demos/sampling/__init__.py +0 -0
  169. ck_demos/sampling/check_sampler.py +71 -0
  170. ck_demos/sampling/demo_marginal_direct_sampler.py +40 -0
  171. ck_demos/sampling/demo_uniform_sampler.py +38 -0
  172. ck_demos/sampling/demo_wmc_direct_sampler.py +40 -0
  173. ck_demos/utils/__init__.py +0 -0
  174. ck_demos/utils/compare.py +120 -0
  175. ck_demos/utils/convert_network.py +45 -0
  176. ck_demos/utils/sample_model.py +216 -0
  177. ck_demos/utils/stop_watch.py +384 -0
  178. compiled_knowledge-4.0.0.dist-info/METADATA +50 -0
  179. compiled_knowledge-4.0.0.dist-info/RECORD +182 -0
  180. compiled_knowledge-4.0.0.dist-info/WHEEL +5 -0
  181. compiled_knowledge-4.0.0.dist-info/licenses/LICENSE.txt +21 -0
  182. compiled_knowledge-4.0.0.dist-info/top_level.txt +2 -0
@@ -0,0 +1,384 @@
1
+ """
2
+ A simple code execution timer.
3
+
4
+ Example usage:
5
+ ```
6
+ time = StopWatch()
7
+ # Do some work
8
+ time.stop()
9
+
10
+ print('time:', time)
11
+ ```
12
+ Alternate usage:
13
+ ```
14
+ with timer('stuff'):
15
+ # do some stuff
16
+ ```
17
+ Usage of ProgressCheck:
18
+ ```
19
+ check = ProgressCheck(60)
20
+ for iteration in range(max_iterations):
21
+ # Do one iteration.
22
+ ...
23
+
24
+ if check:
25
+ print(f'progress: {iteration=} time={check}')
26
+ ```
27
+ """
28
+ from __future__ import annotations
29
+
30
+ import timeit as _timeit
31
+ from typing import Tuple, Dict, Any, Optional
32
+
33
+
34
+ class StopWatch:
35
+ __slots__ = ('start_time', 'stop_time', 'offset_seconds', 'multiplier')
36
+
37
+ def __init__(self, offset_seconds: float = 0, multiplier: float = 1, running: bool = True):
38
+ """
39
+ Create a StopWatch to start timing, by using timeit.default_timer().
40
+ A StopWatch will be created in the running state.
41
+ Call self.stop() to stop (or pause) the StopWatch.
42
+
43
+ Args:
44
+ offset_seconds: is an initial time offset.
45
+ multiplier: is an initial time multiplier (also applied to offset_seconds).
46
+ running: is a Boolean flag to set the stopwatch running (default True).
47
+ """
48
+ assert multiplier > 0, 'multiplier must be positive'
49
+ self.start_time = _timeit.default_timer()
50
+ self.stop_time = None if running else self.start_time
51
+ self.offset_seconds = offset_seconds
52
+ self.multiplier = multiplier
53
+
54
+ def copy(self, running: Optional[bool] = None) -> StopWatch:
55
+ """
56
+ Return a copy of this stop watch.
57
+
58
+ Args:
59
+ running: controls the running state of the copy.
60
+ If True, the copy will be running (continued),
61
+ if False, the copy will be stopped,
62
+ if None, the copy will be in the same state as this stop watch.
63
+ """
64
+ result = StopWatch(
65
+ offset_seconds=self.offset_seconds,
66
+ multiplier=self.multiplier,
67
+ )
68
+ result.start_time = self.start_time
69
+ result.stop_time = self.stop_time
70
+
71
+ if running is not None:
72
+ if running:
73
+ if self.stop_time is not None:
74
+ # starting
75
+ result.continu()
76
+ else:
77
+ if self.stop_time is None:
78
+ # stopping
79
+ result.stop()
80
+ return result
81
+
82
+ def start(self, offset_seconds: float = 0, multiplier: float = 1) -> None:
83
+ """
84
+ Mark the start time for the timer as now.
85
+ Cancels any previous start and stop.
86
+
87
+ Args:
88
+ offset_seconds: is an initial time offset.
89
+ multiplier: is an initial time multiplier (also applied to offset_seconds).
90
+ """
91
+ assert multiplier > 0, 'multiplier must be positive'
92
+ self.start_time = _timeit.default_timer()
93
+ self.stop_time = None
94
+ self.offset_seconds = offset_seconds
95
+ self.multiplier = multiplier
96
+
97
+ def stop(self) -> None:
98
+ """
99
+ Mark the stop time for the timer as now.
100
+ If the stop watch was already stopped, then this overrides the previous stop.
101
+ """
102
+ self.stop_time = _timeit.default_timer()
103
+
104
+ def continu(self) -> None:
105
+ """
106
+ Continue the timer, cancelling any previous stop.
107
+ Any 'pause' time between a stop and continu is not included in the elapsed time.
108
+ """
109
+ if self.stop_time is not None:
110
+ paused_seconds = _timeit.default_timer() - self.stop_time
111
+ self.offset_seconds -= paused_seconds
112
+ self.stop_time = None
113
+
114
+ @property
115
+ def running(self) -> bool:
116
+ """
117
+ Is this stopwatch running?
118
+
119
+ Returns:
120
+ true if the stopwatch is running, false otherwise.
121
+ """
122
+ return self.stop_time is None
123
+
124
+ def set(self, seconds: float, multiplier: float = 1) -> None:
125
+ """
126
+ Set the stopwatch to the given number of seconds.
127
+ This stops the stopwatch and resets the time multiplier.
128
+
129
+ Args:
130
+ seconds: is the value to set the stop watch to.
131
+ multiplier: is reset the time multiplier (also applied to seconds).
132
+ """
133
+ self.start_time = _timeit.default_timer()
134
+ self.stop_time = self.start_time
135
+ self.offset_seconds = seconds
136
+ self.multiplier = multiplier
137
+
138
+ def add(self, seconds: float | StopWatch) -> None:
139
+ """
140
+ Add the given number of seconds to the stopwatch.
141
+ The number of seconds added is not affected by the time multiplier.
142
+ """
143
+ if isinstance(seconds, StopWatch):
144
+ seconds = seconds.seconds()
145
+ self.offset_seconds += seconds / self.multiplier
146
+
147
+ def subtract(self, seconds: float | StopWatch) -> None:
148
+ """
149
+ Subtract the given number of seconds from the stopwatch.
150
+ The number of seconds subtracted is not affected by the time multiplier.
151
+ """
152
+ if isinstance(seconds, StopWatch):
153
+ seconds = seconds.seconds()
154
+ self.offset_seconds -= seconds / self.multiplier
155
+
156
+ def multiply(self, multiplier: float) -> None:
157
+ """
158
+ Multiply the rate of time by the given multiplier.
159
+ Multiplication is accumulative.
160
+ """
161
+ assert multiplier > 0, 'multiplier must be positive'
162
+ self.multiplier *= multiplier
163
+
164
+ def seconds(self) -> float:
165
+ """Number of seconds of elapsed time."""
166
+ if self.stop_time is None:
167
+ time = _timeit.default_timer() - self.start_time
168
+ else:
169
+ time = self.stop_time - self.start_time
170
+ return (time + self.offset_seconds) * self.multiplier
171
+
172
+ def minutes(self) -> float:
173
+ """Number of minutes elapsed."""
174
+ return self.seconds() / 60.0
175
+
176
+ def hours(self) -> float:
177
+ """Number of hours elapsed."""
178
+ return self.seconds() / 3600.0
179
+
180
+ def hms(self) -> Tuple[int, int, float]:
181
+ """
182
+ (hours, minutes, seconds) of elapsed time.
183
+ Hours and minutes will always be integers.
184
+ Only the absolute value of time will be reported
185
+ (i.e., if negative time offsets are used).
186
+ """
187
+ elapsed = abs(self.seconds())
188
+ hours, rem = divmod(elapsed, 3600)
189
+ minutes, seconds = divmod(rem, 60)
190
+ return int(hours), int(minutes), seconds
191
+
192
+ def __str__(self) -> str:
193
+ (hours, minutes, seconds) = self.hms()
194
+ if hours > 0:
195
+ return f'{hours:}:{minutes:0>2}:{seconds:06.3f}'
196
+ elif minutes > 0:
197
+ return f'{minutes:}:{seconds:06.3f}'
198
+ elif seconds >= 0.1:
199
+ return f'{seconds:.3f}'
200
+ elif seconds >= 0.01:
201
+ return f'{seconds:.4f}'
202
+ elif seconds >= 0.001:
203
+ return f'{seconds:.5f}'
204
+ elif seconds >= 0.0001:
205
+ return f'{seconds:.6f}'
206
+ else:
207
+ return str(seconds)
208
+
209
+ def __repr__(self) -> str:
210
+ offset_seconds = self.seconds()
211
+ multiplier = self.multiplier
212
+ running = self.running
213
+ name = self.__class__.__name__
214
+ return f'{name}(offset_seconds={offset_seconds}, multiplier={multiplier}, running={running})'
215
+
216
+ def __float__(self) -> float:
217
+ return self.seconds()
218
+
219
+ def __add__(self, other: float | StopWatch) -> StopWatch:
220
+ """The returned stop watch will be stopped."""
221
+ s = self.copy(running=False)
222
+ s.add(other)
223
+ return s
224
+
225
+ def __iadd__(self, other: float | StopWatch) -> StopWatch:
226
+ self.add(other)
227
+ return self
228
+
229
+ def __sub__(self, other: float | StopWatch) -> StopWatch:
230
+ """The returned stop watch will be stopped."""
231
+ s = self.copy(running=False)
232
+ s.subtract(other)
233
+ return s
234
+
235
+ def __isub__(self, other: float | StopWatch) -> StopWatch:
236
+ self.subtract(other)
237
+ return self
238
+
239
+ def __mul__(self, multiplier: float) -> StopWatch:
240
+ """The returned stop watch will be stopped."""
241
+ s = self.copy(running=False)
242
+ s.multiply(multiplier)
243
+ return s
244
+
245
+ def __imul__(self, multiplier: float) -> StopWatch:
246
+ self.multiply(multiplier)
247
+ return self
248
+
249
+ def __eq__(self, other: StopWatch) -> bool:
250
+ return self.seconds() == other.seconds()
251
+
252
+ def __ne__(self, other: StopWatch) -> bool:
253
+ return self.seconds() != other.seconds()
254
+
255
+ def __lt__(self, other: StopWatch) -> bool:
256
+ return self.seconds() < other.seconds()
257
+
258
+ def __gt__(self, other: StopWatch) -> bool:
259
+ return self.seconds() > other.seconds()
260
+
261
+ def __le__(self, other: StopWatch) -> bool:
262
+ return self.seconds() <= other.seconds()
263
+
264
+ def __ge__(self, other: StopWatch) -> bool:
265
+ return self.seconds() >= other.seconds()
266
+
267
+ def __hash__(self):
268
+ return hash(self.seconds())
269
+
270
+
271
+ class ProgressCheck(StopWatch):
272
+ """
273
+ A class to support simple progress checking in a loop.
274
+ """
275
+
276
+ def __init__(self, reporting_seconds: float, first_check: Optional[float] = None):
277
+ """
278
+ Args:
279
+ reporting_seconds: how often (in seconds) should 'check' return True.
280
+ This is the minimum time between 'check' returning True.
281
+ first_check: when should 'check' first return True (in seconds).
282
+ If first_check is None the default value is reporting_seconds.
283
+ """
284
+ self.reporting_seconds = reporting_seconds
285
+ self.next_check = reporting_seconds if first_check is None else first_check
286
+ super().__init__()
287
+
288
+ def check(self) -> bool:
289
+ """
290
+ Returns:
291
+ True only if it has been long enough since the last True check.
292
+ """
293
+ seconds = self.seconds()
294
+ if seconds > self.next_check:
295
+ self.next_check = seconds + self.reporting_seconds
296
+ return True
297
+ else:
298
+ return False
299
+
300
+ def __bool__(self) -> bool:
301
+ return self.check()
302
+
303
+
304
+ class timer(StopWatch):
305
+
306
+ def __init__(
307
+ self,
308
+ label: str = 'a',
309
+ start_message: str = '{label} timer started',
310
+ stop_message: str = '{label} timer stopped: {time}',
311
+ file=None,
312
+ logger=None
313
+ ):
314
+ """
315
+ Create a timer that will use a stop watch to time a section of code within a 'with' statement.
316
+ The timer label will be printed on entering the 'with' statement.
317
+ The timer label and time taken will be printed on exiting the 'with' statement.
318
+
319
+ Args:
320
+ label: A text string to label the timer.
321
+ start_message: How the 'enter' message will be formatted, including format fields.
322
+ stop_message: How the 'exit' message will be formatted, including format fields.
323
+ file: Where messages should be printed - an output stream.
324
+ logger: Where messages should be printed - a print function.
325
+
326
+ Available format fields:
327
+ {label} the label parameter as passed at construction time.
328
+ {time} the time rendered as per StopWatch.__str__.
329
+ {seconds} the time, in seconds.
330
+ {minutes} the time, in minutes.
331
+ {hours} the time, in hours.
332
+
333
+ Either file or logger may be specified, not both. If neither,
334
+ then the standard output is used.
335
+ """
336
+ super().__init__(running=False)
337
+ self._label = '' if label is None else label
338
+ self._start_message = start_message
339
+ self._stop_message = stop_message
340
+ self._file = file
341
+ self._logger = logger
342
+
343
+ if self._file is not None:
344
+ if self._logger is not None:
345
+ raise RuntimeError('cannot specify both file and logger')
346
+ self._print = self._print_file
347
+ elif self._logger is not None:
348
+ self._print = self._print_logger
349
+ else:
350
+ self._print = self._print_stdout
351
+
352
+ def _print(self, *args):
353
+ pass # dynamically set at construction time
354
+
355
+ def _format_fields(self) -> Dict[str, Any]:
356
+ return {
357
+ 'label': self._label,
358
+ 'time': str(self),
359
+ 'seconds': self.seconds(),
360
+ 'minutes': self.minutes(),
361
+ 'hours': self.hours(),
362
+ }
363
+
364
+ @staticmethod
365
+ def _print_stdout(*args):
366
+ print(*args)
367
+
368
+ def _print_file(self, *args):
369
+ print(*args, file=self._file)
370
+
371
+ def _print_logger(self, *args):
372
+ self._logger(*args)
373
+
374
+ def __enter__(self):
375
+ if self._start_message is not None:
376
+ self._print(self._start_message.format(**self._format_fields()))
377
+ self.start()
378
+ return self
379
+
380
+ def __exit__(self, exc_type, exc_val, exc_tb):
381
+ self.stop()
382
+ if self._stop_message is not None:
383
+ self._print(self._stop_message.format(**self._format_fields()))
384
+ return exc_val is None
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: compiled-knowledge
3
+ Version: 4.0.0
4
+ Summary: A Python package for compiling and querying discrete probabilistic graphical models.
5
+ Author-email: Barry Drake <barry@compiledknowledge.org>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ropeless/compiled_knowledge
8
+ Project-URL: Issues, https://github.com/ropeless/compiled_knowledge/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.12
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE.txt
14
+ Requires-Dist: llvmlite
15
+ Requires-Dist: numpy
16
+ Dynamic: license-file
17
+
18
+ Compiled Knowledge
19
+ ==================
20
+
21
+ Compiled Knowledge is a Python package for compiling and querying discrete probabilistic graphical models.
22
+ The aim of the project is:
23
+ - to provide a Python library for compiling and querying
24
+ probabilistic graphical models, specifically discrete factor graphs,
25
+ which includes Bayesian networks
26
+ - to be extremely efficient, flexible, and easy to use
27
+ - to exhibit excellent design, code, and documentation
28
+ - to support researchers and businesses wanting to explore and use
29
+ probabilistic artificial intelligence.
30
+
31
+ License
32
+ =======
33
+
34
+ MIT license (see the file `LICENSE.txt`).
35
+
36
+
37
+ More Information
38
+ ================
39
+
40
+ Refer to the project online documentation at
41
+ [compiled-knowledge.readthedocs.io](https://compiled-knowledge.readthedocs.io/).
42
+
43
+ The primary repository for the project is
44
+ [github.com/ropeless/compiled_knowledge](https://github.com/ropeless/compiled_knowledge).
45
+
46
+ The Python package is available on PyPI, see
47
+ [pypi.org/project/compiled-knowledge](https://pypi.org/project/compiled-knowledge/).
48
+
49
+ For more information email
50
+ [info@compiledknowledge.org](mailto:info@compiledknowledge.org).
@@ -0,0 +1,182 @@
1
+ ck/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ ck/pgm.py,sha256=DyCDjmqbEUqMh5qCBmWxwGdGefMYA3m574rsuclu7Zk,120987
3
+ ck/circuit/__init__.py,sha256=klUR7OVESf53-8Ho4f32clHFsR2SOz4XgwZzfDlms88,418
4
+ ck/circuit/_circuit_cy.c,sha256=aHeYHbcAUn9wCAM-_uIP4RuIMY6SfdwzP7AytV4ub7A,1741715
5
+ ck/circuit/_circuit_cy.cp312-win32.pyd,sha256=ZPwejAthGMXxT7TLQEjwE0u949BPGx3x7_kLSILb6vI,221184
6
+ ck/circuit/_circuit_cy.pxd,sha256=F1WU4KuX_knXQX-hwNKoHsoUK3fJLbLOxEnomWMJFpI,1057
7
+ ck/circuit/_circuit_cy.pyx,sha256=TIjqsdyN_IzOm9XQw26kEURpL6GSL1kJO3K-UUlkbQc,27763
8
+ ck/circuit/_circuit_py.py,sha256=gQZoEphxut2UyBL0ZqmNc8KlNBSMST_VOCqOpDMIRSM,28331
9
+ ck/circuit/tmp_const.py,sha256=9DVKsAqwNb3BrmaLoxrBoVmFqQ3nacz3wIx7k3qe8SE,2375
10
+ ck/circuit_compiler/__init__.py,sha256=T0Igyp5jPgnIXv4oRcIYhmsOdcNOb3L4Za6dK6eYk7g,132
11
+ ck/circuit_compiler/circuit_compiler.py,sha256=xujLh120_G7AGJpv-IZTI4S1TpNf4gzHilaqvlKvfXA,1148
12
+ ck/circuit_compiler/interpret_compiler.py,sha256=xNpUdzbKgATLgF0beGKIfLonrtcVPitsvqlkqZPsbY4,8790
13
+ ck/circuit_compiler/llvm_compiler.py,sha256=6RHUCVWCOgt3ZNyjRTl2Z2npYJMWyAFJVAIc5SAx2mY,14023
14
+ ck/circuit_compiler/llvm_vm_compiler.py,sha256=XJhiAZmGMRRz49XUfng9lgETxVw6NgD6XCI0H3fX-1E,22200
15
+ ck/circuit_compiler/named_circuit_compilers.py,sha256=snlD3JnhAZC-atKpf5GD0v4CGdvj2_ZhCZ3O-tsxzxc,2284
16
+ ck/circuit_compiler/cython_vm_compiler/__init__.py,sha256=pEAwTleuZgdYhTAQMea2f9YsFK54eoNbZSbrWkW8aeE,49
17
+ ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=xvrw_dKTi6k0gXFN0k13EOSz0fttcnMj-lXo5-kcHR4,871325
18
+ ck/circuit_compiler/cython_vm_compiler/_compiler.cp312-win32.pyd,sha256=BcjxKZaw3PQDBvqNCHuAmLNz1V3_ni7bRTDuWhHksZE,91648
19
+ ck/circuit_compiler/cython_vm_compiler/_compiler.pyx,sha256=550r0AkOh8ZuuTRy3e6Aq-YqBQ82EKcap8e6f3zlEuM,13278
20
+ ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py,sha256=3Q-HCyA7VWFoXS9gn-k4LXedzqHPvdFNvWHfDcKYv6s,4473
21
+ ck/circuit_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ ck/circuit_compiler/support/input_vars.py,sha256=x6krN6sW9A-vZTteY4M4on_0vS4ChaaCcmnXcnQ4y0s,4812
23
+ ck/circuit_compiler/support/llvm_ir_function.py,sha256=07IUmx4bGReDu-BsUhJEWM_onm8NmsHwQzJan1rnAFE,8572
24
+ ck/circuit_compiler/support/circuit_analyser/__init__.py,sha256=RbyIObAAb-w0Ky4fB198xAfxTh2doquN9ez68SZSZgo,536
25
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=n76cKpGes02xYpx5cr6E1ScJDncs5P5uO1YlA7XqxZE,448751
26
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp312-win32.pyd,sha256=m2qWmAWbOv9joMjtFSaQZhr6R4lnQNDuiFczZOBPUtg,47104
27
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.pyx,sha256=ctDOHOjnUhdsR_XHBrgchFVTImLhsEUjU3cqkP-GdF8,3331
28
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_py.py,sha256=eWjc2B946LeSzcGa9PyI4XQvlx_B1KPEiQuM6OOFjjQ,3086
29
+ ck/example/__init__.py,sha256=BXVxvTcl3tqgai-xJiGQIaG_ChlpPRdfWg985MQ7dwM,1744
30
+ ck/example/alarm.py,sha256=QkHoUb6MxZzCOCX4nLE8UJazNEqAPqrFWQ01lslvdsk,25274
31
+ ck/example/asia.py,sha256=IX8L-9YCk_DxE-PjYTv1VL33V2oxkHrL7rHmDkMj3kY,1295
32
+ ck/example/binary_clique.py,sha256=-DD9i_K0P_CsseDaTfmUfQ6sOi1mHycmvUN5H5YFMDI,1061
33
+ ck/example/bow_tie.py,sha256=2C1InBjercVDcqEqagwS6VL-0QT_CXZrH4mX2TQeURo,1047
34
+ ck/example/cancer.py,sha256=U_d6saacBy9eju5cYLe6fS-zgZGzuDYAOBkjFg2dRFw,1735
35
+ ck/example/chain.py,sha256=AAqLeEUzZYir3fqBl9bzY1SZKW3HLT_FJPzXTFSOvuU,1351
36
+ ck/example/child.py,sha256=IkYgd3LBSQI8S3-hwEWcusHuH5MjqGSKNCl0NJnw7O4,7811
37
+ ck/example/clique.py,sha256=auWWzCV3s-r6ctdPKGcb_bulMymU2pEUuKJsqE1Onm4,1088
38
+ ck/example/cnf_pgm.py,sha256=vzr36kokWutGgbfmsI0ZDIgdmWIsUegnO49EUYjgpVQ,1283
39
+ ck/example/diamond_square.py,sha256=IkHuzn_04SKXk2a9YRrxmyr5hxyL7CY3-R-GLbWq-P8,2795
40
+ ck/example/earthquake.py,sha256=KuvHciKlidAJAxgti07BS8XoVIXHJth3khvQkP8tGls,1289
41
+ ck/example/empty.py,sha256=tyg8Z8JIwTMR2C8oXD81pzAzvKpHRBX21ocWLdAUfE8,182
42
+ ck/example/hailfinder.py,sha256=KMT9VobwFGWnw0JRymQTkd35HAIRFQhXnoN87mlhCYQ,39405
43
+ ck/example/hepar2.py,sha256=TGVPdsB3zX3chYpFabvqukg7KY61xvdhjlHEspX_wLw,45692
44
+ ck/example/insurance.py,sha256=Nq8WqpMtWgYv8XgTQo3iL2DzDu-PdmsJBL6fpQjOI-0,31708
45
+ ck/example/loop.py,sha256=9Au9FABY_0X7W-6M4vQljepul010vMIMOh9OA6be14w,1451
46
+ ck/example/mildew.py,sha256=qblE1Fx_P_eYJqu_uptwoCUvIDXhGmO67G6sHLSu0zc,1830957
47
+ ck/example/munin.py,sha256=HbkEOqzq9ZrYzm4uSSOnfVv_rt_NDxmN7Wy4JwDf3Z0,1680209
48
+ ck/example/pathfinder.py,sha256=U1RHp0L6OzdfL4Dh0x6CAb9eMqd6kzkuLavvc16BCjg,2310872
49
+ ck/example/rain.py,sha256=el8cOP51IKjDXw_F4dnh0FIqI5xw0qFRdmg-GyFymsE,1226
50
+ ck/example/rectangle.py,sha256=srcBu90-RsMqYtRKngVxdXS8OQDMIiucx78VcFyN49M,6995
51
+ ck/example/run.py,sha256=HHCfHwrkRCSuplV2msXuZ3azkgC4bjtN8C5cL6UWtp0,994
52
+ ck/example/sachs.py,sha256=_QfzIpA-1OmuN4CeyuybF4YtijDEADQ4laeDyk_AUWo,5807
53
+ ck/example/sprinkler.py,sha256=jkWa_maImVvx8sZGfPd_dz36gFUc3aFlUTqFOKVJAE0,968
54
+ ck/example/star.py,sha256=3vf6xRl4MxRlhj3MGPfwKk3ipSVym-qLYJUDkiUqfe0,1578
55
+ ck/example/stress.py,sha256=ENeOKFVFMa8WkbhhCLt2CIeYdPmHaiU_FOGIy80RYpI,1998
56
+ ck/example/student.py,sha256=XqUIX0DxR0a3G1sqK4MM3V_pvUm3IQ5aY2hpbo_BMlo,1333
57
+ ck/example/survey.py,sha256=KrqDgzU1V-yJHy4BEAAJQatqH9YAy8acrp6rVYAqQag,1611
58
+ ck/example/triangle_square.py,sha256=WQpFrIm8h51ZYNZ9kAtoq3XamUNiVGKCGAsMdSv5urI,2153
59
+ ck/example/truss.py,sha256=w1DNacSg2HyEz_m38t__hdl3zqzKX5pf-tc8M9PLRGo,1979
60
+ ck/in_out/__init__.py,sha256=PKhy5qeUrmmUaECSQIkoLQ2McAfQFSwB06vQZk3vpmo,112
61
+ ck/in_out/parse_ace_lmap.py,sha256=EZnSLhsZwdPnk2Fbe2El0YXYqvjd_cBh7PZro7ZeR04,7891
62
+ ck/in_out/parse_ace_nnf.py,sha256=zO3smkKKiUy_g0S7WeNyhEaZu5x65wuSNIDWlA3YU_g,13350
63
+ ck/in_out/parse_net.py,sha256=ZeHgMXBYUkboMFkbs0y7Px4Ngbooi000obl_wFfym7k,14307
64
+ ck/in_out/parser_utils.py,sha256=5OnvBKGGQbbc9ez8GwwudX2BFYTCF4gbkj6t2f73Esk,5567
65
+ ck/in_out/pgm_pickle.py,sha256=i5LYxez356we7MzHwsQBmFdOvBJOLVKBp4u4lSwBOjU,1004
66
+ ck/in_out/pgm_python.py,sha256=c2-yxXxJ4fF00gUD5Lvt_CSE07EgwYeHW3nSNXunEvc,10092
67
+ ck/in_out/render_bugs.py,sha256=6YBhMIq3VRKFS0XqHbaWj6iz1io7O9icW23kukF_Cic,3383
68
+ ck/in_out/render_net.py,sha256=LpQYAo_tF45vMIcHW1Ir5Zd_Ot69SPAK-e1Tl_6Ygo0,5147
69
+ ck/in_out/render_pomegranate.py,sha256=gGvXyX9vOoilGIIL3rsMB07gERMU-12XPsttfSb4xLI,5764
70
+ ck/pgm_circuit/__init__.py,sha256=B0CCjNMnPzrd0YiOEFdK4JzmRCvFIGJi3RJQ5Vg6fqA,37
71
+ ck/pgm_circuit/marginals_program.py,sha256=DUvSND3ozQuBCZcmIsgwZ4w_IWCVV7O31Pm4PJ7ZDok,14786
72
+ ck/pgm_circuit/mpe_program.py,sha256=-8fcb-txUiKo2bPKhApl_GD7U_gREC5SvU_D5sQe9sg,10226
73
+ ck/pgm_circuit/pgm_circuit.py,sha256=DLjQmaVuAQ0YF6kCi15vDRiydLCJmufeo0hQJndqv2Y,3375
74
+ ck/pgm_circuit/program_with_slotmap.py,sha256=5iIPVvhGncluMR-dfCIqXGjmzSnxLL-btfy80PI23DE,8025
75
+ ck/pgm_circuit/slot_map.py,sha256=T4nBweoiivEdBDhYZ6GWpOXqSusRbp3vrSbCTyP1qpI,857
76
+ ck/pgm_circuit/target_marginals_program.py,sha256=x4YQM-hUQRo2OLxodKJVOAKxqNlxmiDl9nGbbknypkY,3768
77
+ ck/pgm_circuit/wmc_program.py,sha256=WtABU74FOCCJuKRCoDL4CyZ4CJXFmt9RSxiNNHsOhRY,12699
78
+ ck/pgm_circuit/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
+ ck/pgm_circuit/support/compile_circuit.py,sha256=5UtwaGQHWp8I5aVECXGQjkzKqXBRdO8dRunQNGSNdXo,3203
80
+ ck/pgm_compiler/__init__.py,sha256=XCK1AWBBB9UYi6kbFnxMFzBL9a25EWfHnz_yn3ZKYuM,112
81
+ ck/pgm_compiler/factor_elimination.py,sha256=6iMh_NdOQh4D5cuo8q1y7yUuj3glnM9I0OJ9vlJAGqU,13807
82
+ ck/pgm_compiler/named_pgm_compilers.py,sha256=sI-dwF7mht6aEuVfsN3sIO_4oH7RrjIt5x9ZlBwVQys,3376
83
+ ck/pgm_compiler/pgm_compiler.py,sha256=rhbICo7eAY9_dlGfg937zZal7hoc4slTvhxsob-6h_E,622
84
+ ck/pgm_compiler/recursive_conditioning.py,sha256=U0NdIns8yLQtYR_MOf1w__CChpOMDlgRCL2nFRhtnzU,7936
85
+ ck/pgm_compiler/variable_elimination.py,sha256=irAZ5b0vRGL_WGq7UrfQpMXhYBZO5YI2U_jf1-YV92Q,3547
86
+ ck/pgm_compiler/ace/__init__.py,sha256=Rud883H68yz2Dw-NkiiTPC6rmii6hHKMHbtiU6_liug,97
87
+ ck/pgm_compiler/ace/ace.py,sha256=iyDacqArXW1cVP6tBabxRmmLWIHabuPkCoq2tWBm2ww,10397
88
+ ck/pgm_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
+ ck/pgm_compiler/support/clusters.py,sha256=BzMmPWXBEXPvp9dZAuzA19Gbt4j9d-tdQuFbfwXD6MU,21504
90
+ ck/pgm_compiler/support/factor_tables.py,sha256=tV9qE2zC8iwEQxTuXE6qiE6lmMpz4-Vc80_w5woo1tk,15556
91
+ ck/pgm_compiler/support/join_tree.py,sha256=Chkyyo--ChgWEsDqTh8RCxPN7Z1NyvL--GjTC4ONvkY,12897
92
+ ck/pgm_compiler/support/named_compiler_maker.py,sha256=g2MLnlkWXkISHL6dh23EY53SptTo7-itfuZogSpMdB8,1420
93
+ ck/pgm_compiler/support/circuit_table/__init__.py,sha256=yJ05NvuNE9j0E_QnjDzHYfLqcHn5TdOleEpG3wSRgXQ,579
94
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=mezZny5oxdRg6qnfyLnpFuLXR0yvnT56w0Fvx3yRuwA,730350
95
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp312-win32.pyd,sha256=gij5WBNcbwUCiMZxOm2jimObCWwT5GMSBtDVnhGHeIA,87040
96
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.pyx,sha256=rVO1yxjZmZ6yv5s0zKq4Ji9WYrDuYTZsRG_zeF1_1xE,12015
97
+ ck/pgm_compiler/support/circuit_table/_circuit_table_py.py,sha256=h6xPYGBSy6XHQBFLPD2D1-V7Kiw9utY68nWrcGRMEg4,11287
98
+ ck/probability/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
99
+ ck/probability/empirical_probability_space.py,sha256=sO31UIhePRFtkUDN84HT9qhtWsYa0vYaRdXMsttNgTk,2140
100
+ ck/probability/pgm_probability_space.py,sha256=Slmp0mwDMoVh_86Y8L1QjAQsneazcK2VGQcRW8O2C3M,1267
101
+ ck/probability/probability_space.py,sha256=RXNm2gIVcabjbr6WsNebZMKqL8LY32RRaRMGHE2cU6o,26109
102
+ ck/program/__init__.py,sha256=Ss9-0eqsGxCGloD6liH-0iqBG5Q3vPRF4XCw2hkDJ0M,110
103
+ ck/program/program.py,sha256=gDJ5Q2kXZuaoHboa9yNTg0tQH9S-Gmw0BRx6PPV28pU,4184
104
+ ck/program/program_buffer.py,sha256=1fiUcT7sqyr4vu8jXzK3ZsrgURFhWMdm6hr2BeS9ONA,5665
105
+ ck/program/raw_program.py,sha256=3_XXudmdg_z9bwoul7pdrvaWgxRONjveXgPR1CK4hos,4212
106
+ ck/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
+ ck/sampling/forward_sampler.py,sha256=pTtpaH_ONH67G4P-aJ1p8YZSaXr4TTD6pj3ZEI2y7KM,8348
108
+ ck/sampling/marginals_direct_sampler.py,sha256=p1jDr1stG2Hjay3D8hILezW-5YZTX1p3odUcJDAI-OQ,4466
109
+ ck/sampling/sampler.py,sha256=qhfguy8rnVQBVVXhJylvh-8Kq7rfHW62a3DEtv9v7Xc,2306
110
+ ck/sampling/sampler_support.py,sha256=q2osk-o6iWfsMXUhzfv1spPtyB9WQlQAlnuclLyOSQQ,9768
111
+ ck/sampling/uniform_sampler.py,sha256=NCN1T77v4g4hsdNgIsZDxHBndfj4AghLSk8WKQt_2a0,2586
112
+ ck/sampling/wmc_direct_sampler.py,sha256=7qiz-bRlQ59ZBJmg0bEG0y63pXTVXNVx4d410BGhnJg,7265
113
+ ck/sampling/wmc_gibbs_sampler.py,sha256=GMKVW2AVtsWtP6vxE3Y2dy-dKr7GoO_vLEA9eC304fo,6567
114
+ ck/sampling/wmc_metropolis_sampler.py,sha256=PRv7wtPZz7BcwN8iArsykVwqgY77v5km7rXcawFAUPQ,6470
115
+ ck/sampling/wmc_rejection_sampler.py,sha256=cd0VONZf-oa491RRKfwT2LakQs0o_slgPCes8AOvSNc,4897
116
+ ck/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
+ ck/utils/iter_extras.py,sha256=4OwHqOsChnJzTwejqU6Dl4NQX0OOd37ThOltx1NlBUc,4492
118
+ ck/utils/local_config.py,sha256=U-Yt4XW5kjXQmF0X6IPJqq0RgSPWeitA7ggomjpG6HM,9600
119
+ ck/utils/map_list.py,sha256=T2OpjI7eDgC4geCtW_FsEr6ryiePOnKZwfDahB63zfA,3847
120
+ ck/utils/map_set.py,sha256=BLu9BO3FCtzZlZ9MfP9STtIdQ4Me8-QKdwB7o15y7f8,3809
121
+ ck/utils/np_extras.py,sha256=Dt9Y-afUYIf_z5PBQOzh22pg8jRt-DKm2n5jJ6APIdA,1752
122
+ ck/utils/random_extras.py,sha256=U9ODD24FFQL1un4A_qhXQ4bH9OwGGC035ySzyWp1PVU,1860
123
+ ck/utils/tmp_dir.py,sha256=dyxI5j1SC1DJzZpqq0TT9kK8EKawVoZSv69TClW2O6Q,2668
124
+ ck_demos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
+ ck_demos/all_demos.py,sha256=E1SZDvG0l_j1PfHZLemHocezw10uY5uGl3yE3BX87DE,2556
126
+ ck_demos/ace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
+ ck_demos/ace/copy_ace_to_ck.py,sha256=TJHPGcUbd1a6OjH3Fw7c3fno8ULPbf5p3V_lBmiNR-k,303
128
+ ck_demos/ace/demo_ace.py,sha256=Ve_0Ho-jeOrfpFAV-XBSW_jxcWqFYeCQyo_VQd3Aik4,1458
129
+ ck_demos/ace/simple_ace_demo.py,sha256=cC1ZHiq5VbF1LmIjyYaHlUnku_3wP5FJ3sa537x-0xU,664
130
+ ck_demos/circuit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
131
+ ck_demos/circuit/demo_circuit_dump.py,sha256=CQC5cxXaaRuVZ3d8h-SqXs8EJo0Tm5H5l7T9ad6pyEk,458
132
+ ck_demos/circuit/demo_derivatives.py,sha256=3JoWVAEKLEoLjq6QzWkq4Z-qVq1l0tHvGDn5erVuozc,1186
133
+ ck_demos/circuit_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
+ ck_demos/circuit_compiler/compare_circuit_compilers.py,sha256=IEzwvKt6c8wrmAyd6F0sUaNaWYEx1BBFQhRyDt7cibI,756
135
+ ck_demos/circuit_compiler/show_llvm_program.py,sha256=HKUuyLfBjH6ZgD8l4gQWVSBPUh55ZCXjPa7ZEdm5OyU,712
136
+ ck_demos/getting_started/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
+ ck_demos/getting_started/simple_demo.py,sha256=AR40OtUVd-CJOxFlsu8_RtGLL2LLnZg506SzrIx7OQA,668
138
+ ck_demos/pgm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
139
+ ck_demos/pgm/demo_pgm_dump.py,sha256=egcjSjMDJdyzxWGvHrgdF_g3CFYozLKv4XSXzvSfWbg,248
140
+ ck_demos/pgm/demo_pgm_dump_stress.py,sha256=L9S3yp0EQM56kWztV4A6XzEqITOGbThImZIU0JofCDg,285
141
+ ck_demos/pgm/demo_pgm_string_rendering.py,sha256=JTf_M6pPwl9RtOLlpJFQIgNgGuHnsddJbxhgbZOChos,285
142
+ ck_demos/pgm/show_examples.py,sha256=KxK37hKqWD9w9k9RoMCdJgkBIMePf8udQbqaFs-s91c,461
143
+ ck_demos/pgm_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
144
+ ck_demos/pgm_compiler/compare_pgm_compilers.py,sha256=pG0OQBl2wjdCIUU0RM70j8TfCjYUxRU0i13OWpfXUHc,1611
145
+ ck_demos/pgm_compiler/demo_compiler_dump.py,sha256=Jz51szVxaa21cGzibWZ1rzON3U_fdUana87CdCfSoVE,1672
146
+ ck_demos/pgm_compiler/demo_factor_elimination.py,sha256=KDzYwNZJ9HTcPoNxg6lxFoaXJ26QW-nnBI-0Ux_yWoM,1320
147
+ ck_demos/pgm_compiler/demo_join_tree.py,sha256=E7ZqFrRuAmnSRmBTDqNGxD-KFlHOtd_jIju8UJssUfM,574
148
+ ck_demos/pgm_compiler/demo_marginals_program.py,sha256=44-ZkA8KyWPXWBnbnRGQin6cP_hWY50OfQpy7LckWNo,1863
149
+ ck_demos/pgm_compiler/demo_mpe_program.py,sha256=TTI3mm4MbF_FlpB7EwM8mB6sOhK8E2eLrJLlySmTKVg,1453
150
+ ck_demos/pgm_compiler/demo_pgm_compiler.py,sha256=LaBVSD5bXAVvEelQiT_PxA4U9AC76gcsCa3CaVcHcVw,1127
151
+ ck_demos/pgm_compiler/demo_recursive_conditioning.py,sha256=kVZ4nQ_vlDM94a3ebjyX9sG4gAvsHdKzlVqUJ4dlxNc,862
152
+ ck_demos/pgm_compiler/demo_variable_elimination.py,sha256=9zDPxTYr6pnxNDBGa989Ffr3tvQdKXioG2A6JPzKw4Y,858
153
+ ck_demos/pgm_compiler/demo_wmc_program.py,sha256=SPyok8RqXY2q6NsQc6e2OW_WtyOw10etPfocRdGF1ng,818
154
+ ck_demos/pgm_compiler/time_fe_compiler.py,sha256=F6huBVmJ3jDdDDXOGt1BVTt5zmGGK127HnnV-RK2zbE,3700
155
+ ck_demos/pgm_inference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
+ ck_demos/pgm_inference/demo_inferencing_basic.py,sha256=qrai48Kn7fbpGb_RF5olUsavqzjyZ0JOpk3DvovS18I,5774
157
+ ck_demos/pgm_inference/demo_inferencing_mpe_cancer.py,sha256=HJ3QHUqe090HEbhXHLCtkwDBdcIxec9zbZYDuaWZMW8,1599
158
+ ck_demos/pgm_inference/demo_inferencing_wmc_and_mpe_sprinkler.py,sha256=OnGOck7CSggGfTUBJybpheKGKpkvu_2lzHcQVJZDCZo,5282
159
+ ck_demos/pgm_inference/demo_inferencing_wmc_student.py,sha256=ky-_ieJm7xvfplJeme_1pBuJmTqz7f2Q8ax_cv1BxOs,3578
160
+ ck_demos/programs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
161
+ ck_demos/programs/demo_program_buffer.py,sha256=2XuBE15PmJOtdsyzqlq_LgHrYPj59_Ej8O37PpKyKvs,650
162
+ ck_demos/programs/demo_program_multi.py,sha256=8mTZycb5onaDKThLOvoR9oeCdWD8k8K0hVIKxCxMkq0,624
163
+ ck_demos/programs/demo_program_none.py,sha256=PDo3Ua0j-g8GXrAfLt3oWa2H-_cTMvo_7GwNimCRaNc,480
164
+ ck_demos/programs/demo_program_single.py,sha256=CVbipru3BxUGol565MY3Q_G0z4GLNnSrgFMw58ilU0Q,598
165
+ ck_demos/programs/demo_raw_program_dump.py,sha256=A8eNKxK618FxAVnMMMOdvSz_nwZEaDUvuQKoey6w9dA,370
166
+ ck_demos/programs/demo_raw_program_interpreted.py,sha256=iPbGXsj8ZQl4RMIZZBF7oDHEEnAl31kIilQFPcqSA98,528
167
+ ck_demos/programs/demo_raw_program_llvm.py,sha256=a3V85jgyqrCBJpBmfVWpY9Nx5l0WhfvzgIXEdCcxRXA,523
168
+ ck_demos/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
+ ck_demos/sampling/check_sampler.py,sha256=ZiXYS9CqGCX-Hd7zMKR_2TWZYTbbgF7TIqvYtq1Ofj0,2106
170
+ ck_demos/sampling/demo_marginal_direct_sampler.py,sha256=RhNunuIUnYI_GXp9m8wzadMrgH9LYrr_Ohh1NApcFDk,1149
171
+ ck_demos/sampling/demo_uniform_sampler.py,sha256=Z6tX_OYKGLc_w3-kEPK4KEZlJo7F5HOq_tUVppB_VQE,962
172
+ ck_demos/sampling/demo_wmc_direct_sampler.py,sha256=c7maxTmZyIijaVdFs2h_KQbK30LvI-oCm2BXSUXVoD8,1113
173
+ ck_demos/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
174
+ ck_demos/utils/compare.py,sha256=Bwjpflevl4nusfA0zp96rInaVKFGuhC5Xv7HzA1Fobk,5088
175
+ ck_demos/utils/convert_network.py,sha256=TSKj8q7L7J5rhrvwjaDkdYZ0Sg8vV5FRL_vCanX1CQw,1363
176
+ ck_demos/utils/sample_model.py,sha256=in-Nlv-iuNIu6y9fDuMyo7nzgimBuTAnCWcpnVqvqDQ,8839
177
+ ck_demos/utils/stop_watch.py,sha256=VzXHRWx0V8vPSD-bLgLlEYkCkR2FA0-KmM_pfKx-Pxo,13205
178
+ compiled_knowledge-4.0.0.dist-info/licenses/LICENSE.txt,sha256=uMYx7tmroEKNASizbCOwPveMQsD5UErLDC1_SANmNn8,1089
179
+ compiled_knowledge-4.0.0.dist-info/METADATA,sha256=aq2yDSOHov6FjnU2owvoYdJdKU9y8MI4o7bTVrsZ2T8,1835
180
+ compiled_knowledge-4.0.0.dist-info/WHEEL,sha256=LwxTQZ0gyDP_uaeNCLm-ZIktY9hv6x0e22Q-hgFd-po,97
181
+ compiled_knowledge-4.0.0.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
182
+ compiled_knowledge-4.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-win32
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Barry Drake
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ ck
2
+ ck_demos