Closed gabrielspmoreira closed 1 year ago
@gabrielspmoreira One think I think we can improve is the prediction step. I tested the script you shared with me for prediction but it retrains the model.. but is there a prediction script that user can feed the saved model path and then do the batch predict automatically without training again? It'd be better if we can provide an example code snippet how one can do the prediction.
@gabrielspmoreira One think I think we can improve is the prediction step. I tested the script you shared with me for prediction but it retrains the model.. but is there a prediction script that user can feed the saved model path and then do the batch predict automatically without training again? It'd be better if we can provide an example code snippet how one can do the prediction.
Indeed. Following your suggestion, I made it possible to save the trained model with --save_model_path
, then run the script again providing --load_model_path
, in this case not providing train_data_path
but just --predict_data_path
, so that the script loads the trained model and just perform the batch predict, saving them to --predict_output_path
Fixes #916 , fixes #986 , fixes #918, fixes #680, fixes #681, fixes #666
Goals :soccer:
This PR introduces a quick-start example for preprocessing, training, evaluating and deploying ranking models. It is composed by a set of scripts and markdown documents. We use in the example the TenRec dataset, but the scripts are generic and can be used with customer own data, provided that they have the right shape: positive and potentially negative user-item events with tabular features.
Implementation Details :construction:
preprocessing.py
- Generic script for preprocessing with CLI arguments for preprocessing a raw dataset (CSV or parquet) with NVTabular. It contains arguments to configure input path and format, categorical and continuous features, configuring the features tagging (user_id, item_id, ...), to filter interactions by using min/max frequency for users or items and dataset split.Example command line for TenRec dataset:
ranking_train_eval.py
- Generic script for training and evaluation of ranking models. It takes the preprocessed dataset frompreprocessing.py
and schema as input. You can set many different training and model hparams for train both single-task learning (MLP, DCN, DLRM, Wide&Deep, DeepFM) and multi-task learning specific models (e.g. MMOE, CGC, PLE).Testing Details :mag:
Tasks
Implementation
preprocessing.py
to provide additional dataset split strategies (e.g.random_by_user
,temporal
).preprocessing.py
to use Dask Distributed client for preprocessing larger/full dataset (single or multiple GPU)Experimentation
Documentation
You can check the Quick-start for ranking documentation starting from this main page