You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by GitBox <gi...@apache.org> on 2019/04/30 19:14:28 UTC

[GitHub] [madlib] kaknikhil commented on a change in pull request #380: DL: Add negative unit tests for unsupported compile and fit params

kaknikhil commented on a change in pull request #380: DL: Add negative unit tests for unsupported compile and fit params
URL: https://github.com/apache/madlib/pull/380#discussion_r279891871
 
 

 ##########
 File path: src/ports/postgres/modules/deep_learning/test/unit_tests/test_madlib_keras.py_in
 ##########
 @@ -443,6 +443,79 @@ class MadlibKerasFitTestCase(unittest.TestCase):
                             accepted_fit_params)
         self.assertDictEqual(result_params, target_dict)
 
+    def test_parse_and_validate_compile_params_invalid_metrics(self):
+        test_str = "optimizer=SGD(lr=0.01, decay=1e-6, nesterov=True), loss='categorical_crossentropy', metrics={'0':'accuracy'}"
+
+        with self.assertRaises(plpy.PLPYException):
+            opt_name,opt_args,result_params = self.subject.parse_and_validate_compile_params(test_str)
 
 Review comment:
   We don't need to create variables for the return values. Just calling the function is good enough.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services