odin-engine 0.1.0__py3-none-any.whl → 0.2.0__py3-none-any.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.
Files changed (63) hide show
  1. benchmarks/__init__.py +17 -17
  2. benchmarks/datasets.py +284 -284
  3. benchmarks/metrics.py +275 -275
  4. benchmarks/run_ablation.py +279 -279
  5. benchmarks/run_npll_benchmark.py +270 -270
  6. npll/__init__.py +10 -10
  7. npll/bootstrap.py +474 -474
  8. npll/core/__init__.py +33 -33
  9. npll/core/knowledge_graph.py +308 -308
  10. npll/core/logical_rules.py +496 -496
  11. npll/core/mln.py +474 -474
  12. npll/inference/__init__.py +40 -40
  13. npll/inference/e_step.py +419 -419
  14. npll/inference/elbo.py +434 -434
  15. npll/inference/m_step.py +576 -576
  16. npll/npll_model.py +631 -631
  17. npll/scoring/__init__.py +42 -42
  18. npll/scoring/embeddings.py +441 -441
  19. npll/scoring/probability.py +402 -402
  20. npll/scoring/scoring_module.py +369 -369
  21. npll/training/__init__.py +24 -24
  22. npll/training/evaluation.py +496 -496
  23. npll/training/npll_trainer.py +520 -520
  24. npll/utils/__init__.py +47 -47
  25. npll/utils/batch_utils.py +492 -492
  26. npll/utils/config.py +144 -144
  27. npll/utils/math_utils.py +338 -338
  28. odin/__init__.py +21 -20
  29. odin/engine.py +264 -264
  30. odin/schema.py +210 -0
  31. {odin_engine-0.1.0.dist-info → odin_engine-0.2.0.dist-info}/METADATA +503 -456
  32. odin_engine-0.2.0.dist-info/RECORD +63 -0
  33. {odin_engine-0.1.0.dist-info → odin_engine-0.2.0.dist-info}/licenses/LICENSE +21 -21
  34. retrieval/__init__.py +50 -50
  35. retrieval/adapters.py +140 -140
  36. retrieval/adapters_arango.py +1418 -1418
  37. retrieval/aggregators.py +707 -707
  38. retrieval/beam.py +127 -127
  39. retrieval/budget.py +60 -60
  40. retrieval/cache.py +159 -159
  41. retrieval/confidence.py +88 -88
  42. retrieval/eval.py +49 -49
  43. retrieval/linker.py +87 -87
  44. retrieval/metrics.py +105 -105
  45. retrieval/metrics_motifs.py +36 -36
  46. retrieval/orchestrator.py +571 -571
  47. retrieval/ppr/__init__.py +12 -12
  48. retrieval/ppr/anchors.py +41 -41
  49. retrieval/ppr/bippr.py +61 -61
  50. retrieval/ppr/engines.py +257 -257
  51. retrieval/ppr/global_pr.py +76 -76
  52. retrieval/ppr/indexes.py +78 -78
  53. retrieval/ppr.py +156 -156
  54. retrieval/ppr_cache.py +25 -25
  55. retrieval/scoring.py +294 -294
  56. retrieval/utils/pii_redaction.py +36 -36
  57. retrieval/writers/__init__.py +9 -9
  58. retrieval/writers/arango_writer.py +28 -28
  59. retrieval/writers/base.py +21 -21
  60. retrieval/writers/janus_writer.py +36 -36
  61. odin_engine-0.1.0.dist-info/RECORD +0 -62
  62. {odin_engine-0.1.0.dist-info → odin_engine-0.2.0.dist-info}/WHEEL +0 -0
  63. {odin_engine-0.1.0.dist-info → odin_engine-0.2.0.dist-info}/top_level.txt +0 -0
npll/scoring/__init__.py CHANGED
@@ -1,43 +1,43 @@
1
- """
2
- Scoring module for NPLL implementation
3
- Implements the bilinear scoring function and probability transformations from the paper
4
- """
5
-
6
- from .embeddings import (
7
- EntityEmbedding, RelationEmbedding, EmbeddingManager,
8
- create_embedding_manager, initialize_embeddings_from_pretrained
9
- )
10
- from .scoring_module import (
11
- BilinearScoringFunction, NPLLScoringModule, BatchedScoringModule,
12
- create_scoring_module, verify_equation7_implementation
13
- )
14
- from .probability import (
15
- ProbabilityTransform, FactProbabilityComputer, ApproximatePosteriorComputer,
16
- ProbabilityCalibrator, ConfidenceEstimator, create_probability_components,
17
- verify_probability_computations
18
- )
19
-
20
- __all__ = [
21
- # Embeddings
22
- 'EntityEmbedding',
23
- 'RelationEmbedding',
24
- 'EmbeddingManager',
25
- 'create_embedding_manager',
26
- 'initialize_embeddings_from_pretrained',
27
-
28
- # Scoring Module
29
- 'BilinearScoringFunction',
30
- 'NPLLScoringModule',
31
- 'BatchedScoringModule',
32
- 'create_scoring_module',
33
- 'verify_equation7_implementation',
34
-
35
- # Probability Components
36
- 'ProbabilityTransform',
37
- 'FactProbabilityComputer',
38
- 'ApproximatePosteriorComputer',
39
- 'ProbabilityCalibrator',
40
- 'ConfidenceEstimator',
41
- 'create_probability_components',
42
- 'verify_probability_computations'
1
+ """
2
+ Scoring module for NPLL implementation
3
+ Implements the bilinear scoring function and probability transformations from the paper
4
+ """
5
+
6
+ from .embeddings import (
7
+ EntityEmbedding, RelationEmbedding, EmbeddingManager,
8
+ create_embedding_manager, initialize_embeddings_from_pretrained
9
+ )
10
+ from .scoring_module import (
11
+ BilinearScoringFunction, NPLLScoringModule, BatchedScoringModule,
12
+ create_scoring_module, verify_equation7_implementation
13
+ )
14
+ from .probability import (
15
+ ProbabilityTransform, FactProbabilityComputer, ApproximatePosteriorComputer,
16
+ ProbabilityCalibrator, ConfidenceEstimator, create_probability_components,
17
+ verify_probability_computations
18
+ )
19
+
20
+ __all__ = [
21
+ # Embeddings
22
+ 'EntityEmbedding',
23
+ 'RelationEmbedding',
24
+ 'EmbeddingManager',
25
+ 'create_embedding_manager',
26
+ 'initialize_embeddings_from_pretrained',
27
+
28
+ # Scoring Module
29
+ 'BilinearScoringFunction',
30
+ 'NPLLScoringModule',
31
+ 'BatchedScoringModule',
32
+ 'create_scoring_module',
33
+ 'verify_equation7_implementation',
34
+
35
+ # Probability Components
36
+ 'ProbabilityTransform',
37
+ 'FactProbabilityComputer',
38
+ 'ApproximatePosteriorComputer',
39
+ 'ProbabilityCalibrator',
40
+ 'ConfidenceEstimator',
41
+ 'create_probability_components',
42
+ 'verify_probability_computations'
43
43
  ]