@@ -877,6 +877,15 @@ def get_trained_model_details(self, id):
877877 else :
878878 return DSSTrainedPredictionModelDetails (ret , snippet , mltask = self , mltask_model_id = id )
879879
880+ def delete_model (self , model_id ):
881+ """
882+ Deletes a trained model
883+
884+ :param str model_id: Model identifier, as returend by :meth:`get_trained_models_ids`
885+ """
886+ self .client ._perform_empty (
887+ "DELETE" , "/projects/%s/models/lab/%s/%s/models/%s" % (self .project_key , self .analysis_id , self .mltask_id , model_id ))
888+
880889 def deploy_to_flow (self , model_id , model_name , train_dataset , test_dataset = None , redo_optimization = True ):
881890 """
882891 Deploys a trained model from this ML Task to a saved model + train recipe in the Flow.
@@ -921,3 +930,30 @@ def redeploy_to_flow(self, model_id, recipe_name=None, saved_model_id=None, acti
921930 "POST" , "/projects/%s/models/lab/%s/%s/models/%s/actions/redeployToFlow" % (self .project_key , self .analysis_id , self .mltask_id , model_id ),
922931 body = obj )
923932
933+
934+ def remove_all_splits (self ):
935+ """
936+ Deletes all stored splits data that are not anymore in use for this ML Task.
937+
938+ It is generally not needed to call this method
939+ """
940+ self .client ._perform_empty (
941+ "POST" , "/projects/%s/models/lab/%s/%s/actions/removeUnusedSplits" % (self .project_key , self .analysis_id , self .mltask_id ))
942+
943+
944+
945+ def remove_all_splits (self ):
946+ """
947+ Deletes all stored splits data for this ML Task. This operation saves disk space.
948+
949+ After performing this operation, it will not be possible anymore to:
950+ * Ensemble already trained models
951+ * View the "predicted data" or "charts" for already trained models
952+ * Resume training of models for which optimization had been previously interrupted
953+
954+ Training new models remains possible
955+
956+ """
957+ self .client ._perform_empty (
958+ "POST" , "/projects/%s/models/lab/%s/%s/actions/removeAllSplits" % (self .project_key , self .analysis_id , self .mltask_id ))
959+
0 commit comments