compiled-knowledge 4.0.0a20__cp313-cp313-musllinux_1_2_x86_64.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 (178) hide show
  1. ck/__init__.py +0 -0
  2. ck/circuit/__init__.py +17 -0
  3. ck/circuit/_circuit_cy.c +37520 -0
  4. ck/circuit/_circuit_cy.cpython-313-x86_64-linux-musl.so +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 +74 -0
  9. ck/circuit_compiler/__init__.py +2 -0
  10. ck/circuit_compiler/circuit_compiler.py +26 -0
  11. ck/circuit_compiler/cython_vm_compiler/__init__.py +1 -0
  12. ck/circuit_compiler/cython_vm_compiler/_compiler.c +19821 -0
  13. ck/circuit_compiler/cython_vm_compiler/_compiler.cpython-313-x86_64-linux-musl.so +0 -0
  14. ck/circuit_compiler/cython_vm_compiler/_compiler.pyx +380 -0
  15. ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py +121 -0
  16. ck/circuit_compiler/interpret_compiler.py +223 -0
  17. ck/circuit_compiler/llvm_compiler.py +388 -0
  18. ck/circuit_compiler/llvm_vm_compiler.py +546 -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 +10615 -0
  23. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cpython-313-x86_64-linux-musl.so +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 +234 -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 +68 -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 +54 -0
  58. ck/example/truss.py +49 -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 +480 -0
  63. ck/in_out/parser_utils.py +185 -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 +3475 -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 +237 -0
  73. ck/pgm_circuit/pgm_circuit.py +79 -0
  74. ck/pgm_circuit/program_with_slotmap.py +236 -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 +83 -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 +63 -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 +16393 -0
  90. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cpython-313-x86_64-linux-musl.so +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 +568 -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 +50 -0
  100. ck/probability/pgm_probability_space.py +32 -0
  101. ck/probability/probability_space.py +622 -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 +67 -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 +232 -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 +163 -0
  118. ck/utils/local_config.py +270 -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/all_demos.py +88 -0
  129. ck_demos/circuit/__init__.py +0 -0
  130. ck_demos/circuit/demo_circuit_dump.py +22 -0
  131. ck_demos/circuit/demo_derivatives.py +43 -0
  132. ck_demos/circuit_compiler/__init__.py +0 -0
  133. ck_demos/circuit_compiler/compare_circuit_compilers.py +32 -0
  134. ck_demos/circuit_compiler/show_llvm_program.py +26 -0
  135. ck_demos/pgm/__init__.py +0 -0
  136. ck_demos/pgm/demo_pgm_dump.py +18 -0
  137. ck_demos/pgm/demo_pgm_dump_stress.py +18 -0
  138. ck_demos/pgm/demo_pgm_string_rendering.py +15 -0
  139. ck_demos/pgm/show_examples.py +25 -0
  140. ck_demos/pgm_compiler/__init__.py +0 -0
  141. ck_demos/pgm_compiler/compare_pgm_compilers.py +63 -0
  142. ck_demos/pgm_compiler/demo_compiler_dump.py +60 -0
  143. ck_demos/pgm_compiler/demo_factor_elimination.py +47 -0
  144. ck_demos/pgm_compiler/demo_join_tree.py +25 -0
  145. ck_demos/pgm_compiler/demo_marginals_program.py +53 -0
  146. ck_demos/pgm_compiler/demo_mpe_program.py +55 -0
  147. ck_demos/pgm_compiler/demo_pgm_compiler.py +38 -0
  148. ck_demos/pgm_compiler/demo_recursive_conditioning.py +33 -0
  149. ck_demos/pgm_compiler/demo_variable_elimination.py +33 -0
  150. ck_demos/pgm_compiler/demo_wmc_program.py +29 -0
  151. ck_demos/pgm_compiler/time_fe_compiler.py +93 -0
  152. ck_demos/pgm_inference/__init__.py +0 -0
  153. ck_demos/pgm_inference/demo_inferencing_basic.py +188 -0
  154. ck_demos/pgm_inference/demo_inferencing_mpe_cancer.py +45 -0
  155. ck_demos/pgm_inference/demo_inferencing_wmc_and_mpe_sprinkler.py +154 -0
  156. ck_demos/pgm_inference/demo_inferencing_wmc_student.py +110 -0
  157. ck_demos/programs/__init__.py +0 -0
  158. ck_demos/programs/demo_program_buffer.py +24 -0
  159. ck_demos/programs/demo_program_multi.py +24 -0
  160. ck_demos/programs/demo_program_none.py +19 -0
  161. ck_demos/programs/demo_program_single.py +23 -0
  162. ck_demos/programs/demo_raw_program_interpreted.py +21 -0
  163. ck_demos/programs/demo_raw_program_llvm.py +21 -0
  164. ck_demos/sampling/__init__.py +0 -0
  165. ck_demos/sampling/check_sampler.py +71 -0
  166. ck_demos/sampling/demo_marginal_direct_sampler.py +40 -0
  167. ck_demos/sampling/demo_uniform_sampler.py +38 -0
  168. ck_demos/sampling/demo_wmc_direct_sampler.py +40 -0
  169. ck_demos/utils/__init__.py +0 -0
  170. ck_demos/utils/compare.py +120 -0
  171. ck_demos/utils/convert_network.py +45 -0
  172. ck_demos/utils/sample_model.py +216 -0
  173. ck_demos/utils/stop_watch.py +384 -0
  174. compiled_knowledge-4.0.0a20.dist-info/METADATA +50 -0
  175. compiled_knowledge-4.0.0a20.dist-info/RECORD +178 -0
  176. compiled_knowledge-4.0.0a20.dist-info/WHEEL +5 -0
  177. compiled_knowledge-4.0.0a20.dist-info/licenses/LICENSE.txt +21 -0
  178. compiled_knowledge-4.0.0a20.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.0a20
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,178 @@
1
+ ck/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ ck/pgm.py,sha256=ncrFgDDHAfnj4bITJaVXDLNOAH7xOvi3syU516mJ17s,117225
3
+ ck/circuit/__init__.py,sha256=B1jwDE_Xb6hOQE8DecjaTVotOnDxJaT7jsvPfGDXqCU,401
4
+ ck/circuit/_circuit_cy.c,sha256=cYgImlSHKRuJi8qXsXOjYlucXqJPe7ttRy20w1kCEAM,1704754
5
+ ck/circuit/_circuit_cy.cpython-313-x86_64-linux-musl.so,sha256=xjPvXqDk_GnQYBmKjzIp-yiyfQDjY6A2l1i8jDX4vDY,2185928
6
+ ck/circuit/_circuit_cy.pxd,sha256=ZcW8xjw4oGQqD5gwz73GXc1H8NxpdAswFWzc2CUWWcA,1025
7
+ ck/circuit/_circuit_cy.pyx,sha256=PloIztVKt8Fj_2DlATqjm8ZcZar6ozCkLazEYsH4dHE,27005
8
+ ck/circuit/_circuit_py.py,sha256=4pPHnkXFczk-ea2OeBSc_bLppMyprDkeeQMwp4MCrVo,27505
9
+ ck/circuit/tmp_const.py,sha256=wgi4P3xrTRLPXNMmWYpYaJWlm-lekQOdxg4rkXZC3Wk,2298
10
+ ck/circuit_compiler/__init__.py,sha256=eRN6chBEt64PK5e6EFGyBNZBn6BXhXb6R3m12zPA1Qg,130
11
+ ck/circuit_compiler/circuit_compiler.py,sha256=bb-SG8xrcp4y2nCNB0GIWcgOufEsR2Nb52qtrLMHTVs,992
12
+ ck/circuit_compiler/interpret_compiler.py,sha256=wnbWWeQibT5y6Y4YbDDVxGTyL5kCP4dEHAD9LHe8y6w,7127
13
+ ck/circuit_compiler/llvm_compiler.py,sha256=l9j_fdMlDuCmk8G_zm6Uaedv_j0AUy-J6XejF3trAnw,13621
14
+ ck/circuit_compiler/llvm_vm_compiler.py,sha256=-yZ2dPP8eOy0l5x-cVB-v2qpS7gWod2gXg1h44l0HPA,21327
15
+ ck/circuit_compiler/named_circuit_compilers.py,sha256=paKyG876tdG_bdSHJU6KW5HxQrutmV_T80GPpz8A65s,2227
16
+ ck/circuit_compiler/cython_vm_compiler/__init__.py,sha256=ks0sISOJ-XHIHgHnESyFsheNWvcSJQkbsrj1wVlnzTE,48
17
+ ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=GItHVCgKSk0XLiMZhps6UUJpPSdgUSGi5HZF0XlQqwc,847223
18
+ ck/circuit_compiler/cython_vm_compiler/_compiler.cpython-313-x86_64-linux-musl.so,sha256=FugEUeQoa3yy6GECNzRR8kscf6443BTbEBiwzbjmHGs,898528
19
+ ck/circuit_compiler/cython_vm_compiler/_compiler.pyx,sha256=uSyNMRd5h0yetA-vi6uA-8O6m_0hfU9w3PxKgM4RAl4,12845
20
+ ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py,sha256=mG7yweTxhl_Ez8sDQ9l032A5P3L7ojvAwp7V4vGhjJM,3945
21
+ ck/circuit_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ ck/circuit_compiler/support/input_vars.py,sha256=EZrvyhD9XVtf5GuDBluFNWhAOVixP7-_ETxAHLTpBcs,4664
23
+ ck/circuit_compiler/support/llvm_ir_function.py,sha256=MolcEsjoZvD__r6MvaThrjworzidgIigEG9TiyTTUdI,7545
24
+ ck/circuit_compiler/support/circuit_analyser/__init__.py,sha256=WhNwfg7GHVeI4k_m7owPGWxX0MyZg_wtcp2MA07qbWg,523
25
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=K1A4fEL325YPZLqGHyjdBjsGBpthhiQOruwWnL8G1H8,438037
26
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cpython-313-x86_64-linux-musl.so,sha256=ZM3Q5XMlrpZoj9JGpnZ7E5j4H_mGzR_nkdPAdS4Jq74,346760
27
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.pyx,sha256=a0fKmkwRNscJmy6qoO2AOqJYmHYptrQmkRSrDg3G-wg,3233
28
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_py.py,sha256=CMdXV6Rot5CCoK1UsurQdGK0UOx_09B6V7mCc_6-gfI,2993
29
+ ck/example/__init__.py,sha256=kxVqIftmC3Ci6LUFelEFD085qTFYx51wW0XHDDnW0C0,1691
30
+ ck/example/alarm.py,sha256=Z7b0X0hxXq3o1nhveEQ5P99ULb8YzvcAlKvDyDu-pi0,24908
31
+ ck/example/asia.py,sha256=vS81n-qyhHscW8yG__9TQvDHLI-s6y6gaDetfOKMvFw,1267
32
+ ck/example/binary_clique.py,sha256=yeOsKzcUndIAzKVknrBY51iLoZBeHWEZU-CWB-gDNas,1029
33
+ ck/example/bow_tie.py,sha256=z63d0WiZSzgkFF7jvFNljc2IFVX3AE9kPeflGpRDyNk,1014
34
+ ck/example/cancer.py,sha256=-FnLbfb9yxriLl97N5BDZ0VrDZ5UnOWlT-Ep_tzO6QI,1698
35
+ ck/example/chain.py,sha256=aPlqMtqWO2BOz1WLXFtVwT3uPKN2E2Z7a7TSPvtloQU,1313
36
+ ck/example/child.py,sha256=qb3cOJms_Bzdfgk0aDrHwfFjjBojCfAYQnorv3p3rQM,7612
37
+ ck/example/clique.py,sha256=c3bATknqkD3QJztHQffgyL6_WzupWUpLSnI-EIEndqg,1055
38
+ ck/example/cnf_pgm.py,sha256=qDm1ouN4zX5pThbStfTRNph4tWjSySBgZJHeSbSkofk,1244
39
+ ck/example/diamond_square.py,sha256=HqGqmInYTpAsCBuz3s8FuhT2Jnc11L3wGCTgJDmFLjw,2722
40
+ ck/example/earthquake.py,sha256=3L3vZFv_Afu1I5ScKo5MAQRbSQUegtbXrmlB0o6eUXA,1253
41
+ ck/example/empty.py,sha256=RU3kjIrWSCBoqK_XZqk82GhI-0blu1dzM32UtGe5Y0Q,172
42
+ ck/example/hailfinder.py,sha256=7M-J0XqFeNxK-TsdbOYu-GX581oM7wY1INEvTTSwqfs,38866
43
+ ck/example/hepar2.py,sha256=XeJGZfmBJCT8hwvwTa-McF8DG2Eh13nVrJTCAaPVC0o,45064
44
+ ck/example/insurance.py,sha256=XRycrk8YBLxv5cQXWd4uIWW5fHhD1_Le9XKdNz_yJA4,31204
45
+ ck/example/loop.py,sha256=Zkzz5SyqKXyWb-ZZColViUOOH7_TJoQLxxl4eMnCHMg,1411
46
+ ck/example/mildew.py,sha256=Hfn_nQUhZVK6wFzNgxjD8HgzxgGxU1TWTZcWUrN3tDU,1792796
47
+ ck/example/munin.py,sha256=IZvZrVXDi2Zeu0M-nWIpIbzQu-U0cv0Be6dz960L5lo,1657227
48
+ ck/example/pathfinder.py,sha256=rQckvasnbzBYYESxngE_xbhyXxoJlELeiYc6Ghh7iFk,2257125
49
+ ck/example/rain.py,sha256=kLTU_9f_-_yy0ymPnS9-cbFVT6fYyCanDgszk3vQOgc,1187
50
+ ck/example/rectangle.py,sha256=T-w2Iq5LKV2MXRI1Kk8tXRFgkSUVHYLtnZepdXMzQmw,6834
51
+ ck/example/run.py,sha256=nYfC_prwCRBN0uawLvrRVsl5IFag9VrQ5x_hhWmr-18,964
52
+ ck/example/sachs.py,sha256=X-2stEbTlnV9hGuo2u6z19jqxJ2mFcIvDQfQnWGuKvc,5678
53
+ ck/example/sprinkler.py,sha256=t8RIiPorf3QXYyTXbxFkSrK1SsG5ALWmTfTsFUq2C_c,938
54
+ ck/example/star.py,sha256=HINw4Kr3WwSsH5QpnO_rZssLCdWDaO4xn1E4Niq1p_8,1534
55
+ ck/example/stress.py,sha256=Te33I7Pb6nz-NjA4as_ZbfrKorJObAwdYFXo_ordasc,1934
56
+ ck/example/student.py,sha256=WayCWuMCrE0YSXez-a8TuptS53R6PBG2argyCsas7mc,1290
57
+ ck/example/survey.py,sha256=ubjM8EP7aQMQbx7XFMaXvSYBOPuUDHeyG6wZIlRDqD8,1565
58
+ ck/example/triangle_square.py,sha256=4JpB-p9hBfCz3Jn1sOKb5qlp5W04Kqm0rdHk2KuZ4lQ,2094
59
+ ck/example/truss.py,sha256=7SM16u6rJVrWIPKRWVTJve13XNnb_CKta4_iIv_sXzY,1925
60
+ ck/in_out/__init__.py,sha256=3sLg8hHG_AWEJ7Kn06ZziFbVBUybKVTUPZCyqhr2qAw,109
61
+ ck/in_out/parse_ace_lmap.py,sha256=UqZpkW1yNXNpdLEcMeXlve6tataaFuKP7caoKysQ8pE,7675
62
+ ck/in_out/parse_ace_nnf.py,sha256=faTCrCeuc-m_EUHNJFAg9IItZJ77-bvPzSbLYBeDFaw,13028
63
+ ck/in_out/parse_net.py,sha256=AtgSkLFI6HDcVnmxZ5CP0C5Q4GZL9lcySDIK9uSvY_c,13822
64
+ ck/in_out/parser_utils.py,sha256=HV9cYw_-zxHN7fUBs4wG2A4Zl5P4YEAuSLGQRFNWV9c,5255
65
+ ck/in_out/pgm_pickle.py,sha256=UhGCDHGVNEDtTwZjcCWyUWw00YXVgBGxek4fbBvLExs,962
66
+ ck/in_out/pgm_python.py,sha256=6dnF9gzVdMrY0kkdsPg-ryVBwfmAo4bKoTwx17ociGg,9824
67
+ ck/in_out/render_bugs.py,sha256=c39KbaD4gEiauFsZq2KUhDEEa-3cuY5kuvz97pEWVpw,3272
68
+ ck/in_out/render_net.py,sha256=VePvN6aYWuzEkW-Hv-qGT9QneOvsnrBMmS_KYueuj2I,4970
69
+ ck/in_out/render_pomegranate.py,sha256=tU7iDHkLWTJyFrxPa2LbZnD06qia8mG2FGi0aZAKuk0,5580
70
+ ck/pgm_circuit/__init__.py,sha256=FctIFEYdL1pwxFMMEEu5Rwgq3kjPar-vJTqAmgIqb-I,36
71
+ ck/pgm_circuit/marginals_program.py,sha256=E-L-4Rc2YLs3ndXIfXpTxUYGEFJG1_BkaZVDBs9gcgQ,14434
72
+ ck/pgm_circuit/mpe_program.py,sha256=0pRkWqNlIAk-pgrS4pM6y5K9jX4vfDrButyGax2aius,9994
73
+ ck/pgm_circuit/pgm_circuit.py,sha256=VBgHk7uDNYiElesEQxdmlU2iRn0bfHYWik2Cb6t838g,3208
74
+ ck/pgm_circuit/program_with_slotmap.py,sha256=HQNxLTYdxb1noAjyzvX3LknI9vT2RPk5UmYF__fn9Jg,8723
75
+ ck/pgm_circuit/slot_map.py,sha256=pqN0t5ElmUjR7SzvzldQwnO-jjRIz1rNZHH1PzE-V88,822
76
+ ck/pgm_circuit/target_marginals_program.py,sha256=qWz9FkAFzt8YHLZJzPkpRnvDH76BXm-dcEWhoqCkrOw,3665
77
+ ck/pgm_circuit/wmc_program.py,sha256=Btq7jUot-PodWXrgDFaE6zhUtr6GPUNF217CVLTaB70,12376
78
+ ck/pgm_circuit/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
+ ck/pgm_circuit/support/compile_circuit.py,sha256=TCaqtuHusVbZdidOuLWaw3kZrDTklFMEzkDqeGImx6A,3401
80
+ ck/pgm_compiler/__init__.py,sha256=Ga0dTOetOovHwNN4WS-o4fyyh7255xL0bUTdK29p2LY,110
81
+ ck/pgm_compiler/factor_elimination.py,sha256=A6pwSJZ3tBNXqrYcp8WXNn86nbwTkOiAzlx6STcqqqI,13412
82
+ ck/pgm_compiler/named_pgm_compilers.py,sha256=uxnVwZVLPO3ocGLK5gIs2vYY1MxiIWHRDTT0Ph-RkRY,3358
83
+ ck/pgm_compiler/pgm_compiler.py,sha256=VRGxWcnXgyXd1Twusw8tm1Yqv1VFPmb2LBsOu4UZv8k,597
84
+ ck/pgm_compiler/recursive_conditioning.py,sha256=vdDSrMO1yPQHNlLQha5ybg3a7l1SiygsmniI_pQhU-Q,7705
85
+ ck/pgm_compiler/variable_elimination.py,sha256=R3dV9Mbw8u2rf7wJ2upGiy1QKjc65gFAOEYCDaD3sZ8,3456
86
+ ck/pgm_compiler/ace/__init__.py,sha256=5HWep-yL1Mr6z5VWEaIYpLumCdeso85J-l_-hQaVusM,96
87
+ ck/pgm_compiler/ace/ace.py,sha256=An83dHxE_gQFcEs6H5qgm0PlNFnJSGGuvLJNC2H3hGU,10098
88
+ ck/pgm_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
+ ck/pgm_compiler/support/clusters.py,sha256=efyCtJehUBtyYUVE1hbB3co7MNgJSJVb-fo2HMMIWvg,20813
90
+ ck/pgm_compiler/support/factor_tables.py,sha256=0EKJC0YU8h9J8oFpd6JSjDDooNCaNmIwiQQs7ovrGWY,15150
91
+ ck/pgm_compiler/support/join_tree.py,sha256=_rNmjp2OjP6aa-IBr4sMwOSnY0tZC1zleHdql4bhn1Q,12562
92
+ ck/pgm_compiler/support/named_compiler_maker.py,sha256=Qz8a9gwY46Q3dtRCZEZ2czq5z52QroGVKN5UDcoXI3c,1377
93
+ ck/pgm_compiler/support/circuit_table/__init__.py,sha256=1kWjAZR5Rj6PYNdbCEbuyE2VtIDQU4Qf-3HPFzBlezs,562
94
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=LQ-8IQyJpOqVOzhKV-00TckmkfMBO1PQAE784jQ-z2M,713858
95
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cpython-313-x86_64-linux-musl.so,sha256=GddjQ8raiLTVNoYpDz2CPKpk1o85GsQjYLI3Znm_048,807800
96
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.pyx,sha256=Fsjw8P9clKQioqlLyr1JirUK5oYkeotpDMy5sMo7Khk,11683
97
+ ck/pgm_compiler/support/circuit_table/_circuit_table_py.py,sha256=OZJC-JGX3ovCSv7nJtNYq7735KZ2eb4TQOlZdZbhPmk,10983
98
+ ck/probability/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
99
+ ck/probability/empirical_probability_space.py,sha256=839eEJi9AW4U9KGzAo-_K-4Ae2M5tdijzMvbYPCO9c0,1900
100
+ ck/probability/pgm_probability_space.py,sha256=o-IVo-PfM-Qu1BZ8xatpFhmaa7SZztnck569FHSdTNo,1002
101
+ ck/probability/probability_space.py,sha256=gjH8la8ZGegWTYetpY16XdbwqEniqy-CiqoDFWRLzkM,25260
102
+ ck/program/__init__.py,sha256=Rifdxk-l6cCjXLpwc6Q0pVXNDsllAwaFlRqRx3cURho,107
103
+ ck/program/program.py,sha256=ohsnE0CEy8O4q8uGB_YEjoJKAPhY1Mz_a08Z7fy7TLw,4047
104
+ ck/program/program_buffer.py,sha256=IHwAHTKIaUlhcbNFTuSxPWKyExIsOxxX6ffUn4KfheU,5485
105
+ ck/program/raw_program.py,sha256=6TNVfddolgSAj2BoUCLX3J9wjeWSvi1z1kaVXMavDzs,2559
106
+ ck/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
+ ck/sampling/forward_sampler.py,sha256=gHWEue69Z7EcrnHlVURJBhZh1t5RApMV0ioxJao3GkU,8137
108
+ ck/sampling/marginals_direct_sampler.py,sha256=S4kfmvgPfh_dyn-D2WumrH6SMvLc6sFF7fRswGOS1gA,4353
109
+ ck/sampling/sampler.py,sha256=LtMm9_kBlZeuIEdYr_DcO218f7OUSnciddiEaEE22Dc,2244
110
+ ck/sampling/sampler_support.py,sha256=SQytIhr3qlIcNjYu9cF7sAxhjiXFLlCwPlsMIOJVH1c,9510
111
+ ck/sampling/uniform_sampler.py,sha256=XV7i0urWgsJ0nIQA6ONlO8GevsfRdw1dfZuqzRdbnBA,2514
112
+ ck/sampling/wmc_direct_sampler.py,sha256=Pkv-u4GjN3npBrcQ92raoTrEIel1vpiDoE8LrlcfYJE,7094
113
+ ck/sampling/wmc_gibbs_sampler.py,sha256=t5pIxr3Kkz37hG0guxVUQWivUZ1T-4lT47yu8qxrZko,6414
114
+ ck/sampling/wmc_metropolis_sampler.py,sha256=jfXb-MG0jAoMyepgq9zel2amqK-gmYrCtKuxJStl8VY,6305
115
+ ck/sampling/wmc_rejection_sampler.py,sha256=Kk7hDvfnI37CQhFlAW2-UoxtoSbQBoMesghMlwrX6_Y,4782
116
+ ck/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
+ ck/utils/iter_extras.py,sha256=9BQpCKltbM_hcMIPFfJhqvWSvY2Mz3vzXdoSbfezR5k,4316
118
+ ck/utils/local_config.py,sha256=RsP1QwIINw3F7KFVeJEML0Zul3Pm4YEkadVENfqHE6I,9265
119
+ ck/utils/map_list.py,sha256=0UkTDg-ZlWkuxiM-1OhaUYh5MRgMz0rAppDtE2RryEY,3719
120
+ ck/utils/map_set.py,sha256=T5E3j4Lz08vg8eviRBc-4F10xz1-CKIg6KiHVoGhdts,3681
121
+ ck/utils/np_extras.py,sha256=7znw6-gPmSkMJTVQOynXzvuHHz70zXxcsawJM8RaPCs,1683
122
+ ck/utils/random_extras.py,sha256=l9CfQM6k-b6KGESJXw9zF--Hqp4yadw2IU9uSoklai0,1796
123
+ ck/utils/tmp_dir.py,sha256=Emln4TIyO-cFrhgcpoH10awakJoRgoDCVgwFKmt1-So,2574
124
+ ck_demos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
+ ck_demos/all_demos.py,sha256=tqnMFbW6t1F4ksErf6QYTz9XtvbfayWl35lD3Bjm47E,2468
126
+ ck_demos/ace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
+ ck_demos/ace/copy_ace_to_ck.py,sha256=t0Wg1-8_f9YPlEbBp-YGJ0N3u7a3ZIqcI70MOeV5Kgo,288
128
+ ck_demos/ace/demo_ace.py,sha256=wsWETo1r2GG86Mzo2VD4J1TZiVlvYjVC5A-WMs-zcsw,1409
129
+ ck_demos/circuit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
130
+ ck_demos/circuit/demo_circuit_dump.py,sha256=85x7UJV6cg6XVYU-PPsuKQVTBw5WZBfkhi6Avo9XbOs,436
131
+ ck_demos/circuit/demo_derivatives.py,sha256=6VwnW_Dbm2MWQFfJ46UQQFecV56QdfGpL7srthw5Py0,1143
132
+ ck_demos/circuit_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
+ ck_demos/circuit_compiler/compare_circuit_compilers.py,sha256=m0cWMtGXQ8eQSagg-5j1sL7Pt3zn0H9mWTU4UavPocI,724
134
+ ck_demos/circuit_compiler/show_llvm_program.py,sha256=tlL3TRScb_Mqc-Mbj0M2-WCSPSJPT4glTVVeyfi4gj0,686
135
+ ck_demos/pgm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
+ ck_demos/pgm/demo_pgm_dump.py,sha256=-Hx-JLsi_6HC1bIZ2TcVPHSt1HV_CRbJRsl_FU9FuCQ,230
137
+ ck_demos/pgm/demo_pgm_dump_stress.py,sha256=urWeg4K7Fe718mPybN7gcWLbfcQt9XxgetwWUOmDmLc,267
138
+ ck_demos/pgm/demo_pgm_string_rendering.py,sha256=JVAqRSblhZogaOZonYTYDAUncGRyLpt17e98BCYhrYU,270
139
+ ck_demos/pgm/show_examples.py,sha256=-35_E9psOX16VvqArZUr9uoUYD6_AmiE3nLEny9REes,436
140
+ ck_demos/pgm_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
141
+ ck_demos/pgm_compiler/compare_pgm_compilers.py,sha256=jjzvRRmkTVYOF_Uzx5r95V0OQ63GjS51XmPLPgLWDLU,1548
142
+ ck_demos/pgm_compiler/demo_compiler_dump.py,sha256=Lrp7rvkY9nIxz4koFgsmswCcA6CxrJNXWr72WzPXOe4,1612
143
+ ck_demos/pgm_compiler/demo_factor_elimination.py,sha256=2jn0hBSXbWOGv0i1pxIoZixjqzYXx4ks0bjEz06SO5k,1273
144
+ ck_demos/pgm_compiler/demo_join_tree.py,sha256=_ynxTySDrqGS1kh6ofzIjLlcDTmKHgHCMTsYO6h5u2w,549
145
+ ck_demos/pgm_compiler/demo_marginals_program.py,sha256=9RC8_eYHoIQy_lSpyUskbixyZNFYZqNrRr1MAPh4-Pw,1810
146
+ ck_demos/pgm_compiler/demo_mpe_program.py,sha256=CcixoZSnVTFbhnhMGtv1Y4io6-fniFlJGGqNaDXzUTA,1398
147
+ ck_demos/pgm_compiler/demo_pgm_compiler.py,sha256=-CIJLLZqFedkByfZcBx3kxviK4VcS8Lm2868y57xAAc,1089
148
+ ck_demos/pgm_compiler/demo_recursive_conditioning.py,sha256=-9MlVq40Hy0W1NgSIlUFmUCY2QZ-1VZUeQLMCrAmPjw,829
149
+ ck_demos/pgm_compiler/demo_variable_elimination.py,sha256=i7xzREake6rUxlXy-U6cDuLQE_VAJCA5pCQ2fuhVyPY,825
150
+ ck_demos/pgm_compiler/demo_wmc_program.py,sha256=LXHU4iWeIzWz08Lmbz0DiXO3RJjOXHxGy9W41oF9oOE,789
151
+ ck_demos/pgm_compiler/time_fe_compiler.py,sha256=VvqJ10WpkWxIZ2Dvtx7bnn1U_faWDCDKdHOzGcfl-EI,3607
152
+ ck_demos/pgm_inference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
153
+ ck_demos/pgm_inference/demo_inferencing_basic.py,sha256=wSy3dRBJfV6iHlGeeHxjOJh08Lh-TMD3KnxZcSj-HEA,5586
154
+ ck_demos/pgm_inference/demo_inferencing_mpe_cancer.py,sha256=hS9U2kyqjFgJ8jnVBtT3Tk6qCTkuknNiTlImMejV_6A,1554
155
+ ck_demos/pgm_inference/demo_inferencing_wmc_and_mpe_sprinkler.py,sha256=-q4Z1Fzf7-BuwVFTFXdGRY-zUNrY-SAU7ooaov2o_lM,5128
156
+ ck_demos/pgm_inference/demo_inferencing_wmc_student.py,sha256=R2dajAh4-bb9YFWhQr65Pp4qBvTtKvzpbxANb7Brxyc,3468
157
+ ck_demos/programs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
+ ck_demos/programs/demo_program_buffer.py,sha256=DxlzFVuE7U2XJeb5LtFmDW3kix3I1a1dowvT-XfjAm4,626
159
+ ck_demos/programs/demo_program_multi.py,sha256=iWqhN6g9Yfinkb6m9pHuh-sN4pJlCUcb93TPdTJJfN8,600
160
+ ck_demos/programs/demo_program_none.py,sha256=Qjrk_gzRi4TtBlszqgaDwn0q5Kd9eZnbOY7MKImLEDs,461
161
+ ck_demos/programs/demo_program_single.py,sha256=IJQG4zZH0vcOe70l4JtmLK52mpt3ZvcuOT09vFgXcPI,575
162
+ ck_demos/programs/demo_raw_program_interpreted.py,sha256=__zHAcaxCJ_EFqgfa8C0gatvjzH-clKGMwdN9KbyNxQ,507
163
+ ck_demos/programs/demo_raw_program_llvm.py,sha256=ktUUMi5_wEWdrWf6Sz9U2JpmHPVijX-eiyS5hl-W9gM,502
164
+ ck_demos/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
165
+ ck_demos/sampling/check_sampler.py,sha256=9Xy7oS3KnlNzcbdIU3bLnWlQ1SNo6S9hEp3TWoSM6C8,2035
166
+ ck_demos/sampling/demo_marginal_direct_sampler.py,sha256=nv4smqYl1VhpB6pkF4L_aqnpVgVMcv3FrSvUkJ0EJz0,1109
167
+ ck_demos/sampling/demo_uniform_sampler.py,sha256=zY5Kz97r43b1YvFz_4xNAeXvSpd7Kc2l0geZhWrz2no,924
168
+ ck_demos/sampling/demo_wmc_direct_sampler.py,sha256=USz7vynHOEYUQgu5dJY-dG_Z_zNEDAfoYJ3VtX6uFmk,1073
169
+ ck_demos/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
170
+ ck_demos/utils/compare.py,sha256=bJ8WTLJ0DRe7k9B7E2KD75IlWWBf6aSq7VRhYQjSmb0,4968
171
+ ck_demos/utils/convert_network.py,sha256=8SqHwkPWI333mopzPhRdcTrQXNyjxHge4qJ-4W26XUQ,1318
172
+ ck_demos/utils/sample_model.py,sha256=_CkZpo6bJWP66QG_WVUqqI90fssmcasVy4UymSKjBpw,8623
173
+ ck_demos/utils/stop_watch.py,sha256=BCVxmZDxYIuw8KMn0XTrlxwHa-tW86Oi8rgJZpDvp4M,12821
174
+ compiled_knowledge-4.0.0a20.dist-info/METADATA,sha256=aSoF4C7E3TJuZHK6hXPZKYVyQQlfh488AQ1KFReVJAM,1788
175
+ compiled_knowledge-4.0.0a20.dist-info/WHEEL,sha256=4VbEOkf4fdBUBHdV24POjoH-zuik_eIDLSImZZCAQpQ,112
176
+ compiled_knowledge-4.0.0a20.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
177
+ compiled_knowledge-4.0.0a20.dist-info/RECORD,,
178
+ compiled_knowledge-4.0.0a20.dist-info/licenses/LICENSE.txt,sha256=-LmkmqXKYojmS3zDxXAeTbsA82fnHA0KaRvpfIoEdjA,1068
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313-musllinux_1_2_x86_64
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