File size: 2,962 Bytes
16da98a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
pretty_name: "Reproduction of Parquet files in blog post 'Parquet Content-Defined Chunking'"
---

# Notebooks on the Hub

This dataset uses files from the repository https://huggingface.co/datasets/davanstrien/notebooks_on_the_hub_raw which records all the repositories hosted on the Hugging Face Hub that contain notebooks.  [Daniel](https://huggingface.co/davanstrien)'s repository was updated daily from April of 2023 to June of 2024. I manually copied only one version per month: they are stored in the `original` folder with the name `YYYY_MM.parquet`, from `2023_05.parquet` to `2024_05.parquet` (13 files).

Then, I recreated these files with different configurations of the Parquet format, as explained below:

- with (`cdc`) or without (`no_cdc`) content-defined chunking (CDC: this feature ensures that the columns are consistently getting chunked into data pages based on their content, and compatible with the Xet storage used by Hugging Face. More on this in the blog post [Parquet Content-Defined Chunking](https://huggingface.co/blog/parquet-cdc) by [Krisztian Szucs](https://huggingface.co/kszucs)),
- with (`snappy`) or without (`none`) snappy compression,
- with two row group sizes: the default (1024 * 1024 rows, `1m`) and a smaller one (128 * 1024 rows, `128k`),
- with the data pages index enabled.


The aim of this dataset is to visualize diffs between the different Parquet files.

The files are stored in the following structure:

```
.
β”œβ”€β”€ 128k
β”‚   β”œβ”€β”€cdc
|   β”‚   β”œβ”€β”€ none
|   β”‚   β”‚   β”œβ”€β”€ 2023_05.parquet
|   β”‚   β”‚   β”œβ”€β”€ ...
|   β”‚   β”‚   └── 2024_05.parquet
|   β”‚   └── snappy
|   β”‚       β”œβ”€β”€ 2023_05.parquet
|   β”‚       β”œβ”€β”€ ...
|   β”‚       └── 2024_05.parquet
|   └── no_cdc
|       β”œβ”€β”€ none
|       β”‚   β”œβ”€β”€ 2023_05.parquet
|       β”‚   β”œβ”€β”€ ...
|       β”‚   └── 2024_05.parquet
|       └── snappy
|           β”œβ”€β”€ 2023_05.parquet
|           β”œβ”€β”€ ...
|           └── 2024_05.parquet
β”œβ”€β”€ 1m
β”‚   β”œβ”€β”€cdc
|   β”‚   β”œβ”€β”€ none
|   β”‚   β”‚   β”œβ”€β”€ 2023_05.parquet
|   β”‚   β”‚   β”œβ”€β”€ ...
|   β”‚   β”‚   └── 2024_05.parquet
|   β”‚   └── snappy
|   β”‚       β”œβ”€β”€ 2023_05.parquet
|   β”‚       β”œβ”€β”€ ...
|   β”‚       └── 2024_05.parquet
|   └── no_cdc
|       β”œβ”€β”€ none
|       β”‚   β”œβ”€β”€ 2023_05.parquet
|       β”‚   β”œβ”€β”€ ...
|       β”‚   └── 2024_05.parquet
|       └── snappy
|           β”œβ”€β”€ 2023_05.parquet
|           β”œβ”€β”€ ...
|           └── 2024_05.parquet
└── original
    β”œβ”€β”€ 2023_05.parquet
    β”œβ”€β”€ ...
    └── 2024_05.parquet
```

## Script

Requirements: [uv](https://docs.astral.sh/uv) and [make](https://www.gnu.org/software/make/).

The files are generated with the script [`generate_files.py`](./generate_files.py):

```
make install
make run
```