synthetic-graph-benchmarks 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
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.
- synthetic_graph_benchmarks/__init__.py +3 -1
- synthetic_graph_benchmarks/dataset.py +12 -9
- {synthetic_graph_benchmarks-0.1.0.dist-info → synthetic_graph_benchmarks-0.1.1.dist-info}/METADATA +1 -1
- synthetic_graph_benchmarks-0.1.1.dist-info/RECORD +11 -0
- synthetic_graph_benchmarks-0.1.0.dist-info/RECORD +0 -11
- {synthetic_graph_benchmarks-0.1.0.dist-info → synthetic_graph_benchmarks-0.1.1.dist-info}/WHEEL +0 -0
- {synthetic_graph_benchmarks-0.1.0.dist-info → synthetic_graph_benchmarks-0.1.1.dist-info}/entry_points.txt +0 -0
- {synthetic_graph_benchmarks-0.1.0.dist-info → synthetic_graph_benchmarks-0.1.1.dist-info}/licenses/LICENSE +0 -0
@@ -3,8 +3,9 @@ from synthetic_graph_benchmarks.benchmarks import (
|
|
3
3
|
benchmark_planar_results,
|
4
4
|
benchmark_tree_results,
|
5
5
|
)
|
6
|
+
from synthetic_graph_benchmarks.dataset import Dataset
|
6
7
|
|
7
|
-
__version__ = "0.1.
|
8
|
+
__version__ = "0.1.1"
|
8
9
|
|
9
10
|
def main():
|
10
11
|
"""Main entry point for the CLI."""
|
@@ -20,4 +21,5 @@ __all__ = [
|
|
20
21
|
"benchmark_planar_results",
|
21
22
|
"benchmark_tree_results",
|
22
23
|
"__version__",
|
24
|
+
"Dataset",
|
23
25
|
]
|
@@ -16,7 +16,7 @@ class Dataset:
|
|
16
16
|
|
17
17
|
|
18
18
|
@classmethod
|
19
|
-
def load_from_pickle_url(cls, url: str):
|
19
|
+
def load_from_pickle_url(cls, url: str, cache_dir: str = "data") -> "Dataset":
|
20
20
|
"""
|
21
21
|
Load a dataset from a pickle file available at the given URL.
|
22
22
|
|
@@ -26,7 +26,7 @@ class Dataset:
|
|
26
26
|
Returns:
|
27
27
|
Dataset: An instance of the Dataset class with loaded graphs.
|
28
28
|
"""
|
29
|
-
res = download_file(url,
|
29
|
+
res = download_file(url, cache_dir)
|
30
30
|
with open(res, "rb") as f:
|
31
31
|
data = pickle.load(f)
|
32
32
|
return cls(
|
@@ -35,13 +35,16 @@ class Dataset:
|
|
35
35
|
test_graphs=data.get('test', None)
|
36
36
|
)
|
37
37
|
@classmethod
|
38
|
-
def load_sbm(cls):
|
39
|
-
|
38
|
+
def load_sbm(cls, cache_dir: str = "data") -> "Dataset":
|
39
|
+
"""Load a dataset of Stochastic Block Model (SBM) graphs."""
|
40
|
+
return cls.load_from_pickle_url("https://raw.githubusercontent.com/AndreasBergmeister/graph-generation/main/data/sbm.pkl", cache_dir)
|
40
41
|
|
41
42
|
@classmethod
|
42
|
-
def load_planar(cls):
|
43
|
-
|
44
|
-
|
43
|
+
def load_planar(cls, cache_dir: str = "data") -> "Dataset":
|
44
|
+
"""Load a dataset of planar graphs."""
|
45
|
+
return cls.load_from_pickle_url("https://raw.githubusercontent.com/AndreasBergmeister/graph-generation/main/data/planar.pkl", cache_dir)
|
46
|
+
|
45
47
|
@classmethod
|
46
|
-
def load_tree(cls):
|
47
|
-
|
48
|
+
def load_tree(cls, cache_dir: str = "data") -> "Dataset":
|
49
|
+
"""Load a dataset of tree graphs."""
|
50
|
+
return cls.load_from_pickle_url("https://raw.githubusercontent.com/AndreasBergmeister/graph-generation/main/data/tree.pkl", cache_dir)
|
{synthetic_graph_benchmarks-0.1.0.dist-info → synthetic_graph_benchmarks-0.1.1.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: synthetic-graph-benchmarks
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: Standardized benchmarks for evaluating synthetic graph generation methods
|
5
5
|
Project-URL: Homepage, https://github.com/peteole/synthetic_graph_benchmarks
|
6
6
|
Project-URL: Repository, https://github.com/peteole/synthetic_graph_benchmarks
|
@@ -0,0 +1,11 @@
|
|
1
|
+
synthetic_graph_benchmarks/__init__.py,sha256=dyuP3-iM0GGHW4Ufa3dR96z-Mzpn1g-XNhvHoUOIg3I,730
|
2
|
+
synthetic_graph_benchmarks/benchmarks.py,sha256=jWDaVrAwe4uYaKl1EnUIVqavDz5ZeuxcSOcHyMwUPBc,2707
|
3
|
+
synthetic_graph_benchmarks/dataset.py,sha256=7aJ9kU_Z0VF78-U7rm0uE2wAMG6wEq4KTSiMiUh-SIM,1860
|
4
|
+
synthetic_graph_benchmarks/dist_helper.py,sha256=rwtpP_IaIe8DcS5OvrSkYdF8xl7VBHaGoM3jv_Yeeos,7001
|
5
|
+
synthetic_graph_benchmarks/spectre_utils.py,sha256=CuOQdTlznar9_FIM66qoYk5zg1OEfa4M8be4WwHsFKA,41734
|
6
|
+
synthetic_graph_benchmarks/utils.py,sha256=Y5QTRmGjr79p1Y6h54c6k9kXz-jDveoj0ZjpAMKml50,1835
|
7
|
+
synthetic_graph_benchmarks-0.1.1.dist-info/METADATA,sha256=xC1mrsHFNCnCOoG3ZZDZHTmqwQ_3O16rFYT83rGhkkk,8484
|
8
|
+
synthetic_graph_benchmarks-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
+
synthetic_graph_benchmarks-0.1.1.dist-info/entry_points.txt,sha256=KvCdlYfIhAw2srO-7H9XG0jTaAIENxGXprw0B4aClco,79
|
10
|
+
synthetic_graph_benchmarks-0.1.1.dist-info/licenses/LICENSE,sha256=VDqzZZ7UjLMPLrsbgpHsMCW-H4msljYwm9z61rQSIsc,1069
|
11
|
+
synthetic_graph_benchmarks-0.1.1.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
synthetic_graph_benchmarks/__init__.py,sha256=pMEdpnJXD8laVjCG4zd8d555chyqXv3-2WGxnrKFAQg,660
|
2
|
-
synthetic_graph_benchmarks/benchmarks.py,sha256=jWDaVrAwe4uYaKl1EnUIVqavDz5ZeuxcSOcHyMwUPBc,2707
|
3
|
-
synthetic_graph_benchmarks/dataset.py,sha256=Yca2fNPvRu7cOFyjjixkyqttboC07iPDgUXZWvvweN0,1515
|
4
|
-
synthetic_graph_benchmarks/dist_helper.py,sha256=rwtpP_IaIe8DcS5OvrSkYdF8xl7VBHaGoM3jv_Yeeos,7001
|
5
|
-
synthetic_graph_benchmarks/spectre_utils.py,sha256=CuOQdTlznar9_FIM66qoYk5zg1OEfa4M8be4WwHsFKA,41734
|
6
|
-
synthetic_graph_benchmarks/utils.py,sha256=Y5QTRmGjr79p1Y6h54c6k9kXz-jDveoj0ZjpAMKml50,1835
|
7
|
-
synthetic_graph_benchmarks-0.1.0.dist-info/METADATA,sha256=7zz-Yd3WXLVNjax5UPbkmPWO0n2uMRTD9w531tuqc3I,8484
|
8
|
-
synthetic_graph_benchmarks-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
-
synthetic_graph_benchmarks-0.1.0.dist-info/entry_points.txt,sha256=KvCdlYfIhAw2srO-7H9XG0jTaAIENxGXprw0B4aClco,79
|
10
|
-
synthetic_graph_benchmarks-0.1.0.dist-info/licenses/LICENSE,sha256=VDqzZZ7UjLMPLrsbgpHsMCW-H4msljYwm9z61rQSIsc,1069
|
11
|
-
synthetic_graph_benchmarks-0.1.0.dist-info/RECORD,,
|
{synthetic_graph_benchmarks-0.1.0.dist-info → synthetic_graph_benchmarks-0.1.1.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|