Skip to content

Commit

Permalink
notebook update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCatt91 committed Sep 28, 2023
1 parent 3420625 commit dc77144
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 49 deletions.
2 changes: 2 additions & 0 deletions besskge/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ def save(self, out_file: Path) -> None:
"""
with open(out_file, "wb") as f:
pickle.dump(self, f)
print(f"KGDataset saved to {out_file}")

@classmethod
def load(cls, path: Path) -> "KGDataset":
Expand All @@ -466,5 +467,6 @@ def load(cls, path: Path) -> "KGDataset":
kg_dataset = pickle.load(f)
if not isinstance(kg_dataset, KGDataset):
raise ValueError(f"File at path {path} is not a KGDataset")
print(f"Loaded KGDataset at {path}")

return kg_dataset
Loading

0 comments on commit dc77144

Please sign in to comment.