deepcarskit.quick_start

deepcarskit.quick_start

deepcarskit.quick_start.quick_start.eval_folds(args_tuple)
deepcarskit.quick_start.quick_start.load_data_and_model(model_file, dataset_file=None, dataloader_file=None)

Load filtered dataset, split dataloaders and saved model.

Args:

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:
tuple:
  • 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.

deepcarskit.quick_start.quick_start.objective_function(config_dict=None, config_file_list=None, saved=True)

The default objective_function used in HyperTuning

Args:

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.

deepcarskit.quick_start.quick_start.run(model=None, dataset=None, config_file_list=None, config_dict=None, saved=True)

A fast running api, which includes the complete process of training and testing a model on a specified dataset

Args:

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.

deepcarskit.quick_start.quick_start.update_best_log(config, newlog, best_valid_result)