compiled-knowledge 4.0.0a23__tar.gz → 4.0.0a25__tar.gz
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.
- {compiled_knowledge-4.0.0a23/src/compiled_knowledge.egg-info → compiled_knowledge-4.0.0a25}/PKG-INFO +1 -1
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/pyproject.toml +2 -1
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit/tmp_const.py +5 -4
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/circuit_compiler.py +3 -2
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/support/llvm_ir_function.py +4 -4
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/diamond_square.py +3 -1
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/triangle_square.py +3 -1
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/truss.py +3 -1
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/parse_net.py +21 -19
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/parser_utils.py +7 -3
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm.py +146 -139
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/mpe_program.py +3 -4
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/pgm_circuit.py +27 -18
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/program_with_slotmap.py +4 -1
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/pgm_compiler.py +1 -1
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/join_tree.py +3 -3
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/probability/empirical_probability_space.py +4 -3
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/probability/pgm_probability_space.py +7 -3
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/probability/probability_space.py +20 -15
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/program/raw_program.py +23 -16
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/sampler_support.py +7 -5
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/utils/iter_extras.py +3 -2
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/utils/local_config.py +16 -8
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25/src/compiled_knowledge.egg-info}/PKG-INFO +1 -1
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/LICENSE.txt +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/MANIFEST.in +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/README.md +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/setup.cfg +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/setup.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit/_circuit_cy.c +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit/_circuit_cy.pxd +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit/_circuit_cy.pyx +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit/_circuit_py.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/cython_vm_compiler/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/cython_vm_compiler/_compiler.c +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/cython_vm_compiler/_compiler.pyx +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/interpret_compiler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/llvm_compiler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/llvm_vm_compiler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/named_circuit_compilers.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/support/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/support/circuit_analyser/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.pyx +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_py.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/circuit_compiler/support/input_vars.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/alarm.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/asia.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/binary_clique.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/bow_tie.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/cancer.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/chain.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/child.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/clique.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/cnf_pgm.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/earthquake.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/empty.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/hailfinder.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/hepar2.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/insurance.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/loop.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/mildew.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/munin.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/pathfinder.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/rain.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/rectangle.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/run.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/sachs.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/sprinkler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/star.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/stress.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/student.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/survey.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/parse_ace_lmap.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/parse_ace_nnf.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/pgm_pickle.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/pgm_python.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/render_bugs.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/render_net.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/in_out/render_pomegranate.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/marginals_program.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/slot_map.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/support/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/support/compile_circuit.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/target_marginals_program.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_circuit/wmc_program.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/ace/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/ace/ace.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/factor_elimination.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/named_pgm_compilers.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/recursive_conditioning.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/circuit_table/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/circuit_table/_circuit_table_cy.pyx +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/circuit_table/_circuit_table_py.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/clusters.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/factor_tables.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/support/named_compiler_maker.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/pgm_compiler/variable_elimination.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/probability/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/program/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/program/program.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/program/program_buffer.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/forward_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/marginals_direct_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/uniform_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/wmc_direct_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/wmc_gibbs_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/wmc_metropolis_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/sampling/wmc_rejection_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/utils/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/utils/map_list.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/utils/map_set.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/utils/np_extras.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/utils/random_extras.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/utils/tmp_dir.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/ace/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/ace/copy_ace_to_ck.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/ace/demo_ace.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/ace/simple_ace_demo.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/all_demos.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/circuit/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/circuit/demo_circuit_dump.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/circuit/demo_derivatives.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/circuit_compiler/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/circuit_compiler/compare_circuit_compilers.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/circuit_compiler/show_llvm_program.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/getting_started/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/getting_started/simple_demo.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm/demo_pgm_dump.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm/demo_pgm_dump_stress.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm/demo_pgm_string_rendering.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm/show_examples.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/compare_pgm_compilers.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_compiler_dump.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_factor_elimination.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_join_tree.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_marginals_program.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_mpe_program.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_pgm_compiler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_recursive_conditioning.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_variable_elimination.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/demo_wmc_program.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_compiler/time_fe_compiler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_inference/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_inference/demo_inferencing_basic.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_inference/demo_inferencing_mpe_cancer.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_inference/demo_inferencing_wmc_and_mpe_sprinkler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/pgm_inference/demo_inferencing_wmc_student.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/programs/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/programs/demo_program_buffer.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/programs/demo_program_multi.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/programs/demo_program_none.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/programs/demo_program_single.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/programs/demo_raw_program_dump.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/programs/demo_raw_program_interpreted.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/programs/demo_raw_program_llvm.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/sampling/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/sampling/check_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/sampling/demo_marginal_direct_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/sampling/demo_uniform_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/sampling/demo_wmc_direct_sampler.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/utils/__init__.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/utils/compare.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/utils/convert_network.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/utils/sample_model.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck_demos/utils/stop_watch.py +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/compiled_knowledge.egg-info/SOURCES.txt +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/compiled_knowledge.egg-info/dependency_links.txt +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/compiled_knowledge.egg-info/requires.txt +0 -0
- {compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/compiled_knowledge.egg-info/top_level.txt +0 -0
{compiled_knowledge-4.0.0a23/src/compiled_knowledge.egg-info → compiled_knowledge-4.0.0a25}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: compiled-knowledge
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.0a25
|
|
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,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "compiled-knowledge"
|
|
3
|
-
version = "4.0.
|
|
3
|
+
version = "4.0.0a25"
|
|
4
4
|
description = "A Python package for compiling and querying discrete probabilistic graphical models."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -36,6 +36,7 @@ setuptools = "*"
|
|
|
36
36
|
build = "*"
|
|
37
37
|
cibuildwheel = "*"
|
|
38
38
|
jupyter-book = "*"
|
|
39
|
+
sphinx = "*"
|
|
39
40
|
twine = "*"
|
|
40
41
|
toml = "*"
|
|
41
42
|
|
|
@@ -10,15 +10,16 @@ class TmpConst:
|
|
|
10
10
|
A TmpConst enables the consistent, temporary setting and clearing
|
|
11
11
|
of circuit variables to constant values.
|
|
12
12
|
|
|
13
|
-
Example usage
|
|
13
|
+
Example usage::
|
|
14
|
+
|
|
14
15
|
with TmpConst(my_circuit) as tmp:
|
|
15
16
|
tmp.set_const(0, 123.456)
|
|
16
17
|
tmp.set_const(my_list_of_vars, 110.99)
|
|
17
18
|
program = Program(my_top)
|
|
18
|
-
# now use
|
|
19
|
+
# now use `program`
|
|
19
20
|
|
|
20
|
-
Within the
|
|
21
|
-
the compiler can optimise. When the
|
|
21
|
+
Within the `with` section, circuit variables are set to const values, which
|
|
22
|
+
the compiler can optimise. When the `with` section exits, the variables
|
|
22
23
|
are restored to their original state.
|
|
23
24
|
"""
|
|
24
25
|
__slots__ = ('_circuit', '_undo')
|
|
@@ -13,12 +13,13 @@ class CircuitCompiler(Protocol):
|
|
|
13
13
|
circuit: Optional[Circuit] = None,
|
|
14
14
|
) -> RawProgram:
|
|
15
15
|
"""
|
|
16
|
-
A
|
|
16
|
+
A PGM compiler compiles selected results nodes of an arithmetic circuit to a program.
|
|
17
17
|
|
|
18
18
|
Args:
|
|
19
19
|
*result: one or more circuit of nodes defining the result of the program function.
|
|
20
20
|
All result node must be from the same circuit.
|
|
21
|
-
input_vars: how to determine the input variables.
|
|
21
|
+
input_vars: how to determine the input variables. Either a sequence of VarNodes, or a single
|
|
22
|
+
VarNode, or a `InferVars` member. The default is to use all circuit variables, in index order.
|
|
22
23
|
circuit: optionally explicitly specify the Circuit (mandatory if no result nodes are provided).
|
|
23
24
|
|
|
24
25
|
Returns:
|
|
@@ -213,10 +213,10 @@ def compile_llvm_program(
|
|
|
213
213
|
Compile the given LLVM program.
|
|
214
214
|
|
|
215
215
|
Returns:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
function
|
|
216
|
+
`engine` an LLVM execution engine, which must remain
|
|
217
|
+
in memory for the returned function to be valid,
|
|
218
|
+
|
|
219
|
+
`function` the raw Python callable for the compiled function.
|
|
220
220
|
"""
|
|
221
221
|
_init_llvm()
|
|
222
222
|
|
{compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/diamond_square.py
RENAMED
|
@@ -8,7 +8,8 @@ class DiamondSquare(PGM):
|
|
|
8
8
|
This PGM is the 'DiamondSquare' factor graph.
|
|
9
9
|
|
|
10
10
|
The DiamondSquare is a factor graph with seven random variables (a, b, c, ..., h).
|
|
11
|
-
Binary factors are between pairs of random variables creating the pattern
|
|
11
|
+
Binary factors are between pairs of random variables creating the pattern::
|
|
12
|
+
|
|
12
13
|
b
|
|
13
14
|
/ \
|
|
14
15
|
/ \
|
|
@@ -20,6 +21,7 @@ class DiamondSquare(PGM):
|
|
|
20
21
|
\ /
|
|
21
22
|
\ /
|
|
22
23
|
g
|
|
24
|
+
|
|
23
25
|
If include_unaries then, also includes one unary factor per random variable.
|
|
24
26
|
"""
|
|
25
27
|
|
{compiled_knowledge-4.0.0a23 → compiled_knowledge-4.0.0a25}/src/ck/example/triangle_square.py
RENAMED
|
@@ -8,12 +8,14 @@ class TriangleSquare(PGM):
|
|
|
8
8
|
This PGM is the 'TriangleSquare' factor graph.
|
|
9
9
|
|
|
10
10
|
The TriangleSquare is a factor graph with six random variables (a, b, c, ..., f).
|
|
11
|
-
Binary factors are between pairs of random variables crating the pattern
|
|
11
|
+
Binary factors are between pairs of random variables crating the pattern::
|
|
12
|
+
|
|
12
13
|
b -- d
|
|
13
14
|
/ | | \
|
|
14
15
|
a | | f
|
|
15
16
|
\ | | /
|
|
16
17
|
c -- e
|
|
18
|
+
|
|
17
19
|
If include_unaries then, also includes one unary factor per random variable.
|
|
18
20
|
"""
|
|
19
21
|
|
|
@@ -7,12 +7,14 @@ class Truss(PGM):
|
|
|
7
7
|
This PGM is the 'Truss' factor graph.
|
|
8
8
|
|
|
9
9
|
The Truss is a factor graph with five random variables (a, b, c, d, e).
|
|
10
|
-
Binary factors are between pairs of random variables creating the pattern
|
|
10
|
+
Binary factors are between pairs of random variables creating the pattern::
|
|
11
|
+
|
|
11
12
|
b ---- d
|
|
12
13
|
/ | / |
|
|
13
14
|
a | / |
|
|
14
15
|
\ | / |
|
|
15
16
|
c ---- e
|
|
17
|
+
|
|
16
18
|
If include_unaries then, also includes one unary factor per random variable.
|
|
17
19
|
"""
|
|
18
20
|
|
|
@@ -16,36 +16,37 @@ def read_network(input_stream, *, name: Optional[str] = None, network_builder: O
|
|
|
16
16
|
The input can be a string or a stream.
|
|
17
17
|
If the input is empty, then its is treated as an error.
|
|
18
18
|
|
|
19
|
-
This input is expected to conform to the following format
|
|
19
|
+
This input is expected to conform to the following format::
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
<network> ::= <net_block> <node_block>* <potential_block>*
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
<net_block> ::= 'net' <block>
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
<node_block> ::= 'node' <NAME> <block>
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
<potential_block> ::= 'potential' <link> <block>
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
<block> ::= '{' <sentence>* '}'
|
|
30
|
+
<sentence> ::= <NAME> '=' <value> ';'
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
<link> ::= '(' <NAME> ')'
|
|
33
|
+
| '(' <NAME> '|' <NAME>+ ')'
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
<value> ::= <STRING> | <NUMBER> | <list>
|
|
36
|
+
<list> ::='(' <value>* ')'
|
|
37
37
|
|
|
38
38
|
The sentences of a <net_block> are ignored.
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
In a <node_block>,
|
|
41
|
+
<name> of 'states' mandatory, with value that is a list of <STRING>
|
|
42
|
+
other sentences are ignored.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
In a <potential_block>,
|
|
45
|
+
<name> of 'data' is mandatory, with value that is a list of (list of) <NUMBER> (shape matching the link)
|
|
46
|
+
other sentences are ignored.
|
|
47
|
+
|
|
48
|
+
Here is a simple example input::
|
|
47
49
|
|
|
48
|
-
Here is a simple example input:
|
|
49
50
|
net{}
|
|
50
51
|
node a
|
|
51
52
|
{
|
|
@@ -62,8 +63,9 @@ def read_network(input_stream, *, name: Optional[str] = None, network_builder: O
|
|
|
62
63
|
}
|
|
63
64
|
potential ( b | a )
|
|
64
65
|
{
|
|
65
|
-
data = ((0.4 0.4 0.2)(0.4 0.4 0.2))
|
|
66
|
+
data = ((0.4 0.4 0.2)(0.4 0.4 0.2));
|
|
66
67
|
}
|
|
68
|
+
|
|
67
69
|
"""
|
|
68
70
|
# Decorate the input stream
|
|
69
71
|
input_stream = ParserInput(input_stream)
|
|
@@ -57,8 +57,10 @@ class ParserInput:
|
|
|
57
57
|
|
|
58
58
|
def readline(self) -> str:
|
|
59
59
|
"""
|
|
60
|
+
Read a line of input.
|
|
61
|
+
|
|
60
62
|
Returns:
|
|
61
|
-
the next line (including the trailing
|
|
63
|
+
the next line (including the trailing newline) or empty string if EOF.
|
|
62
64
|
"""
|
|
63
65
|
line = ''
|
|
64
66
|
while True:
|
|
@@ -69,9 +71,11 @@ class ParserInput:
|
|
|
69
71
|
|
|
70
72
|
def read_past_space(self, single_line: bool, comment_char=None) -> str:
|
|
71
73
|
"""
|
|
74
|
+
Read the input up to and including the first non-whitespace character.
|
|
75
|
+
|
|
72
76
|
Returns:
|
|
73
|
-
either empty string,
|
|
74
|
-
If single_line is True, then
|
|
77
|
+
either empty string, if end of input, otherwise a single character string that is not whitespace.
|
|
78
|
+
If single_line is True, then newline is treated as eof.
|
|
75
79
|
"""
|
|
76
80
|
c = self.read_one()
|
|
77
81
|
while True:
|