def make_output(output_object: Any) -> str: if utils.is_mb_sdk_resource_noun_type(type(output_object)): return output_object.resource_name # TODO: handle more default cases # right now this is required for export data because proto Repeated # this should be expanded to handle multiple different types # or possibly export data should return a Dataset return json.dumps(list(output_object))
def test_is_mb_sdk_resource_noun_type_with_resource_noun_type(self): mb_sdk_type = aiplatform.Model results = utils.is_mb_sdk_resource_noun_type(mb_sdk_type) self.assertTrue(results)