Skip to content

Commit

Permalink
fix embedder loading
Browse files Browse the repository at this point in the history
  • Loading branch information
simonusher committed Jun 3, 2023
1 parent f1da952 commit 57c0cd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions srai/embedders/hex2vec/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ def load(cls, path: Path) -> "Hex2VecEmbedder":
Returns:
Hex2VecEmbedder: The loaded embedder.
"""
if isinstance(path, str):
path = Path(path)
with open(path / "config.json") as f:
embedder_config = json.load(f)
embedder = cls(**embedder_config["embedder_config"])
Expand Down

0 comments on commit 57c0cd7

Please sign in to comment.