TabularPredictor.clone¶
- TabularPredictor.clone(path: str, *, return_clone: bool = False, dirs_exist_ok: bool = False) str | 'TabularPredictor'[source]¶
将预测器及其所有工件克隆到本地磁盘上的新位置。 这对于在执行更高级操作(如fit_extra和refit_full)之前保存预测器快照的理想用例非常有用。
- Parameters:
path (str) – Directory path the cloned predictor will be saved to.
return_clone (bool, default = False) – If True, returns the loaded cloned TabularPredictor object. If False, returns the local path to the cloned TabularPredictor object.
dirs_exist_ok (bool, default = False) – 如果为True,即使路径目录已经存在,也会克隆预测器,可能会覆盖不相关的文件。 如果为False,当路径目录已经存在时,将引发异常并避免执行复制。
- Returns:
If return_clone == True, returns the loaded cloned TabularPredictor object.
If return_clone == False, returns the local path to the cloned TabularPredictor object.