orhankislal commented on a change in pull request #519:
URL: https://github.com/apache/madlib/pull/519#discussion_r498650951



##########
File path: 
src/ports/postgres/modules/deep_learning/madlib_keras_custom_function.py_in
##########
@@ -146,6 +146,43 @@ def update_builtin_metrics(builtin_metrics):
     builtin_metrics.append('ce')
     return builtin_metrics
 
+@MinWarning("error")
+def load_top_n_accuracy_function(schema_madlib, object_table, n, is_sparse, 
**kwargs):
+
+    object_table = quote_ident(object_table)
+    _assert(n > 0,
+        "{0}: For top n accuracy functions n has to be a positive 
integer.".format(module_name))
+    sparse_prefix = "sparse_" if is_sparse else ""
+
+    sql = """
+    CREATE OR REPLACE FUNCTION __madlib__{sparse_prefix}top_{n}_acc_pickled()

Review comment:
       Yes, this function is available only to the superusers. Calling the 
`load_custom_function` will be exclusive to the superusers as well.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to