reductionista commented on a change in pull request #424: DL: Add function for 
predict bring your own model
URL: https://github.com/apache/madlib/pull/424#discussion_r309866119
 
 

 ##########
 File path: src/ports/postgres/modules/deep_learning/madlib_keras_predict.py_in
 ##########
 @@ -216,9 +323,77 @@ estimated_COL_NAME: (For pred_type='response') The 
estimated class for
 prob_CLASS:         (For pred_type='prob' for classification) The
                     probability of a given class. There will be one
                     column for each class in the training data.
+                    TODO change this
 """
     else:
         help_string = "No such option. Use 
{schema_madlib}.madlib_keras_predict()"
 
     return help_string.format(schema_madlib=schema_madlib)
+
+def predict_byom_help(schema_madlib, message, **kwargs):
+    """
+    Help function for keras predict
+
+    Args:
+        @param schema_madlib
+        @param message: string, Help message string
+        @param kwargs
+
+    Returns:
+        String. Help/usage information
+    """
+    if not message:
+        help_string = """
+-----------------------------------------------------------------------
+                            SUMMARY
+-----------------------------------------------------------------------
+This function allows the user to predict using a madlib_keras_fit trained
+model.
+
+For more details on function usage:
+    SELECT {schema_madlib}.madlib_keras_predict_byom('usage')
+            """
+    elif message in ['usage', 'help', '?']:
+        help_string = """
+-----------------------------------------------------------------------
+                            USAGE
+-----------------------------------------------------------------------
+ SELECT {schema_madlib}.madlib_keras_predict_byom(
+    model_arch_table,    -- TODO
+    model_arch_id,    -- TODO
+    test_table,     --  Name of the table containing the evaluation dataset
+    id_col,         --  Name of the id column in the test data table
+    independent_varname,    --  Name of the column with independent
+                                variables in the test table
+    output_table,   --  Name of the output table
+    pred_type,      --  The type of the desired output
+    gpus_per_host,   --  Number of GPUs per segment host to
+                        be used for training
+    class_values,     -- TODO
+    normalizing_const -- TODO
+    )
 
 Review comment:
   Lots of `TODO`'s here that still need to be filled in.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to