KGATE 0.2.4__tar.gz → 0.2.5__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.4 → kgate-0.2.5}/PKG-INFO +1 -1
- {kgate-0.2.4 → kgate-0.2.5}/pyproject.toml +1 -1
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/kgate.py +3 -1
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/utils.py +1 -1
- {kgate-0.2.4 → kgate-0.2.5}/LICENSE +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/README.md +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/__init__.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/config_template.toml +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/decoders/__init__.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/decoders/bilinear.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/decoders/convolutional.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/decoders/translational.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/encoders.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/evaluators.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/grid_search.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/inference.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/knowledgegraph.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/preprocessing.py +0 -0
- {kgate-0.2.4 → kgate-0.2.5}/src/kgate/samplers.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.5
|
|
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
|
|
@@ -10,7 +10,7 @@ from torch import tensor, long, stack, Tensor
|
|
|
10
10
|
from torch.nn import Parameter
|
|
11
11
|
from torch.nn.functional import normalize
|
|
12
12
|
from torch.utils.data import DataLoader
|
|
13
|
-
from .utils import parse_config, load_knowledge_graph, set_random_seeds, find_best_model, merge_kg, init_embedding, plot_learning_curves
|
|
13
|
+
from .utils import parse_config, load_knowledge_graph, set_random_seeds, find_best_model, merge_kg, init_embedding, plot_learning_curves, save_config
|
|
14
14
|
from .preprocessing import prepare_knowledge_graph, SUPPORTED_SEPARATORS
|
|
15
15
|
from .encoders import *
|
|
16
16
|
from .decoders import *
|
|
@@ -645,6 +645,8 @@ class Architect(Model):
|
|
|
645
645
|
to_save
|
|
646
646
|
)
|
|
647
647
|
|
|
648
|
+
save_config(self.config)
|
|
649
|
+
|
|
648
650
|
if checkpoint_file is not None:
|
|
649
651
|
if Path(checkpoint_file).is_file():
|
|
650
652
|
logging.info(f"Resuming training from checkpoint: {checkpoint_file}")
|
|
@@ -96,7 +96,7 @@ def save_config(config:dict, filename:Path | None = None):
|
|
|
96
96
|
|
|
97
97
|
config_path = filename or Path(config["output_directory"]).joinpath("kgate_config.toml")
|
|
98
98
|
|
|
99
|
-
with open(config_path, "
|
|
99
|
+
with open(config_path, "wb") as f:
|
|
100
100
|
tomli_w.dump(config,f)
|
|
101
101
|
|
|
102
102
|
def load_knowledge_graph(pickle_filename: Path) -> Tuple[KnowledgeGraph, KnowledgeGraph, KnowledgeGraph]:
|
|
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
|