4141)
4242from polygraph .utils .kernels import AdaptiveRBFKernel
4343
44- # ---------------------------------------------------------------------------
45- # Paths (resolved before Hydra touches CWD; we disable chdir in the config)
46- # ---------------------------------------------------------------------------
4744REPO_ROOT = here ()
4845DATA_DIR = REPO_ROOT / "data"
4946EXPERIMENT_RESULTS_DIR = (
6562]
6663
6764
68- # ---------------------------------------------------------------------------
69- # Graph loading helpers
70- # ---------------------------------------------------------------------------
7165def load_graphs (model : str , dataset : str ) -> List [nx .Graph ]:
7266 """Load model-generated graphs from ``data/{model}/{dataset}.pkl``."""
7367 pkl_path = DATA_DIR / model / f"{ dataset } .pkl"
@@ -115,9 +109,6 @@ def get_reference_dataset(
115109 return list (classes [dataset ](split = split , num_graphs = num_graphs ).to_nx ())
116110
117111
118- # ---------------------------------------------------------------------------
119- # Descriptor factory
120- # ---------------------------------------------------------------------------
121112def make_descriptor (name : str , reference_graphs : List [nx .Graph ]):
122113 """Instantiate a descriptor by name, matching the original experiment."""
123114 factories = {
@@ -137,9 +128,6 @@ def make_descriptor(name: str, reference_graphs: List[nx.Graph]):
137128 return factories [name ]()
138129
139130
140- # ---------------------------------------------------------------------------
141- # Main
142- # ---------------------------------------------------------------------------
143131@hydra .main (
144132 config_path = "../configs" ,
145133 config_name = "01_subsampling_mmd" ,
@@ -278,7 +266,6 @@ def main(cfg: DictConfig) -> None:
278266 "mmd_std" : float (result .std ),
279267 "mmd_low" : float (result .low ) if result .low is not None else None ,
280268 "mmd_high" : float (result .high ) if result .high is not None else None ,
281- "mmd_runtime_seconds" : mmd_runtime_perf_seconds ,
282269 "mmd_runtime_perf_seconds" : mmd_runtime_perf_seconds ,
283270 }
284271
@@ -301,7 +288,6 @@ def main(cfg: DictConfig) -> None:
301288 "status" : "ok" ,
302289 "output_path" : str (out_path ),
303290 "result" : output ,
304- "mmd_runtime_seconds" : mmd_runtime_perf_seconds ,
305291 "mmd_runtime_perf_seconds" : mmd_runtime_perf_seconds ,
306292 }
307293 )
@@ -329,7 +315,6 @@ def main(cfg: DictConfig) -> None:
329315 "variant" : variant ,
330316 "status" : "error" ,
331317 "error" : str (e ),
332- "mmd_runtime_seconds" : metric_runtime_perf_seconds ,
333318 "mmd_runtime_perf_seconds" : metric_runtime_perf_seconds ,
334319 }
335320 )
0 commit comments