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:
[email protected]


With regards,
Apache Git Services

Reply via email to