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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: KGATE
3
- Version: 0.2.4
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "KGATE"
3
- version = "0.2.4"
3
+ version = "0.2.5"
4
4
  description = "Knowledge Graph Autoencoder Training Environment, bridging PyG encoders and TorchKGE decoders."
5
5
  authors = [
6
6
  {name = "Benjamin Loire", email = "benjamin.loire@univ-amu.fr"},
@@ -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, "w") as f:
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