compiled-knowledge 4.0.0a22__cp312-cp312-win_amd64.whl → 4.0.0a23__cp312-cp312-win_amd64.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 (25) hide show
  1. ck/circuit/_circuit_cy.c +50 -60
  2. ck/circuit/_circuit_cy.cp312-win_amd64.pyd +0 -0
  3. ck/circuit/_circuit_cy.pyx +1 -1
  4. ck/circuit/_circuit_py.py +1 -1
  5. ck/circuit_compiler/cython_vm_compiler/_compiler.c +179 -170
  6. ck/circuit_compiler/cython_vm_compiler/_compiler.cp312-win_amd64.pyd +0 -0
  7. ck/circuit_compiler/cython_vm_compiler/_compiler.pyx +3 -3
  8. ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py +14 -7
  9. ck/circuit_compiler/interpret_compiler.py +35 -4
  10. ck/circuit_compiler/llvm_vm_compiler.py +9 -3
  11. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c +1 -1
  12. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp312-win_amd64.pyd +0 -0
  13. ck/circuit_compiler/support/llvm_ir_function.py +18 -1
  14. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c +1 -1
  15. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp312-win_amd64.pyd +0 -0
  16. ck/program/raw_program.py +40 -7
  17. ck_demos/ace/simple_ace_demo.py +18 -0
  18. ck_demos/getting_started/__init__.py +0 -0
  19. ck_demos/getting_started/simple_demo.py +18 -0
  20. ck_demos/programs/demo_raw_program_dump.py +17 -0
  21. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a23.dist-info}/METADATA +1 -1
  22. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a23.dist-info}/RECORD +25 -21
  23. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a23.dist-info}/WHEEL +0 -0
  24. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a23.dist-info}/licenses/LICENSE.txt +0 -0
  25. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a23.dist-info}/top_level.txt +0 -0
@@ -38,7 +38,7 @@ DTYPE_TO_CVM_TYPE: Dict[DTypeNumeric, str] = {
38
38
  }
39
39
 
40
40
 
41
- def make_function(analysis: CircuitAnalysis, dtype: DTypeNumeric) -> Tuple[RawProgramFunction, int]:
41
+ def make_function(analysis: CircuitAnalysis, dtype: DTypeNumeric) -> Tuple[RawProgramFunction, int, int]:
42
42
  """
43
43
  Make a RawProgram function that interprets the circuit.
44
44
 
@@ -47,7 +47,7 @@ def make_function(analysis: CircuitAnalysis, dtype: DTypeNumeric) -> Tuple[RawPr
47
47
  dtype: a numpy data type that must be a key in the dictionary, DTYPE_TO_CVM_TYPE.
48
48
 
49
49
  Returns:
50
- (function, number_of_tmps)
50
+ (function, number_of_tmps, number_of_instructions)
51
51
  """
52
52
 
53
53
  cdef Instructions instructions
@@ -128,7 +128,7 @@ def make_function(analysis: CircuitAnalysis, dtype: DTypeNumeric) -> Tuple[RawPr
128
128
  else:
129
129
  raise ValueError(f'cvm_type_name unexpected: {cvm_type_name!r}')
130
130
 
131
- return function, len(analysis.op_to_tmp)
131
+ return function, len(analysis.op_to_tmp), len(analysis.op_nodes)
132
132
 
133
133
  # VM instructions
134
134
  cdef int ADD = circuit.ADD
@@ -48,15 +48,16 @@ class CythonRawProgram(RawProgram):
48
48
  result: Sequence[CircuitNode],
49
49
  dtype: DTypeNumeric,
50
50
  ):
