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.
- benchmarks/__init__.py +17 -17
- benchmarks/datasets.py +284 -284
- benchmarks/metrics.py +275 -275
- benchmarks/run_ablation.py +279 -279
- benchmarks/run_npll_benchmark.py +270 -270
- npll/__init__.py +10 -10
- npll/bootstrap.py +474 -474
- npll/core/__init__.py +33 -33
- npll/core/knowledge_graph.py +308 -308
- npll/core/logical_rules.py +496 -496
- npll/core/mln.py +474 -474
- npll/inference/__init__.py +40 -40
- npll/inference/e_step.py +419 -419
- npll/inference/elbo.py +434 -434
- npll/inference/m_step.py +576 -576
- npll/npll_model.py +631 -631
- npll/scoring/__init__.py +42 -42
- npll/scoring/embeddings.py +441 -441
- npll/scoring/probability.py +402 -402
- npll/scoring/scoring_module.py +369 -369
- npll/training/__init__.py +24 -24
- npll/training/evaluation.py +496 -496
- npll/training/npll_trainer.py +520 -520
- npll/utils/__init__.py +47 -47
- npll/utils/batch_utils.py +492 -492
- npll/utils/config.py +144 -144
- npll/utils/math_utils.py +338 -338
- odin/__init__.py +21 -20
- odin/engine.py +264 -264
- odin/schema.py +210 -0
- {odin_engine-0.1.0.dist-info → odin_engine-0.2.0.dist-info}/METADATA +503 -456
- odin_engine-0.2.0.dist-info/RECORD +63 -0
- {odin_engine-0.1.0.dist-info → odin_engine-0.2.0.dist-info}/licenses/LICENSE +21 -21
- retrieval/__init__.py +50 -50
- retrieval/adapters.py +140 -140
- retrieval/adapters_arango.py +1418 -1418
- retrieval/aggregators.py +707 -707
- retrieval/beam.py +127 -127
- retrieval/budget.py +60 -60
- retrieval/cache.py +159 -159
- retrieval/confidence.py +88 -88
- retrieval/eval.py +49 -49
- retrieval/linker.py +87 -87
- retrieval/metrics.py +105 -105
- retrieval/metrics_motifs.py +36 -36
- retrieval/orchestrator.py +571 -571
- retrieval/ppr/__init__.py +12 -12
- retrieval/ppr/anchors.py +41 -41
- retrieval/ppr/bippr.py +61 -61
- retrieval/ppr/engines.py +257 -257
- retrieval/ppr/global_pr.py +76 -76
- retrieval/ppr/indexes.py +78 -78
- retrieval/ppr.py +156 -156
- retrieval/ppr_cache.py +25 -25
- retrieval/scoring.py +294 -294
- retrieval/utils/pii_redaction.py +36 -36
- retrieval/writers/__init__.py +9 -9
- retrieval/writers/arango_writer.py +28 -28
- retrieval/writers/base.py +21 -21
- retrieval/writers/janus_writer.py +36 -36
- odin_engine-0.1.0.dist-info/RECORD +0 -62
- {odin_engine-0.1.0.dist-info → odin_engine-0.2.0.dist-info}/WHEEL +0 -0
- {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
|
]
|