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: If dataset_file is not None, the dataset will be loaded from dataset_file. If dataset_file is None and dataloader_file is None, the dataset will be created according to config. If dataset_file is None and dataloader_file is not None, the dataset will neither be loaded or created.

The dataloader will be loaded or created according to the following strategy: If dataloader_file is not None, the dataloader will be loaded from dataloader_file. If dataloader_file is None, the dataloader will be created according to config.

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.