KGATE 0.2.7__tar.gz → 0.2.8__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.
- {kgate-0.2.7 → kgate-0.2.8}/PKG-INFO +1 -1
- {kgate-0.2.7 → kgate-0.2.8}/pyproject.toml +1 -1
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/knowledgegraph.py +4 -1
- {kgate-0.2.7 → kgate-0.2.8}/LICENSE +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/README.md +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/__init__.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/config_template.toml +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/decoders/__init__.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/decoders/bilinear.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/decoders/convolutional.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/decoders/translational.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/encoders.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/evaluators.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/grid_search.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/inference.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/kgate.py +2 -2
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/preprocessing.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/samplers.py +0 -0
- {kgate-0.2.7 → kgate-0.2.8}/src/kgate/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: KGATE
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: Knowledge Graph Autoencoder Training Environment, bridging PyG encoders and TorchKGE decoders.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: Knowledge Graph,Knowledge Graph Embedding,Autoencoder,Machine Learning,Link Prediction
|
|
@@ -101,7 +101,10 @@ class KnowledgeGraph(Dataset):
|
|
|
101
101
|
|
|
102
102
|
if df is None:
|
|
103
103
|
self.n_nodes = cat([self.head_idx, self.tail_idx]).unique().size(0)
|
|
104
|
-
|
|
104
|
+
# The mapping is done on the absolute index of nodes. However, subgraphs don't have all the nodes
|
|
105
|
+
# Thus, we must initialize the tensor at -1 to avoid downstream issue with the node_type 0 being
|
|
106
|
+
# broadcasted to missing nodes in subgraphs.
|
|
107
|
+
self.node_types = torch.ones(self.n_nodes, dtype=torch.long).neg()
|
|
105
108
|
|
|
106
109
|
for tri_type in self.triples.unique():
|
|
107
110
|
h_t, t_t = self.triple_types[tri_type][0], self.triple_types[tri_type][2]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -581,9 +581,7 @@ class Architect(Model):
|
|
|
581
581
|
|
|
582
582
|
trainer.add_event_handler(Events.EPOCH_COMPLETED, self.log_metrics_to_csv)
|
|
583
583
|
trainer.add_event_handler(Events.EPOCH_COMPLETED, self.clean_memory)
|
|
584
|
-
trainer.add_event_handler(Events.EPOCH_COMPLETED(every=self.eval_interval), self.evaluate)
|
|
585
584
|
trainer.add_event_handler(Events.EPOCH_COMPLETED, self.update_scheduler)
|
|
586
|
-
trainer.add_event_handler(Events.EPOCH_COMPLETED(every=self.eval_interval), early_stopping)
|
|
587
585
|
|
|
588
586
|
trainer.add_event_handler(Events.COMPLETED, self.on_training_completed)
|
|
589
587
|
|
|
@@ -640,6 +638,8 @@ class Architect(Model):
|
|
|
640
638
|
atomic=True
|
|
641
639
|
)
|
|
642
640
|
|
|
641
|
+
trainer.add_event_handler(Events.EPOCH_COMPLETED(every=self.eval_interval), self.evaluate)
|
|
642
|
+
trainer.add_event_handler(Events.EPOCH_COMPLETED(every=self.eval_interval), early_stopping)
|
|
643
643
|
trainer.add_event_handler(
|
|
644
644
|
Events.EPOCH_COMPLETED(every=self.eval_interval),
|
|
645
645
|
checkpoint_best_handler,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|