Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 41316 new columns ({'279710', '9014', '105653', '4985', '171023', '121061', '273371', '3718', '32170', '111931', '161121', '6388', '79910', '6946', '173813', '8903', '6470', '235117', '162846', '265616', '289069', '143315', '195725', '66813', '144438', '85362', '168080', '165067', '157266', '5759', '26180', '5835', '120458', '32892', '131550', '160852', '72018', '3877', '159375', '5225', '25924', '41226', '31973', '48970', '26128', '168984', '6237', '120272', '120633', '195209', '130292', '215343', '27869', '107614', '195317', '69542', '199698', '195907', '5180', '128562', '50594', '185869', '46367', '60896', '5150', '243402', '3095', '231819', '205857', '999', '41912', '206152', '4796', '58760', '39425', '155072', '104245', '32589', '80210', '183515', '112275', '3664', '160440', '1476', '3607', '158282', '465', '206869', '141154', '177341', '201360', '3920', '91450', '169770', '179361', '206305', '278448', '242882', '166591', '158510', '126018', '3901', '280238', '1704', '6272', '270026', '148438', '177727', '162374', '91692', '8875', '148178', '168740', '271106', '7943', '195093', '5771', '7833', '166964', '140166', '105130', '26812', '188571', '134817', '196255', '69275', '68517', '259077', '540', '214364', '80405', '27431', '171799', '191387', '80806', '31991', '138804', '41212', '78620', '6131', '201743', '72360', '226864', '32126', '141110', '33318', '102432', '321', '99970', '52189', '284965', '100017', '134427', '72980', '175267', '153438', '88055', '204200', '1603', '188373', '54758', 
...
', '144668', '1058', '164659', '186863', '114492', '192237', '95746', '269', '226114', '172461', '159786', '112083', '210543', '147611', '138318', '205527', '27879', '60737', '51921', '152664', '125181', '153404', '71865', '154400', '1405', '242900', '3376', '138462', '90057', '168654', '89623', '213277', '33124', '83619', '235107', '228881', '71168', '210569', '210089', '4202', '196639', '31162', '8978', '6268', '130170', '6234', '183819', '168096', '173313', '174045', '131816', '6343', '46258', '172487', '2950', '205687', '132753', '127156', '278178', '161930', '213764', '150900', '289095', '132484', '282649', '6370', '44124', '168622', '189183', '187459', '122437', '153356', '168718', '279410', '5539', '56788', '2946', '112897', '7587', '165651', '7840', '141622', '98394', '175945', '105444', '216127', '8592', '45100', '150262', '4019', '100032', '81853', '162088', '155966', '144322', '26056', '150334', '195665', '26280', '171157', '199227', '182947', '175135', '208170', '67354', '96411', '84506', '160656', '180021', '91681', '217186', '140435', '211958', '122789', '285827', '115943', '5567', '127050', '175669', '136483', '2141', '1533', '130540', '182777', '163731', '202503', '5371', '58047', '1724', '71482', '173329', '134855', '2329', '8201', '81027', '141718', '217953', '8914', '220724', '168502', '7477', '105628', '80797', '90426', '2422', '199844', '1386', '7767', '5028', '153933', '5247', '8130', '199902', '186541', '2277', '219693', '974', '1065', '8131', '171793'}) and 1 missing columns ({'text'}).

This happened while the json dataset builder was generating data using

hf://datasets/dmckinney-ml/movie-recommender-artifacts/movie_id_to_row.json (at revision ef31f53dbab182f3e3a69c137c91abf9f919e013), [/tmp/hf-datasets-cache/medium/datasets/37716749198995-config-parquet-and-info-dmckinney-ml-movie-recomm-7882290f/hub/datasets--dmckinney-ml--movie-recommender-artifacts/snapshots/ef31f53dbab182f3e3a69c137c91abf9f919e013/genres_vocab.json (origin=hf://datasets/dmckinney-ml/movie-recommender-artifacts@ef31f53dbab182f3e3a69c137c91abf9f919e013/genres_vocab.json), /tmp/hf-datasets-cache/medium/datasets/37716749198995-config-parquet-and-info-dmckinney-ml-movie-recomm-7882290f/hub/datasets--dmckinney-ml--movie-recommender-artifacts/snapshots/ef31f53dbab182f3e3a69c137c91abf9f919e013/movie_id_to_row.json (origin=hf://datasets/dmckinney-ml/movie-recommender-artifacts@ef31f53dbab182f3e3a69c137c91abf9f919e013/movie_id_to_row.json), /tmp/hf-datasets-cache/medium/datasets/37716749198995-config-parquet-and-info-dmckinney-ml-movie-recomm-7882290f/hub/datasets--dmckinney-ml--movie-recommender-artifacts/snapshots/ef31f53dbab182f3e3a69c137c91abf9f919e013/movie_id_to_row_cold.json (origin=hf://datasets/dmckinney-ml/movie-recommender-artifacts@ef31f53dbab182f3e3a69c137c91abf9f919e013/movie_id_to_row_cold.json), /tmp/hf-datasets-cache/medium/datasets/37716749198995-config-parquet-and-info-dmckinney-ml-movie-recomm-7882290f/hub/datasets--dmckinney-ml--movie-recommender-artifacts/snapshots/ef31f53dbab182f3e3a69c137c91abf9f919e013/xgb_ranker.json (origin=hf://datasets/dmckinney-ml/movie-recommender-artifacts@ef31f53dbab182f3e3a69c137c91abf9f919e013/xgb_ranker.json)]

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1890, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 760, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              777: int64
              1450: int64
              2669: int64
              2670: int64
              3339: int64
              3367: int64
              3670: int64
              4924: int64
              5196: int64
              5921: int64
              6434: int64
              6441: int64
              6447: int64
              6498: int64
              30695: int64
              33610: int64
              60389: int64
              85129: int64
              100574: int64
              101319: int64
              111370: int64
              131164: int64
              131572: int64
              131966: int64
              132506: int64
              132588: int64
              141327: int64
              150443: int64
              152047: int64
              153496: int64
              156944: int64
              158123: int64
              161954: int64
              163178: int64
              164031: int64
              169246: int64
              171767: int64
              173649: int64
              180279: int64
              182369: int64
              190901: int64
              193295: int64
              193607: int64
              197145: int64
              210051: int64
              213914: int64
              214484: int64
              218451: int64
              222649: int64
              4460: int64
              681: int64
              716: int64
              732: int64
              1000: int64
              1313: int64
              1447: int64
              1501: int64
              1578: int64
              1662: int64
              1742: int64
              2280: int64
              2425: int64
              3369: int64
              3427: int64
              4279: int64
              4905: int64
              4945: int64
              5590: int64
              5976: int64
              6504: int64
              6819: int64
              58904: int64
              59418: int64
              66691: int64
              84475: int64
              93490: int64
              93782: int64
              94365: int64
              102509: int64
              104231: int64
              108949: int64
              111815: int64
              116309: int64
              121937: int64
              122857: int64
              125113: int64
              125229: int64
              125481: int64
              125630: int64
              125698: int64
              126775: int64
              128429: int64
              129941: int64
              130008: int64
              130288: int64
              132470: int64
              132832: int64
              132840: int64
              133517: int64
              133620: int64
              134765: int64
              136050: int64
              138837: int64
              141916: int64
              143001: int64
              143331: int64
              144414: int64
              145765: int64
              147328: int64
              147330: int64
              149938: int64
              151080: int64
              151437: int64
              15193
              ...
               int64
              279966: int64
              88468: int64
              122133: int64
              3054: int64
              174543: int64
              60069: int64
              81564: int64
              214662: int64
              239256: int64
              114166: int64
              661: int64
              1881: int64
              73854: int64
              109104: int64
              2142: int64
              140345: int64
              103330: int64
              214240: int64
              59844: int64
              178865: int64
              175997: int64
              31804: int64
              31921: int64
              215071: int64
              1464: int64
              144350: int64
              91542: int64
              31367: int64
              117646: int64
              4956: int64
              194388: int64
              97724: int64
              148775: int64
              215713: int64
              147051: int64
              62999: int64
              87222: int64
              8253: int64
              214032: int64
              161594: int64
              546: int64
              210577: int64
              72165: int64
              164226: int64
              194440: int64
              8481: int64
              173613: int64
              36509: int64
              175477: int64
              250832: int64
              140511: int64
              79132: int64
              36397: int64
              364: int64
              199736: int64
              122240: int64
              192559: int64
              45758: int64
              26504: int64
              34435: int64
              47124: int64
              78499: int64
              78637: int64
              223570: int64
              179729: int64
              52287: int64
              106240: int64
              157865: int64
              274197: int64
              175479: int64
              180091: int64
              47404: int64
              114945: int64
              184865: int64
              26340: int64
              51939: int64
              108932: int64
              213111: int64
              69644: int64
              84944: int64
              6350: int64
              136618: int64
              2414: int64
              673: int64
              27781: int64
              166163: int64
              74404: int64
              74406: int64
              8444: int64
              275079: int64
              4306: int64
              84637: int64
              92348: int64
              285865: int64
              8360: int64
              115611: int64
              115949: int64
              4719: int64
              631: int64
              85261: int64
              83266: int64
              71999: int64
              6902: int64
              146305: int64
              27344: int64
              251520: int64
              253830: int64
              52462: int64
              2987: int64
              56152: int64
              5018: int64
              26093: int64
              81132: int64
              to
              {'text': Value('string')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1347, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 980, in convert_to_parquet
                  builder.download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 884, in download_and_prepare
                  self._download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 947, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1739, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1892, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 41316 new columns ({'279710', '9014', '105653', '4985', '171023', '121061', '273371', '3718', '32170', '111931', '161121', '6388', '79910', '6946', '173813', '8903', '6470', '235117', '162846', '265616', '289069', '143315', '195725', '66813', '144438', '85362', '168080', '165067', '157266', '5759', '26180', '5835', '120458', '32892', '131550', '160852', '72018', '3877', '159375', '5225', '25924', '41226', '31973', '48970', '26128', '168984', '6237', '120272', '120633', '195209', '130292', '215343', '27869', '107614', '195317', '69542', '199698', '195907', '5180', '128562', '50594', '185869', '46367', '60896', '5150', '243402', '3095', '231819', '205857', '999', '41912', '206152', '4796', '58760', '39425', '155072', '104245', '32589', '80210', '183515', '112275', '3664', '160440', '1476', '3607', '158282', '465', '206869', '141154', '177341', '201360', '3920', '91450', '169770', '179361', '206305', '278448', '242882', '166591', '158510', '126018', '3901', '280238', '1704', '6272', '270026', '148438', '177727', '162374', '91692', '8875', '148178', '168740', '271106', '7943', '195093', '5771', '7833', '166964', '140166', '105130', '26812', '188571', '134817', '196255', '69275', '68517', '259077', '540', '214364', '80405', '27431', '171799', '191387', '80806', '31991', '138804', '41212', '78620', '6131', '201743', '72360', '226864', '32126', '141110', '33318', '102432', '321', '99970', '52189', '284965', '100017', '134427', '72980', '175267', '153438', '88055', '204200', '1603', '188373', '54758', 
              ...
              ', '144668', '1058', '164659', '186863', '114492', '192237', '95746', '269', '226114', '172461', '159786', '112083', '210543', '147611', '138318', '205527', '27879', '60737', '51921', '152664', '125181', '153404', '71865', '154400', '1405', '242900', '3376', '138462', '90057', '168654', '89623', '213277', '33124', '83619', '235107', '228881', '71168', '210569', '210089', '4202', '196639', '31162', '8978', '6268', '130170', '6234', '183819', '168096', '173313', '174045', '131816', '6343', '46258', '172487', '2950', '205687', '132753', '127156', '278178', '161930', '213764', '150900', '289095', '132484', '282649', '6370', '44124', '168622', '189183', '187459', '122437', '153356', '168718', '279410', '5539', '56788', '2946', '112897', '7587', '165651', '7840', '141622', '98394', '175945', '105444', '216127', '8592', '45100', '150262', '4019', '100032', '81853', '162088', '155966', '144322', '26056', '150334', '195665', '26280', '171157', '199227', '182947', '175135', '208170', '67354', '96411', '84506', '160656', '180021', '91681', '217186', '140435', '211958', '122789', '285827', '115943', '5567', '127050', '175669', '136483', '2141', '1533', '130540', '182777', '163731', '202503', '5371', '58047', '1724', '71482', '173329', '134855', '2329', '8201', '81027', '141718', '217953', '8914', '220724', '168502', '7477', '105628', '80797', '90426', '2422', '199844', '1386', '7767', '5028', '153933', '5247', '8130', '199902', '186541', '2277', '219693', '974', '1065', '8131', '171793'}) and 1 missing columns ({'text'}).
              
              This happened while the json dataset builder was generating data using
              
              hf://datasets/dmckinney-ml/movie-recommender-artifacts/movie_id_to_row.json (at revision ef31f53dbab182f3e3a69c137c91abf9f919e013), [/tmp/hf-datasets-cache/medium/datasets/37716749198995-config-parquet-and-info-dmckinney-ml-movie-recomm-7882290f/hub/datasets--dmckinney-ml--movie-recommender-artifacts/snapshots/ef31f53dbab182f3e3a69c137c91abf9f919e013/genres_vocab.json (origin=hf://datasets/dmckinney-ml/movie-recommender-artifacts@ef31f53dbab182f3e3a69c137c91abf9f919e013/genres_vocab.json), /tmp/hf-datasets-cache/medium/datasets/37716749198995-config-parquet-and-info-dmckinney-ml-movie-recomm-7882290f/hub/datasets--dmckinney-ml--movie-recommender-artifacts/snapshots/ef31f53dbab182f3e3a69c137c91abf9f919e013/movie_id_to_row.json (origin=hf://datasets/dmckinney-ml/movie-recommender-artifacts@ef31f53dbab182f3e3a69c137c91abf9f919e013/movie_id_to_row.json), /tmp/hf-datasets-cache/medium/datasets/37716749198995-config-parquet-and-info-dmckinney-ml-movie-recomm-7882290f/hub/datasets--dmckinney-ml--movie-recommender-artifacts/snapshots/ef31f53dbab182f3e3a69c137c91abf9f919e013/movie_id_to_row_cold.json (origin=hf://datasets/dmckinney-ml/movie-recommender-artifacts@ef31f53dbab182f3e3a69c137c91abf9f919e013/movie_id_to_row_cold.json), /tmp/hf-datasets-cache/medium/datasets/37716749198995-config-parquet-and-info-dmckinney-ml-movie-recomm-7882290f/hub/datasets--dmckinney-ml--movie-recommender-artifacts/snapshots/ef31f53dbab182f3e3a69c137c91abf9f919e013/xgb_ranker.json (origin=hf://datasets/dmckinney-ml/movie-recommender-artifacts@ef31f53dbab182f3e3a69c137c91abf9f919e013/xgb_ranker.json)]
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

text
string
Action
Adventure
Animation
Children
Comedy
Crime
Drama
Documentary
Fantasy
Film-Noir
Horror
IMAX
Musical
Mystery
Romance
Sci-Fi
Thriller
War
Western
null
null
null

🎬 Two-Tower + FAISS + XGBoost Recommender β€” Inference Artifacts

This dataset contains the serialized inference artifacts for the Two-Stage Movie Recommendation System built using TensorFlow Recommenders, FAISS, and XGBoost.

These artifacts support low-latency retrieval and ranking for the deployed Hugging Face Space:

πŸ”— Space: two-tower-faiss-xgb-recommender


πŸ“Œ Overview

The recommendation system follows a two-stage architecture:

Retrieval (Stage 1)

  • Two-tower neural embedding model (TensorFlow Recommenders)
  • Vector similarity search using FAISS (IndexFlatIP)
  • Cosine similarity implemented via inner-product normalization

Ranking (Stage 2)

  • XGBoost learning-to-rank model
  • Input features:
    • User embedding
    • Movie embedding
    • Genre one-hot features

Artifacts are structured for inference-only usage.


πŸ—‚οΈ Artifact Contents

File Description
faiss.index FAISS index containing 87K+ movie embeddings
xgb_ranker.json Trained XGBoost ranking model
two_tower/user_model/ Saved user embedding sub-model
two_tower/movie_model/ Saved movie embedding sub-model
two_tower/genre_model/ Saved genre projection model
two_tower/rating_model/ Saved rating prediction head
movie_id_to_row.json Mapping from MovieLens ID β†’ FAISS index row
movies.parquet Movie metadata (title + features)

πŸ“Š Training Data

Models were trained on the MovieLens 32M dataset:

  • 32 million ratings
  • ~87,585 movies
  • ~200,948 users

Preprocessing performed using:

  • Apache Beam (Cloud Dataflow)
  • BigQuery
  • Kubeflow Pipelines (Vertex AI)

🧠 Embedding Details

Property Value
Embedding dimensionality Tunable (selected via Hyperband)
Vector space Normalized for cosine similarity
FAISS index type IndexFlatIP
Total indexed items ~87K

πŸ“ˆ Ranking Model

Property Value
XGBoost objective rank:pairwise
Evaluation metric NDCG
Hyperparameter tuning Optuna (50 trials)
Validation strategy User-level cold-start split

πŸš€ Intended Usage

These artifacts are designed for:

  • βœ… Inference inside the Hugging Face Space
  • βœ… Reproducible local experimentation
  • βœ… Demonstration of production-style ML architecture

⚠️ Not intended for retraining without the full GCP pipeline.


πŸ› οΈ Loading Example

import faiss
import xgboost as xgb
import tensorflow as tf

# FAISS index
index = faiss.read_index("faiss.index")

# XGBoost ranker
booster = xgb.Booster()
booster.load_model("xgb_ranker.json")

# Two-tower sub-models
user_model = tf.keras.models.load_model("two_tower/user_model")
movie_model = tf.keras.models.load_model("two_tower/movie_model")

πŸ“„ License

Downloads last month
87

Space using dmckinney-ml/movie-recommender-artifacts 1