51
- self.in_vars = in_vars
52
- self.result = result
53
-
54
- function, number_of_tmps = _make_function(
51
+ function, number_of_tmps, number_of_instructions = _make_function(
55
52
  var_nodes=in_vars,
56
53
  result_nodes=result,
57
54
  dtype=dtype,
58
55
  )
59
56
 
57
+ self.in_vars = in_vars
58
+ self.result = result
59
+ self.number_of_instructions = number_of_instructions
60
+
60
61
  super().__init__(
61
62
  function=function,
62
63
  dtype=dtype,
@@ -66,6 +67,10 @@ class CythonRawProgram(RawProgram):
66
67
  var_indices=tuple(var.idx for var in in_vars),
67
68
  )
68
69
 
70
+ def dump(self, *, prefix: str = '', indent: str = ' ') -> None:
71
+ super().dump(prefix=prefix, indent=indent)
72
+ print(f'{prefix}number of instructions = {self.number_of_instructions}')
73
+
69
74
  def __getstate__(self):
70
75
  """
71
76
  Support for pickle.
@@ -94,7 +99,7 @@ class CythonRawProgram(RawProgram):
94
99
  self.in_vars = state['in_vars']
95
100
  self.result = state['result']
96
101
 
97
- self.function, _ = _make_function(
102
+ self.function, _, self.number_of_instructions = _make_function(
98
103
  var_nodes=self.in_vars,
99
104
  result_nodes=self.result,
100
105
  dtype=self.dtype,
@@ -105,7 +110,7 @@ def _make_function(
105
110
  var_nodes: Sequence[VarNode],
106
111
  result_nodes: Sequence[CircuitNode],
107
112
  dtype: DTypeNumeric,
108
- ) -> Tuple[RawProgramFunction, int]:
113
+ ) -> Tuple[RawProgramFunction, int, int]:
109
114
  """
110
115
  Make a RawProgram function that interprets the circuit.
111
116
 
@@ -115,7 +120,9 @@ def _make_function(
115
120
  dtype: a numpy data type that must be a key in the dictionary, DTYPE_TO_CVM_TYPE.
116
121
 
117
122
  Returns:
118
- (function, number_of_tmps)
123
+ (function, number_of_tmps, number_of_instructions)
119
124
  """
120
125
  analysis: CircuitAnalysis = analyze_circuit(var_nodes, result_nodes)
126
+ DEBUG = _compiler.make_function(analysis, dtype)
127
+
121
128
  return _compiler.make_function(analysis, dtype)
@@ -1,17 +1,17 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import ctypes as ct
3
4
  from dataclasses import dataclass
4
5
  from typing import Sequence, Optional, Dict, List, Tuple, Callable
5
6
 
6
7
  import numpy as np
7
- import ctypes as ct
8
8
 
9
+ from .support.circuit_analyser import CircuitAnalysis, analyze_circuit
10
+ from .support.input_vars import InputVars, InferVars, infer_input_vars
9
11
  from ..circuit import Circuit, CircuitNode, VarNode, OpNode, ADD, MUL
10
12
  from ..program.raw_program import RawProgram, RawProgramFunction
11
13
  from ..utils.iter_extras import multiply, first
12
14
  from ..utils.np_extras import NDArrayNumeric, DTypeNumeric
13
- from .support.circuit_analyser import CircuitAnalysis, analyze_circuit
14
- from .support.input_vars import InputVars, InferVars, infer_input_vars
15
15
 
16
16
  # index to a value array
17
17
  _VARS = 0
@@ -85,6 +85,15 @@ class InterpreterRawProgram(RawProgram):
85
85
  var_indices=tuple(var.idx for var in in_vars),
86
86
  )
87
87
 
88
+ def dump(self, *, prefix: str = '', indent: str = ' ', show_instructions: bool = True) -> None:
89
+ super().dump(prefix=prefix, indent=indent)
90
+ print(f'{prefix}number of instructions = {len(self.instructions)}')
91
+ if show_instructions:
92
+ print(f'{prefix}instructions:')
93
+ next_prefix: str = prefix + indent
94
+ for instruction in self.instructions:
95
+ print(f'{next_prefix}{instruction.to_str(self.var_indices, self.np_consts)}')
96
+
88
97
  def __getstate__(self):
89
98
  """
90
99
  Support for pickle.
@@ -123,7 +132,6 @@ def _make_instructions(
123
132
  analysis: CircuitAnalysis,
124
133
  dtype: DTypeNumeric,
125
134
  ) -> Tuple[Sequence[_Instruction], NDArrayNumeric]:
126
-
127
135
  # Store const values in a numpy array
128
136
  node_to_const_idx: Dict[int, int] = {
129
137
  id(node): i
@@ -216,9 +224,32 @@ class _ElementID:
216
224
  array: int # VARS, TMPS, CONSTS, RESULT
217
225
  index: int # index into the array
218
226
 
227
+ def to_str(self, var_indices: Sequence[int], consts: NDArrayNumeric) -> str:
228
+ if self.array == _VARS:
229
+ return f'var[{var_indices[self.index]}]'
230
+ elif self.array == _TMPS:
231
+ return f'tmp[{self.index}]'
232
+ elif self.array == _CONSTS:
233
+ return str(consts.item(self.index))
234
+ elif self.array == _RESULT:
235
+ return f'result[{self.index}]'
236
+ else:
237
+ return f'?[{self.index}]'
238
+
219
239
 
220
240
  @dataclass
221
241
  class _Instruction:
222
242
  operation: Callable
223
243
  args: Sequence[_ElementID]
224
244
  dest: _ElementID
245
+
246
+ def to_str(self, var_indices: Sequence[int], consts: NDArrayNumeric) -> str:
247
+ symbol: str
248
+ if self.operation is multiply:
249
+ symbol = 'mul'
250
+ elif self.operation == sum:
251
+ symbol = 'sum'
252
+ else:
253
+ symbol = '<?>'
254
+ args: str = ' '.join(elem.to_str(var_indices, consts) for elem in self.args)
255
+ return f'{self.dest.to_str(var_indices, consts)} = {symbol} {args}'
@@ -1,12 +1,12 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import ctypes as ct
3
4
  from dataclasses import dataclass
4
5
  from typing import Sequence, Optional, Tuple, List, Dict
5
6
 
6
7
  import llvmlite.binding as llvm
7
8
  import llvmlite.ir as ir
8
9
  import numpy as np
9
- import ctypes as ct
10
10
 
11
11
  from .support.circuit_analyser import CircuitAnalysis, analyze_circuit
12
12
  from .support.input_vars import InputVars, InferVars, infer_input_vars
@@ -126,6 +126,12 @@ class LLVMRawProgramWithArrays(LLVMRawProgram):
126
126
  instructions: np.ndarray
127
127
  consts: np.ndarray
128
128
 
129
+ def dump(self, *, prefix: str = '', indent: str = ' ', show_instructions: bool = True) -> None:
130
+ super().dump(prefix=prefix, indent=indent)
131
+ print(f'{prefix}LLVM byte code size = {len(self.instructions)}')
132
+ if show_instructions:
133
+ self.dump_llvm_program(prefix=prefix, indent=indent)
134
+
129
135
  def __post_init__(self):
130
136
  self._set_globals(self.instructions, _SET_INSTRUCTIONS_FUNCTION_NAME)
131
137
  self._set_globals(self.consts, _SET_CONSTS_FUNCTION_NAME)
@@ -200,7 +206,7 @@ def _make_llvm_program(
200
206
  consts_global.global_constant = True
201
207
  consts_global.initializer = ir.Constant(consts_array_type, const_values)
202
208
  data_idx_0 = ir.Constant(data_idx_type, 0)
203
- consts: ir.Value = builder.gep(consts_global, [data_idx_0, data_idx_0])
209
+ consts: ir.Value = builder.gep(consts_global, [data_idx_0, data_idx_0])
204
210
 
205
211
  # Put bytecode into the LLVM module
206
212
  instructions_array_type = ir.ArrayType(byte_type, len(byte_code))
@@ -218,7 +224,7 @@ def _make_llvm_program(
218
224
 
219
225
  instructions_ptr_type = byte_type.as_pointer()
220
226
  instructions_global = ir.GlobalVariable(module, instructions_ptr_type, name='instructions')
221
- instructions_global.initializer =ir.Constant(instructions_ptr_type, None)
227
+ instructions_global.initializer = ir.Constant(instructions_ptr_type, None)
222
228
  instructions: ir.Value = builder.load(instructions_global)
223
229
 
224
230
  interp = _InterpBuilder(builder, type_info, inst_idx_type, data_idx_bytes, num_args_bytes, consts, instructions)
@@ -13,7 +13,7 @@
13
13
  "/O2"
14
14
  ],
15
15
  "include_dirs": [
16
- "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-0p_rjbh1\\Lib\\site-packages\\numpy\\_core\\include"
16
+ "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-ca0w3uvm\\Lib\\site-packages\\numpy\\_core\\include"
17
17
  ],
18
18
  "name": "ck.circuit_compiler.support.circuit_analyser._circuit_analyser_cy",
19
19
  "sources": [
@@ -1,7 +1,7 @@
1
1
  import ctypes as ct
2
2
  from dataclasses import dataclass
3
3
  from enum import Enum
4
- from typing import Callable, Tuple, Optional
4
+ from typing import Callable, Tuple, Optional, List
5
5
 
6
6
  import llvmlite.binding as llvm
7
7
  import llvmlite.ir as ir
@@ -172,6 +172,23 @@ class LLVMRawProgram(RawProgram):
172
172
  'opt': self.opt,
173
173
  }
174
174
 
175
+ def dump(self, *, prefix: str = '', indent: str = ' ', show_instructions: bool = True) -> None:
176
+ super().dump(prefix=prefix, indent=indent)
177
+ print(f'{prefix}optimisation level = {self.opt}')
178
+ if show_instructions:
179
+ self.dump_llvm_program(prefix=prefix, indent=indent)
180
+
181
+ def dump_llvm_program(self, *, prefix: str = '', indent: str = ' ') -> None:
182
+ if self.llvm_program is None:
183
+ print(f'{prefix}LLVM program: unavailable')
184
+ else:
185
+ llvm_program: List[str] = self.llvm_program.split('\n')
186
+ print(f'{prefix}LLVM program size = {len(llvm_program)}')
187
+ print(f'{prefix}LLVM program:')
188
+ next_prefix: str = prefix + indent
189
+ for line in llvm_program:
190
+ print(f'{next_prefix}{line}')
191
+
175
192
  def __setstate__(self, state):
176
193
  """
177
194
  Support for pickle.
@@ -13,7 +13,7 @@
13
13
  "/O2"
14
14
  ],
15
15
  "include_dirs": [
16
- "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-0p_rjbh1\\Lib\\site-packages\\numpy\\_core\\include"
16
+ "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-ca0w3uvm\\Lib\\site-packages\\numpy\\_core\\include"
17
17
  ],
18
18
  "name": "ck.pgm_compiler.support.circuit_table._circuit_table_cy",
19
19
  "sources": [
ck/program/raw_program.py CHANGED
@@ -21,7 +21,11 @@ class RawProgram:
21
21
  A raw program is returned by a circuit compiler to provide execution of
22
22
  the function defined by a compiled circuit.
23
23
 
24
- A `RawProgram` is a `Callable` with the signature:
24
+ A `RawProgram` is a `Callable`; given an array of input variable values,
25
+ return a numpy array of result values. Calling a RawProgram is not necessarily
26
+ an efficient method for executing a program as buffers are reallocated for
27
+ each call. Alternatively, a `RawProgram` can be wrapped in a `ProgramBuffer`
28
+ for computationally efficient memory buffer reuse.
25
29
 
26
30
  Fields:
27
31
  function: is a function of three ctypes arrays, returning nothing.
@@ -40,19 +44,33 @@ class RawProgram:
40
44
  number_of_results: int
41
45
  var_indices: Sequence[int]
42
46
 
43
- def __call__(self, in_vars: NDArrayNumeric | Sequence[int | float]) -> NDArrayNumeric:
47
+ def __call__(self, var_values: NDArrayNumeric | Sequence[int | float] | int | float) -> NDArrayNumeric:
44
48
  """
45
- Call the raw program as a function from an array to an array.
49
+ Call the raw program as a function. This method will allocate numpy arrays of type `self.dtype`
50
+ for input, temporary, and output values. If `var_values` is a numpy array of the needed
51
+ dtype then it will be used directly.
52
+
53
+ Args:
54
+ var_values: the input variable values. This can be a numpy array, a Python sequence of
55
+ floats or int, or a single float or int. The number of input values must equal
56
+ `self.number_of_vars`.
57
+
58
+ Returns:
59
+ a numpy array of result values with shape `(self.number_of_results,)`.
46
60
  """
47
61
  array_vars: NDArrayNumeric
48
62
  if isinstance(vars, np.ndarray):
49
- array_vars = in_vars
63
+ if var_values.dtype != self.dtype:
64
+ array_vars = var_values.astype(self.dtype)
65
+ else:
66
+ array_vars = self.dtype
67
+ elif isinstance(vars, (int, float)):
68
+ array_vars = np.array([var_values], dtype=self.dtype)
50
69
  else:
51
- array_vars = np.array(in_vars, dtype=self.dtype)
70
+ array_vars = np.array(var_values, dtype=self.dtype)
71
+
52
72
  if array_vars.shape != (self.number_of_vars,):
53
73
  raise ValueError(f'input array incorrect shape: got {array_vars.shape} expected ({self.number_of_vars},)')
54
- if array_vars.dtype != self.dtype:
55
- raise ValueError(f'input array incorrect dtype: got {array_vars.dtype} expected {self.dtype}')
56
74
 
57
75
  array_tmps: NDArrayNumeric = np.zeros(self.number_of_tmps, dtype=self.dtype)
58
76
  array_outs: NDArrayNumeric = np.zeros(self.number_of_results, dtype=self.dtype)
@@ -64,3 +82,18 @@ class RawProgram:
64
82
 
65
83
  self.function(c_array_vars, c_array_tmps, c_array_outs)
66
84
  return array_outs
85
+
86
+ def dump(self, *, prefix: str = '', indent: str = ' ') -> None:
87
+ """
88
+ Print a dump of the PGM.
89
+ This is intended for demonstration and debugging purposes.
90
+
91
+ Args:
92
+ prefix: optional prefix for indenting all lines.
93
+ indent: additional prefix to use for extra indentation.
94
+ """
95
+ print(f'{prefix}{self.__class__.__name__}')
96
+ print(f'{prefix}signature = [{self.number_of_vars}] -> [{self.number_of_results}]')
97
+ print(f'{prefix}temps = {self.number_of_tmps}')
98
+ print(f'{prefix}dtype = {self.dtype}')
99
+ print(f'{prefix}var_indices = {self.var_indices}')
@@ -0,0 +1,18 @@
1
+ from ck import example
2
+ from ck.pgm import RVMap
3
+ from ck.pgm_circuit.wmc_program import WMCProgram
4
+ from ck.pgm_compiler import NamedPGMCompiler
5
+
6
+ # create the example "Cancer" Bayesian network
7
+ pgm = example.Cancer()
8
+
9
+ # compile the PGM and construct an object for probabilistic queries
10
+ wmc = WMCProgram(NamedPGMCompiler.ACE(pgm))
11
+
12
+ # provide easy access to the random variables - not needed but simplifies this demo
13
+ rvs = RVMap(pgm)
14
+
15
+ # get the probability of having cancer given that pollution is high
16
+ pr = wmc.probability(rvs.cancer('True'), condition=rvs.pollution('high'))
17
+
18
+ print('probability of having cancer given that pollution is high =', pr)
File without changes
@@ -0,0 +1,18 @@
1
+ from ck import example
2
+ from ck.pgm import RVMap
3
+ from ck.pgm_circuit.wmc_program import WMCProgram
4
+ from ck.pgm_compiler import DEFAULT_PGM_COMPILER
5
+
6
+ # create the example "Cancer" Bayesian network
7
+ pgm = example.Cancer()
8
+
9
+ # compile the PGM and construct an object for probabilistic queries
10
+ wmc = WMCProgram(DEFAULT_PGM_COMPILER(pgm))
11
+
12
+ # provide easy access to the random variables - not needed but simplifies this demo
13
+ rvs = RVMap(pgm)
14
+
15
+ # get the probability of having cancer given that pollution is high
16
+ pr = wmc.probability(rvs.cancer('True'), condition=rvs.pollution('high'))
17
+
18
+ print('probability of having cancer given that pollution is high =', pr)
@@ -0,0 +1,17 @@
1
+ from ck.circuit import Circuit
2
+ from ck.circuit_compiler import NamedCircuitCompiler
3
+
4
+
5
+ def main() -> None:
6
+ cct = Circuit()
7
+ a, b, c, d = cct.new_vars(4)
8
+ top = a * b + c * d + 56.23
9
+
10
+ for compiler in NamedCircuitCompiler:
11
+ raw_program = compiler(top)
12
+ raw_program.dump()
13
+ print()
14
+
15
+
16
+ if __name__ == '__main__':
17
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compiled-knowledge
3
- Version: 4.0.0a22
3
+ Version: 4.0.0a23
4
4
  Summary: A Python package for compiling and querying discrete probabilistic graphical models.
5
5
  Author-email: Barry Drake <barry@compiledknowledge.org>
6
6
  License-Expression: MIT
@@ -1,29 +1,29 @@
1
1
  ck/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  ck/pgm.py,sha256=Uwo2A4qEtgwmKkma1HOsozn837435zEN9JUByYlfe-w,120701
3
3
  ck/circuit/__init__.py,sha256=klUR7OVESf53-8Ho4f32clHFsR2SOz4XgwZzfDlms88,418
4
- ck/circuit/_circuit_cy.c,sha256=zBsA_-1MY4IpO1kF4xOPtIjp8AkCCmbYSw7hm9NQxC4,1742373
5
- ck/circuit/_circuit_cy.cp312-win_amd64.pyd,sha256=Te7ZttUIpLYmP7ihkRWnwQxnXOgT41RxmoOctV9x-8Q,242688
4
+ ck/circuit/_circuit_cy.c,sha256=TU_8mS7m-QLkAok8SHoYza7v4HINNxmi-MqPwEFwD2g,1741715
5
+ ck/circuit/_circuit_cy.cp312-win_amd64.pyd,sha256=bHkoHY0xhttReKysRJ9q12EBGYYj_4rhSfdlkepNWjg,242688
6
6
  ck/circuit/_circuit_cy.pxd,sha256=F1WU4KuX_knXQX-hwNKoHsoUK3fJLbLOxEnomWMJFpI,1057
7
- ck/circuit/_circuit_cy.pyx,sha256=RGfHGBj3XibLw4S5CC6FVnXOHjpzU0_aoVowqIY2qzA,27773
8
- ck/circuit/_circuit_py.py,sha256=vN8lg01RyjA_YUphjx1dr0Uj4ql4seczRcoCaH7ylAw,28341
7
+ ck/circuit/_circuit_cy.pyx,sha256=TIjqsdyN_IzOm9XQw26kEURpL6GSL1kJO3K-UUlkbQc,27763
8
+ ck/circuit/_circuit_py.py,sha256=gQZoEphxut2UyBL0ZqmNc8KlNBSMST_VOCqOpDMIRSM,28331
9
9
  ck/circuit/tmp_const.py,sha256=dG9FuGfoAG5qjYG1rNwekqKiea_KmVfxHMTOgCPbBiQ,2372
10
10
  ck/circuit_compiler/__init__.py,sha256=T0Igyp5jPgnIXv4oRcIYhmsOdcNOb3L4Za6dK6eYk7g,132
11
11
  ck/circuit_compiler/circuit_compiler.py,sha256=8BLB8DUnPbpl5PXZsIopydPbItytdn2rzRfM2U1EC84,1018
12
- ck/circuit_compiler/interpret_compiler.py,sha256=7PjtEFNR0JMw56XaYP9IZ5ZNZTTLYCUUDiMDj7cN5f8,7373
12
+ ck/circuit_compiler/interpret_compiler.py,sha256=KMzLzIV-BU5l8GQ2833kjios4sbGSVUm4ero7MEYvVk,8786
13
13
  ck/circuit_compiler/llvm_compiler.py,sha256=6RHUCVWCOgt3ZNyjRTl2Z2npYJMWyAFJVAIc5SAx2mY,14023
14
- ck/circuit_compiler/llvm_vm_compiler.py,sha256=I46_XV5FrClDKO06zIjn8T3ME5XQ9RYJ_1aAE8e_YzM,21873
14
+ ck/circuit_compiler/llvm_vm_compiler.py,sha256=XJhiAZmGMRRz49XUfng9lgETxVw6NgD6XCI0H3fX-1E,22200
15
15
  ck/circuit_compiler/named_circuit_compilers.py,sha256=snlD3JnhAZC-atKpf5GD0v4CGdvj2_ZhCZ3O-tsxzxc,2284
16
16
  ck/circuit_compiler/cython_vm_compiler/__init__.py,sha256=pEAwTleuZgdYhTAQMea2f9YsFK54eoNbZSbrWkW8aeE,49
17
- ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=ly19gSYNgnEmyrrAjQooVL1BMULN5_IoyHNYZlEEJWQ,870540
18
- ck/circuit_compiler/cython_vm_compiler/_compiler.cp312-win_amd64.pyd,sha256=q95-GArE8rbjvDGoXSHHPga0vYtXopGoPgqRwW01k48,103424
19
- ck/circuit_compiler/cython_vm_compiler/_compiler.pyx,sha256=QS6FG5z-ay9fnUTCMwtJm89I3QpfY6RqS874zHvZrBA,13225
20
- ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py,sha256=WywW6uhoyP-U5hWdF1amsE8fhbP9LbDtWTu2wVFkR2k,4066
17
+ ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=RKSqL9x1DlfNR2NPzDJJhnknwei_enKaZxtcXZgzdRw,871325
18
+ ck/circuit_compiler/cython_vm_compiler/_compiler.cp312-win_amd64.pyd,sha256=2J4f7I48NyDQHXd51A9YoSsbe4mECV9xvpFzHMiLJZc,103936
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
21
  ck/circuit_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  ck/circuit_compiler/support/input_vars.py,sha256=x6krN6sW9A-vZTteY4M4on_0vS4ChaaCcmnXcnQ4y0s,4812
23
- ck/circuit_compiler/support/llvm_ir_function.py,sha256=7SoYEQiBS2GHFknw0raH0ouJyBQmYp-ZydJVEXVo0Uw,7779
23
+ ck/circuit_compiler/support/llvm_ir_function.py,sha256=f4gD591d8cytln4vY9Lxw_cJrSyQJ3iHES49eN44eec,8612
24
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=uVBuaWzBVkkYIIkVGikKWR839DGW9ytriP6a2yEPEFQ,448751
26
- ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp312-win_amd64.pyd,sha256=kdIx89qPFfdUa15ADpVAFoc-3OHjdbXU7S9U1Dna6Ds,54272
25
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=FN43CmGEBQv72l7rqE6qnjb_8MzYLZRwudYkRrxRSD0,448751
26
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp312-win_amd64.pyd,sha256=bIr-0khzKefEnY8ff_dbzWrlg1ICcrSIwHSaQhCYrU8,54272
27
27
  ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.pyx,sha256=ctDOHOjnUhdsR_XHBrgchFVTImLhsEUjU3cqkP-GdF8,3331
28
28
  ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_py.py,sha256=eWjc2B946LeSzcGa9PyI4XQvlx_B1KPEiQuM6OOFjjQ,3086
29
29
  ck/example/__init__.py,sha256=BXVxvTcl3tqgai-xJiGQIaG_ChlpPRdfWg985MQ7dwM,1744
@@ -91,8 +91,8 @@ ck/pgm_compiler/support/factor_tables.py,sha256=tV9qE2zC8iwEQxTuXE6qiE6lmMpz4-Vc
91
91
  ck/pgm_compiler/support/join_tree.py,sha256=OGAuZVHzT0i4e6TJ03dOM7e3gbpuW9AyjZKvSBvKvJA,12894
92
92
  ck/pgm_compiler/support/named_compiler_maker.py,sha256=g2MLnlkWXkISHL6dh23EY53SptTo7-itfuZogSpMdB8,1420
93
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=4wnwUtsxyHGV0YSTzWOZn6bux4RhaK_zPdZxBY8C9io,730350
95
- ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp312-win_amd64.pyd,sha256=tWzEiXDAOYHg5Cr6ViUHj6rEni89PNa148w1pJpTJSk,97280
94
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=8m9UlrszjsKjINoU0lDBmNyeNhJ13ApY4OaPnY8riI4,730350
95
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp312-win_amd64.pyd,sha256=UV3db7bYnOD-5iqn_pZf3eYfjQy6FqFgcsDGL--mMvc,97280
96
96
  ck/pgm_compiler/support/circuit_table/_circuit_table_cy.pyx,sha256=rVO1yxjZmZ6yv5s0zKq4Ji9WYrDuYTZsRG_zeF1_1xE,12015
97
97
  ck/pgm_compiler/support/circuit_table/_circuit_table_py.py,sha256=h6xPYGBSy6XHQBFLPD2D1-V7Kiw9utY68nWrcGRMEg4,11287
98
98
  ck/probability/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -102,7 +102,7 @@ ck/probability/probability_space.py,sha256=itv3dNEpSTLhKg6JCNhe7Iy6n9MKWqeKO4RxK
102
102
  ck/program/__init__.py,sha256=Ss9-0eqsGxCGloD6liH-0iqBG5Q3vPRF4XCw2hkDJ0M,110
103
103
  ck/program/program.py,sha256=gDJ5Q2kXZuaoHboa9yNTg0tQH9S-Gmw0BRx6PPV28pU,4184
104
104
  ck/program/program_buffer.py,sha256=1fiUcT7sqyr4vu8jXzK3ZsrgURFhWMdm6hr2BeS9ONA,5665
105
- ck/program/raw_program.py,sha256=94D74Vz5Hu8p3JYNKT9kflXHuj0jscNBoX4O5Ug7G8A,2623
105
+ ck/program/raw_program.py,sha256=J8jbyhc1X9PxX5DFMFeIIRHbh65JTkAxFRbjVjzxz7s,4257
106
106
  ck/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
107
  ck/sampling/forward_sampler.py,sha256=pTtpaH_ONH67G4P-aJ1p8YZSaXr4TTD6pj3ZEI2y7KM,8348
108
108
  ck/sampling/marginals_direct_sampler.py,sha256=p1jDr1stG2Hjay3D8hILezW-5YZTX1p3odUcJDAI-OQ,4466
@@ -126,12 +126,15 @@ ck_demos/all_demos.py,sha256=E1SZDvG0l_j1PfHZLemHocezw10uY5uGl3yE3BX87DE,2556
126
126
  ck_demos/ace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
127
  ck_demos/ace/copy_ace_to_ck.py,sha256=TJHPGcUbd1a6OjH3Fw7c3fno8ULPbf5p3V_lBmiNR-k,303
128
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
129
130
  ck_demos/circuit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
130
131
  ck_demos/circuit/demo_circuit_dump.py,sha256=CQC5cxXaaRuVZ3d8h-SqXs8EJo0Tm5H5l7T9ad6pyEk,458
131
132
  ck_demos/circuit/demo_derivatives.py,sha256=3JoWVAEKLEoLjq6QzWkq4Z-qVq1l0tHvGDn5erVuozc,1186
132
133
  ck_demos/circuit_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
134
  ck_demos/circuit_compiler/compare_circuit_compilers.py,sha256=IEzwvKt6c8wrmAyd6F0sUaNaWYEx1BBFQhRyDt7cibI,756
134
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
135
138
  ck_demos/pgm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
139
  ck_demos/pgm/demo_pgm_dump.py,sha256=egcjSjMDJdyzxWGvHrgdF_g3CFYozLKv4XSXzvSfWbg,248
137
140
  ck_demos/pgm/demo_pgm_dump_stress.py,sha256=L9S3yp0EQM56kWztV4A6XzEqITOGbThImZIU0JofCDg,285
@@ -159,6 +162,7 @@ ck_demos/programs/demo_program_buffer.py,sha256=2XuBE15PmJOtdsyzqlq_LgHrYPj59_Ej
159
162
  ck_demos/programs/demo_program_multi.py,sha256=8mTZycb5onaDKThLOvoR9oeCdWD8k8K0hVIKxCxMkq0,624
160
163
  ck_demos/programs/demo_program_none.py,sha256=PDo3Ua0j-g8GXrAfLt3oWa2H-_cTMvo_7GwNimCRaNc,480
161
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
162
166
  ck_demos/programs/demo_raw_program_interpreted.py,sha256=iPbGXsj8ZQl4RMIZZBF7oDHEEnAl31kIilQFPcqSA98,528
163
167
  ck_demos/programs/demo_raw_program_llvm.py,sha256=a3V85jgyqrCBJpBmfVWpY9Nx5l0WhfvzgIXEdCcxRXA,523
164
168
  ck_demos/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -171,8 +175,8 @@ ck_demos/utils/compare.py,sha256=Bwjpflevl4nusfA0zp96rInaVKFGuhC5Xv7HzA1Fobk,508
171
175
  ck_demos/utils/convert_network.py,sha256=TSKj8q7L7J5rhrvwjaDkdYZ0Sg8vV5FRL_vCanX1CQw,1363
172
176
  ck_demos/utils/sample_model.py,sha256=in-Nlv-iuNIu6y9fDuMyo7nzgimBuTAnCWcpnVqvqDQ,8839
173
177
  ck_demos/utils/stop_watch.py,sha256=VzXHRWx0V8vPSD-bLgLlEYkCkR2FA0-KmM_pfKx-Pxo,13205
174
- compiled_knowledge-4.0.0a22.dist-info/licenses/LICENSE.txt,sha256=uMYx7tmroEKNASizbCOwPveMQsD5UErLDC1_SANmNn8,1089
175
- compiled_knowledge-4.0.0a22.dist-info/METADATA,sha256=eJdp11Ps62kBb4jFBn6-ROz4TIXeWGBJFDoq49vzO7g,1838
176
- compiled_knowledge-4.0.0a22.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
177
- compiled_knowledge-4.0.0a22.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
178
- compiled_knowledge-4.0.0a22.dist-info/RECORD,,
178
+ compiled_knowledge-4.0.0a23.dist-info/licenses/LICENSE.txt,sha256=uMYx7tmroEKNASizbCOwPveMQsD5UErLDC1_SANmNn8,1089
179
+ compiled_knowledge-4.0.0a23.dist-info/METADATA,sha256=OR-iFkTIH02rufAdmjgY7BW_Q5ECJ6ZveWe-jFjK8qI,1838
180
+ compiled_knowledge-4.0.0a23.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
181
+ compiled_knowledge-4.0.0a23.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
182
+ compiled_knowledge-4.0.0a23.dist-info/RECORD,,