recbole.quick_start

recbole.quick_start.quick_start.load_data_and_model(model_file)[source]

Load filtered dataset, split dataloaders and saved model.

Parameters

model_file (str) – The path of saved model file.

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(model, dataset, config_file_list=None, config_dict=None, saved=True, nproc=1, world_size=- 1, ip='localhost', port='5678', group_offset=0)[source]
recbole.quick_start.quick_start.run_recbole(model=None, dataset=None, config_file_list=None, config_dict=None, saved=True, queue=None)[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.

  • queue (torch.multiprocessing.Queue, optional) – The queue used to pass the result to the main process. Defaults to None.

recbole.quick_start.quick_start.run_recboles(rank, *args)[source]