diff --git a/pycloudmessenger/ffl/fflapi.py b/pycloudmessenger/ffl/fflapi.py index a63cd4e..41c5879 100644 --- a/pycloudmessenger/ffl/fflapi.py +++ b/pycloudmessenger/ffl/fflapi.py @@ -356,6 +356,24 @@ def user_assignments(self) -> list: message = self.catalog.msg_user_assignments() return self._invoke_service(message) + def model_delete(self, task_name: str, timeout: int = 0): + ''' + Requests a model deletion + Throws: An exception on failure + Returns: None + ''' + message = self.catalog.msg_model_delete(task_name) + return self._invoke_service(message, timeout) + + def model_lineage(self, task_name: str, timeout: int = 0) -> list: + ''' + Requests the model lineage for task 'task_name' + Throws: An exception on failure + Returns: list + ''' + message = self.catalog.msg_model_lineage(task_name) + return self._invoke_service(message, timeout) + def model_info(self, task_name: str) -> dict: """ Returns model info. @@ -795,6 +813,23 @@ def get_model(self, task_name: str) -> list: """ return self.messenger.model_info(task_name) + def model_lineage(self, task_name: str) -> list: + """ + Returns a list with model lineage + Throws: An exception on failure + :return: list of all the available models + :rtype: `list` + """ + return self.messenger.model_lineage(task_name) + + def delete_model(self, task_name: str): + """ + Deletes a model for given task + Throws: An exception on failure + :return: nothing + """ + return self.messenger.model_delete(task_name) + ########################################################################## diff --git a/pycloudmessenger/ffl/message_catalog.py b/pycloudmessenger/ffl/message_catalog.py index da8686d..757b211 100644 --- a/pycloudmessenger/ffl/message_catalog.py +++ b/pycloudmessenger/ffl/message_catalog.py @@ -155,3 +155,23 @@ def msg_model_info(self, task_name: str) -> dict: template, args = self._msg_template() args.append({'cmd': 'model_info', 'params': [task_name]}) return template + + def msg_model_delete(self, task_name: str): + ''' + Formats a message for requesting a model deletion for a task + Throws: An exception on failure + Returns: None + ''' + template, args = self._msg_template() + args.append({'cmd':'model_delete', 'params': [task_name]}) + return template + + def msg_model_lineage(self, task_name: str) -> dict: + ''' + Formats a message for requesting model lineage for a task + Throws: An exception on failure + Returns: dict with model lineage + ''' + template, args = self._msg_template() + args.append({'cmd':'model_lineage', 'params': [task_name]}) + return template diff --git a/setup.py b/setup.py index 0c1f628..3cf9403 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='pycloudmessenger', - version='0.7.0', + version='0.7.1', description='Package for interacting with messaging based cloud services from IBM Research Ireland', author='Mark Purcell', author_email='markpurcell@ie.ibm.com,mkpurcell@yahoo.com',