How to Download
Browse files
README.md
CHANGED
|
@@ -64,7 +64,7 @@ configs:
|
|
| 64 |
|
| 65 |
**Industrial-scale music recommendation dataset with organic/recommendation interactions and audio embeddings**
|
| 66 |
|
| 67 |
-
[π Overview](#overview) β’ [π Key Features](#key-features) β’ [π Statistics](#statistics) β’ [π Format](#data-format) β’ [π Benchmark](#benchmark) β’ [β FAQ](#faq)
|
| 68 |
|
| 69 |
## Overview
|
| 70 |
|
|
@@ -169,6 +169,62 @@ Each dataset is also available in a user-aggregated sequential format with the f
|
|
| 169 |
|
| 170 |
Code for the baseline models can be found in `benchmarks/` directory, see [Reproducibility Guide](benchmarks/README.md)
|
| 171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
## FAQ
|
| 173 |
|
| 174 |
### Are test items presented in training data?
|
|
@@ -201,4 +257,4 @@ A track is considered "listened" if over 50% of its duration is played.
|
|
| 201 |
|
| 202 |
A played_ratio_pct greater than 100% indicates that the user rewound and
|
| 203 |
replayed sections of the trackβso the total time listened exceeds the original track length.
|
| 204 |
-
These values are expected behavior and not log noise. See [discussion](https://huggingface.co/datasets/yandex/yambda/discussions/10)
|
|
|
|
| 64 |
|
| 65 |
**Industrial-scale music recommendation dataset with organic/recommendation interactions and audio embeddings**
|
| 66 |
|
| 67 |
+
[π Overview](#overview) β’ [π Key Features](#key-features) β’ [π Statistics](#statistics) β’ [π Format](#data-format) β’ [π Benchmark](#benchmark) β’ [β¬οΈ Download](#download) β’ [β FAQ](#faq)
|
| 68 |
|
| 69 |
## Overview
|
| 70 |
|
|
|
|
| 169 |
|
| 170 |
Code for the baseline models can be found in `benchmarks/` directory, see [Reproducibility Guide](benchmarks/README.md)
|
| 171 |
|
| 172 |
+
### Download
|
| 173 |
+
|
| 174 |
+
Simplest way:
|
| 175 |
+
```python
|
| 176 |
+
from datasets import load_dataset
|
| 177 |
+
|
| 178 |
+
ds = load_dataset("yandex/yambda", data_dir="flat/50m", data_files="likes.parquet")
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
Also, we provide simple wrapper for convenient
|
| 182 |
+
usage
|
| 183 |
+
```python
|
| 184 |
+
from typing import Literal
|
| 185 |
+
|
| 186 |
+
from datasets import Dataset, DatasetDict, load_dataset
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
class YambdaDataset:
|
| 190 |
+
INTERACTIONS = frozenset(["likes", "listens", "multi_event", "dislikes", "unlikes", "undislikes"])
|
| 191 |
+
|
| 192 |
+
def __init__(
|
| 193 |
+
self, dataset_type: Literal["flat", "sequential"] = "flat", dataset_size: Literal["50m", "500m", "5b"] = "50m"
|
| 194 |
+
):
|
| 195 |
+
assert dataset_type in {"flat", "sequential"}
|
| 196 |
+
assert dataset_size in {"50m", "500m", "5b"}
|
| 197 |
+
|
| 198 |
+
self.dataset_type = dataset_type
|
| 199 |
+
self.dataset_size = dataset_size
|
| 200 |
+
|
| 201 |
+
def interaction(
|
| 202 |
+
self, type: Literal["likes", "listens", "multi_event", "dislikes", "unlikes", "undislikes"]
|
| 203 |
+
) -> Dataset:
|
| 204 |
+
assert type in YambdaDataset.INTERACTIONS
|
| 205 |
+
|
| 206 |
+
return YambdaDataset._download(f"{self.dataset_type}/{self.dataset_size}", type)
|
| 207 |
+
|
| 208 |
+
def audio_embeddings(self) -> Dataset:
|
| 209 |
+
return YambdaDataset._download("", "embeddings")
|
| 210 |
+
|
| 211 |
+
def album_item_mapping(self) -> Dataset:
|
| 212 |
+
return YambdaDataset._download("", "album_item_mapping")
|
| 213 |
+
|
| 214 |
+
def artist_item_mapping(self) -> Dataset:
|
| 215 |
+
return YambdaDataset._download("", "artist_item_mapping")
|
| 216 |
+
|
| 217 |
+
@staticmethod
|
| 218 |
+
def _download(data_dir: str, file: str) -> Dataset:
|
| 219 |
+
data = load_dataset("yandex/yambda", data_dir=data_dir, data_files=f"{file}.parquet")
|
| 220 |
+
assert isinstance(data, DatasetDict)
|
| 221 |
+
return data["train"]
|
| 222 |
+
|
| 223 |
+
dataset = YambdaDataset("flat", "50m")
|
| 224 |
+
|
| 225 |
+
likes = dataset.interaction("likes")
|
| 226 |
+
```
|
| 227 |
+
|
| 228 |
## FAQ
|
| 229 |
|
| 230 |
### Are test items presented in training data?
|
|
|
|
| 257 |
|
| 258 |
A played_ratio_pct greater than 100% indicates that the user rewound and
|
| 259 |
replayed sections of the trackβso the total time listened exceeds the original track length.
|
| 260 |
+
These values are expected behavior and not log noise. See [discussion](https://huggingface.co/datasets/yandex/yambda/discussions/10)
|