recbole.quick_start¶
- recbole.quick_start.quick_start.load_data_and_model(model_file, dataset_file=None, dataloader_file=None)[source]¶
Load filtered dataset, split dataloaders and saved model.
- Parameters
model_file (str) – The path of saved model file.
dataset_file (str, optional) – The path of filtered dataset. Defaults to
None
.dataloader_file (str, optional) – The path of split dataloaders. Defaults to
None
.
Note
The
dataset
will be loaded or created according to the following strategy: Ifdataset_file
is notNone
, thedataset
will be loaded fromdataset_file
. Ifdataset_file
isNone
anddataloader_file
isNone
, thedataset
will be created according toconfig
. Ifdataset_file
isNone
anddataloader_file
is notNone
, thedataset
will neither be loaded or created.The
dataloader
will be loaded or created according to the following strategy: Ifdataloader_file
is notNone
, thedataloader
will be loaded fromdataloader_file
. Ifdataloader_file
isNone
, thedataloader
will be created according toconfig
.- Returns
config (Config): An instance object of Config, which record parameter information in
model_file
.model (AbstractRecommender): The model load from
model_file
.dataset (Dataset): The filtered dataset.
train_data (AbstractDataLoader): The dataloader for training.
valid_data (AbstractDataLoader): The dataloader for validation.
test_data (AbstractDataLoader): The dataloader for testing.
- Return type
tuple
- recbole.quick_start.quick_start.objective_function(config_dict=None, config_file_list=None, saved=True)[source]¶
The default objective_function used in HyperTuning
- Parameters
config_dict (dict, optional) – Parameters dictionary used to modify experiment parameters. Defaults to
None
.config_file_list (list, optional) – Config files used to modify experiment parameters. Defaults to
None
.saved (bool, optional) – Whether to save the model. Defaults to
True
.
- recbole.quick_start.quick_start.run_recbole(model=None, dataset=None, config_file_list=None, config_dict=None, saved=True)[source]¶
A fast running api, which includes the complete process of training and testing a model on a specified dataset
- Parameters
model (str, optional) – Model name. Defaults to
None
.dataset (str, optional) – Dataset name. Defaults to
None
.config_file_list (list, optional) – Config files used to modify experiment parameters. Defaults to
None
.config_dict (dict, optional) – Parameters dictionary used to modify experiment parameters. Defaults to
None
.saved (bool, optional) – Whether to save the model. Defaults to
True
.