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 toNone
.- 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:
- 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 toNone
. saved (bool, optional): Whether to save the model. Defaults toTrue
.
- 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 toNone
. config_file_list (list, optional): Config files used to modify experiment parameters. Defaults toNone
. config_dict (dict, optional): Parameters dictionary used to modify experiment parameters. Defaults toNone
. saved (bool, optional): Whether to save the model. Defaults toTrue
.
- deepcarskit.quick_start.quick_start.update_best_log(config, newlog, best_valid_result)¶