Skip to content

Commit

Permalink
feat: add dynamic delimiter discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
dPys committed Dec 12, 2024
1 parent ced9b30 commit aaa0a17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nxbench/data/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ async def load_network(
self, config: DatasetConfig, session: aiohttp.ClientSession | None = None
) -> tuple[nx.Graph | nx.DiGraph, dict[str, Any]]:
"""Load or generate a network based on config."""
metadata = self.get_metadata(config.name)
source_lower = config.source.lower()

if source_lower == "generator":
return self._generate_graph(config)

metadata = self.get_metadata(config.name)

if config.name in self._network_cache:
logger.debug(f"Loading network '{config.name}' from cache")
return self._network_cache[config.name]
Expand Down

0 comments on commit aaa0a17

Please sign in to comment.