KGATE 0.2.1__tar.gz → 0.2.3__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.1 → kgate-0.2.3}/PKG-INFO +1 -1
- {kgate-0.2.1 → kgate-0.2.3}/pyproject.toml +1 -1
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/kgate.py +3 -2
- {kgate-0.2.1 → kgate-0.2.3}/LICENSE +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/README.md +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/__init__.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/config_template.toml +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/decoders/__init__.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/decoders/bilinear.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/decoders/convolutional.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/decoders/translational.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/encoders.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/evaluators.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/grid_search.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/inference.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/knowledgegraph.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/preprocessing.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/src/kgate/samplers.py +0 -0
- {kgate-0.2.1 → kgate-0.2.3}/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.3
|
|
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
|
|
@@ -504,13 +504,14 @@ class Architect(Model):
|
|
|
504
504
|
if node_type in attributes:
|
|
505
505
|
current_attribute: pd.DataFrame = attributes[node_type]
|
|
506
506
|
assert current_attribute.shape[0] == num_nodes, f"The length of the given attribute ({len(current_attribute)}) must match the number of nodes of this type ({num_nodes})."
|
|
507
|
-
input_features = torch.zeros((num_nodes,current_attribute.shape[1]), dtype=torch.
|
|
507
|
+
input_features = torch.zeros((num_nodes,current_attribute.shape[1]), dtype=torch.float)
|
|
508
508
|
for node in current_attribute.index:
|
|
509
509
|
node_idx = self.kg_train.ent2ix[node]
|
|
510
510
|
nt_idx = self.kg_train.node_types[node_idx]
|
|
511
|
+
local_idx = self.kg_train.glob2loc[node_idx]
|
|
511
512
|
assert nt_idx == self.kg_train.nt2ix[node_type], f"The entity {node} is given as {node_type} but registered as {ix2nt[str(nt_idx)]} in the KG."
|
|
512
513
|
|
|
513
|
-
input_features[
|
|
514
|
+
input_features[local_idx] = tensor(current_attribute.loc[node], dtype=torch.float)
|
|
514
515
|
|
|
515
516
|
self.node_embeddings.append(Parameter(input_features).to(self.device))
|
|
516
517
|
else:
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|