@@ -1672,6 +1672,15 @@ def get_trained_model_details(self, id):
16721672 else :
16731673 return DSSTrainedPredictionModelDetails (ret , snippet , mltask = self , mltask_model_id = id )
16741674
1675+ def delete_trained_model (self , model_id ):
1676+ """
1677+ Deletes a trained model
1678+
1679+ :param str model_id: Model identifier, as returend by :meth:`get_trained_models_ids`
1680+ """
1681+ self .client ._perform_empty (
1682+ "DELETE" , "/projects/%s/models/lab/%s/%s/models/%s" % (self .project_key , self .analysis_id , self .mltask_id , model_id ))
1683+
16751684 def deploy_to_flow (self , model_id , model_name , train_dataset , test_dataset = None , redo_optimization = True ):
16761685 """
16771686 Deploys a trained model from this ML Task to a saved model + train recipe in the Flow.
@@ -1716,6 +1725,29 @@ def redeploy_to_flow(self, model_id, recipe_name=None, saved_model_id=None, acti
17161725 "POST" , "/projects/%s/models/lab/%s/%s/models/%s/actions/redeployToFlow" % (self .project_key , self .analysis_id , self .mltask_id , model_id ),
17171726 body = obj )
17181727
1728+ def remove_unused_splits (self ):
1729+ """
1730+ Deletes all stored splits data that are not anymore in use for this ML Task.
1731+
1732+ It is generally not needed to call this method
1733+ """
1734+ self .client ._perform_empty (
1735+ "POST" , "/projects/%s/models/lab/%s/%s/actions/removeUnusedSplits" % (self .project_key , self .analysis_id , self .mltask_id ))
1736+
1737+ def remove_all_splits (self ):
1738+ """
1739+ Deletes all stored splits data for this ML Task. This operation saves disk space.
1740+
1741+ After performing this operation, it will not be possible anymore to:
1742+ * Ensemble already trained models
1743+ * View the "predicted data" or "charts" for already trained models
1744+ * Resume training of models for which optimization had been previously interrupted
1745+
1746+ Training new models remains possible
1747+ """
1748+ self .client ._perform_empty (
1749+ "POST" , "/projects/%s/models/lab/%s/%s/actions/removeAllSplits" % (self .project_key , self .analysis_id , self .mltask_id ))
1750+
17191751 def guess (self , prediction_type = None , reguess_level = None ):
17201752 """
17211753 Guess the feature handling and the algorithms.
0 commit comments