Checkpoint CLI Reference
The compresso-recsys-build-checkpoint command builds ZIP checkpoints for
the supported recommender-system datasets.
Basic usage:
compresso-recsys-build-checkpoint \
--dataset ml1m \
--checkpoint_path artifacts/ml1m/exp001.zip \
--annotation_source genres
Amazon Reviews 2023
Amazon checkpoints use compact rating-only interactions plus item metadata:
0core_rating_only_<category>
raw_meta_<category>
For temporal checkpoints, Amazon uses McAuley’s predefined timestamp split with history. This is the preferred split when avoiding future-to-past leakage matters:
0core_timestamp_w_his_<category>
The builder also constructs a canonical entity_text column from
configurable metadata fields, so downstream code can encode item descriptions
consistently.
Leave-Last-Out Checkpoint
leave_last_out is computed locally from timestamps. For every eligible
user, the latest interaction becomes the target and earlier interactions
become the source profile. This respects time within each user, but it is not
globally future-blind because other users may contribute later interactions to
training.
compresso-recsys-build-checkpoint \
--dataset amazon2023 \
--amazon_category Toys_and_Games \
--checkpoint_path artifacts/amazon_toys/leave_last_out_exp001.zip \
--split_mode leave_last_out \
--metadata_text_fields title,features,description,categories \
--min_entity_text_words 30 \
--min_user_support 20 \
--item_min_support 20 \
--min_value_to_keep 4.0 \
--set_all_values_to 1.0 \
--min_source_items 1 \
--min_target_items 1 \
--annotation_source none
Temporal Checkpoint
temporal uses the Amazon Reviews 2023 predefined timestamp split when
--dataset amazon2023 is selected. Targets are kept cold with respect to the
Amazon training split, so this checkpoint is intended for metadata/SBERT-style
cold-item evaluation.
compresso-recsys-build-checkpoint \
--dataset amazon2023 \
--amazon_category Toys_and_Games \
--checkpoint_path artifacts/amazon_toys/temporal_exp001.zip \
--split_mode temporal \
--metadata_text_fields title,features,description,categories \
--min_entity_text_words 30 \
--min_user_support 20 \
--item_min_support 20 \
--min_value_to_keep 4.0 \
--set_all_values_to 1.0 \
--min_source_items 1 \
--min_target_items 1 \
--annotation_source none
Checkpoint evaluation commonly reports this six-metric table:
recall@20, ndcg@20, recall@50, ndcg@50, recall@100, ndcg@100
Checkpoint Split Schema
Every checkpoint stores source/target matrices for train, validation, and test:
data/train_source_matrix.npz
data/train_target_matrix.npz
data/val_source_matrix.npz
data/val_target_matrix.npz
data/test_source_matrix.npz
data/test_target_matrix.npz
source is the profile/input side and target is what retrieval metrics
try to recover. The older data/train_matrix.npz file is still written as an
alias for train_source_matrix.npz.
Depending on the split mode, the checkpoint also stores partition ids:
user_splitStores
train_user_ids.npy,val_user_ids.npy, andtest_user_ids.npy. It does not store explicit item partitions; loaders treat all items as train items.item_splitStores
train_item_indices.npy,val_item_indices.npy, andtest_item_indices.npy.leave_last_outStores source/target matrices built from per-user latest interactions. It is chronological per user, but not globally future-blind.
temporalStores source/target matrices from a global timestamp split. For Amazon Reviews 2023, this uses McAuley’s predefined temporal split.
Validation/test source-target rows also have aligned val_eval_user_ids.npy
and test_eval_user_ids.npy when user identifiers are available.
Builder Parameters
--min_source_items 1 and --min_target_items 1 mean:
Keep an evaluation user only if they have at least 1 source item and at least 1 target item.
For cold-item splits:
source items = warm/train items used as the user profile
target items = cold held-out items we want to recommend
If a user has only cold targets but no warm source items, the builder cannot construct a profile, and the user is dropped.
Full compresso-recsys-build-checkpoint parameter table:
Parameter |
Default |
Description |
|---|---|---|
|
required |
Dataset to build. Choices: |
|
|
Directory where raw/downloaded dataset files are stored. |
|
dataset-specific |
Output ZIP checkpoint path. If omitted, uses the dataset default. |
|
dataset-specific |
Random seed for user/item splitting and reproducibility. |
|
dataset-specific |
Number of validation users for |
|
dataset-specific |
Number of test users for |
|
dataset-specific |
Minimum number of interactions per user during iterative pruning. |
|
dataset-specific |
Minimum number of interactions per item during iterative pruning. |
|
dataset-specific |
Drop interactions below this value. Usually |
|
dataset-specific |
If set, binarize all remaining interaction values to this value. Usually
|
|
|
Evaluation fold protocol for |
|
|
Split protocol. Choices: |
|
|
Exact number of cold validation items for |
|
|
Exact number of cold test items for |
|
|
Fraction of items held out as cold validation items for |
|
|
Fraction of items held out as cold test items for |
|
|
For local temporal split, latest global fraction of interactions used as
target side. For Amazon |
|
|
Minimum number of source/profile items an eval user must have. For cold-item eval, these are train/warm items. |
|
|
Minimum number of target/held-out items an eval user must have. For cold-item eval, these are cold items. |
|
|
Amazon Reviews 2023 category. Supports official names and aliases like
|
|
|
Metadata columns joined into canonical |
|
|
Drop items whose constructed |
|
|
For Amazon, include |
|
|
Optional tag source for clustering. Choices: |
|
|
Minimum count threshold for tag annotations when using user-generated tags. |
Dataset-specific defaults:
Dataset |
|
|
|
|
|
|
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All datasets currently default to:
Parameter |
Default |
|---|---|
|
|
|
|
Supported Amazon Reviews 2023 Datasets
Official Amazon 2023 category |
Alias in |
Supported? |
|---|---|---|
|
|
yes |
|
none |
yes, pass official name |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
|
yes |
|
none |
yes |
|
|
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
none |
yes |
|
|
yes |
|
none |
yes |