DynamicGraphsProvider commited on
Commit
c6a3c89
·
verified ·
1 Parent(s): 9c9298b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +177 -23
README.md CHANGED
@@ -1,44 +1,198 @@
1
  ---
2
  license: mit
 
 
 
 
3
  ---
4
 
5
  # The GraphTide Real-World Dynamic Graph Datasets
6
 
7
- GraphTide is a collection of large dynamic graph datasets in a compact binary
8
- format for streaming graph algorithms, dynamic graph benchmarks, and temporal
9
- graph analysis.
 
10
 
11
- Download the source code from [`wheatman/GraphTide`](https://github.com/wheatman/GraphTide).
12
- It contains the binary IO spec, Python readers/converters, source parsers, and C++ analysis code.
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- ## Layout
15
  ```text
16
- signal_graphs/ insert-only temporal edge streams
17
- update_graphs/ explicit edge insert/delete streams
18
  ```
19
 
 
 
20
  ## Download
21
- The full dataset is large, so download only the files you need when possible.
 
 
22
  ```bash
23
- pip install -U huggingface_hub
24
- huggingface-cli download DynamicGraphsProvider/GraphTide \
 
 
 
 
 
25
  signal_graphs/soc-youtube-growth.bin \
26
- --repo-type dataset --local-dir GraphTide
 
27
  ```
28
- To clone everything:
 
 
29
  ```bash
30
- git lfs install
31
- git clone https://huggingface.co/datasets/DynamicGraphsProvider/GraphTide
 
32
  ```
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  ## Binary Format
35
- Each file starts with a 32-byte little-endian header: three `uint64` values
36
- (`num_vertices`, `num_unique_edges`, `total_updates`), five `uint8` values
37
- (`signal`, `vertex_id_type`, `timestamp_type`, `directed`, `weight_type`), and
38
- three padding bytes.
39
- Rows contain `src`, `dst`, optional `timestamp`, optional `weight`, and for
40
- update graphs an `info` byte. The shipped files are directed, unweighted, and use
41
- `UINT32` vertex IDs and `UINT32` timestamps.
42
 
43
- See https://github.com/wheatman/GraphTide/blob/main/IO/README.md for details.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
 
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - graph
5
+ - dynamic-graph
6
+ - temporal-graph
7
  ---
8
 
9
  # The GraphTide Real-World Dynamic Graph Datasets
10
 
11
+ GraphTide is a collection of large-scale, real-world dynamic graph
12
+ datasets with authentic temporal information. It is intended for
13
+ evaluating streaming graph algorithms, dynamic graph systems, and
14
+ temporal graph analysis.
15
 
16
+ Source code, I/O tools, validation utilities, and documentation are
17
+ available in the
18
+ [GraphTide GitHub repository](https://github.com/wheatman/GraphTide).
19
+
20
+ ## Graph Types
21
+
22
+ GraphTide contains two types of dynamic graphs:
23
+
24
+ - **Signal graphs** record timestamped interactions between vertices,
25
+ such as transactions, comments, commits, or flights.
26
+ - **Update graphs** record explicit edge insertions and deletions,
27
+ allowing the graph state to be reconstructed over time.
28
+
29
+ ## Repository Layout
30
 
 
31
  ```text
32
+ signal_graphs/ Timestamped edge-event streams
33
+ update_graphs/ Explicit edge insertion/deletion streams
34
  ```
35
 
36
+ Each graph is distributed as an individual `.bin` file.
37
+
38
  ## Download
39
+
40
+ Install the Hugging Face tools:
41
+
42
  ```bash
43
+ pip install -U huggingface_hub hf_xet
44
+ ```
45
+
46
+ Download one dataset:
47
+
48
+ ```bash
49
+ hf download DynamicGraphsProvider/GraphTide \
50
  signal_graphs/soc-youtube-growth.bin \
51
+ --repo-type dataset \
52
+ --local-dir GraphTide-data
53
  ```
54
+
55
+ Download the complete collection:
56
+
57
  ```bash
58
+ hf download DynamicGraphsProvider/GraphTide \
59
+ --repo-type dataset \
60
+ --local-dir GraphTide-data
61
  ```
62
 
63
+ The complete collection is large, so downloading individual files is
64
+ recommended.
65
+
66
+ ## Reading the Data
67
+
68
+ Install the GraphTide Python tools:
69
+
70
+ ```bash
71
+ git clone https://github.com/wheatman/GraphTide.git GraphTide-code
72
+ python -m pip install -e ./GraphTide-code
73
+ ```
74
+
75
+ Inspect a graph header:
76
+
77
+ ```python
78
+ from pybinding import read_header
79
+
80
+ header = read_header(
81
+ "GraphTide-data/signal_graphs/soc-youtube-growth.bin"
82
+ )
83
+ print(header)
84
+ ```
85
+
86
+ Load a graph into a NumPy structured array:
87
+
88
+ ```python
89
+ from pybinding import read_bin
90
+
91
+ header, data = read_bin(
92
+ "GraphTide-data/signal_graphs/soc-youtube-growth.bin"
93
+ )
94
+ ```
95
+
96
+ Large datasets should be processed with the streaming C++ I/O
97
+ interface rather than loaded completely into memory.
98
+
99
  ## Binary Format
 
 
 
 
 
 
 
100
 
101
+ Each file begins with a 32-byte little-endian header containing:
102
+
103
+ ```text
104
+ num_vertices
105
+ num_unique_edges
106
+ total_updates
107
+ signal
108
+ vertex_id_type
109
+ timestamp_type
110
+ directed
111
+ weight_type
112
+ ```
113
+
114
+ The header is followed by tightly packed records containing:
115
+
116
+ ```text
117
+ src, dst, [timestamp], [weight], [info]
118
+ ```
119
+
120
+ Optional fields are determined by the header. For update graphs:
121
+
122
+ ```text
123
+ info = 0 insertion
124
+ info = 1 deletion
125
+ ```
126
+
127
+ Graph type, direction, weight support, and field widths may differ
128
+ across datasets.
129
+
130
+ See the complete
131
+ [binary format specification](https://github.com/wheatman/GraphTide/blob/main/IO/README.md).
132
+
133
+ ## Validation
134
+
135
+ Validate a binary graph with:
136
+
137
+ ```bash
138
+ cd GraphTide-code
139
+ python -m pybinding.validate /path/to/dataset.bin
140
+ ```
141
+
142
+ For an update graph, the optional stateful check verifies the
143
+ insertion/deletion sequence:
144
+
145
+ ```bash
146
+ python -m pybinding.validate /path/to/dataset.bin \
147
+ --check-update-sequence
148
+ ```
149
+
150
+ ## Contributing a Dataset
151
+
152
+ GraphTide welcomes community-contributed real-world dynamic graph
153
+ datasets. Providing the original parser is encouraged but not
154
+ required.
155
+
156
+ Before uploading a large file, open a
157
+ [New dataset proposal](https://github.com/wheatman/GraphTide/issues/new?template=new-dataset.yml)
158
+ describing:
159
+
160
+ - the source, citation, and license;
161
+ - signal/update and directed/undirected properties;
162
+ - vertex and edge-event semantics;
163
+ - timestamp unit;
164
+ - cleaning decisions; and
165
+ - approximate dataset size.
166
+
167
+ After the proposal is approved:
168
+
169
+ 1. Convert the data to the GraphTide binary format.
170
+ 2. Run the validator.
171
+ 3. Upload the `.bin` file to this repository as a pull request.
172
+ 4. Link the Hugging Face pull request from the GitHub proposal.
173
+
174
+ For a signal graph:
175
+
176
+ ```bash
177
+ hf auth login
178
+
179
+ hf upload DynamicGraphsProvider/GraphTide \
180
+ /path/to/dataset.bin signal_graphs/DATASET_ID.bin \
181
+ --repo-type dataset \
182
+ --create-pr \
183
+ --commit-message "Add DATASET_ID dynamic graph"
184
+ ```
185
+
186
+ Use `update_graphs/DATASET_ID.bin` for an update graph.
187
+
188
+ See the complete
189
+ [contribution guidelines](https://github.com/wheatman/GraphTide/blob/main/CONTRIBUTING.md).
190
+
191
+ ## Maintenance
192
+
193
+ Accepted datasets are maintained as versioned Hugging Face revisions.
194
+ Corrections or refreshed snapshots should be submitted through a new
195
+ proposal and pull request.
196
 
197
+ For questions or dataset proposals, use the
198
+ [GraphTide issue tracker](https://github.com/wheatman/GraphTide/issues).