njayaram2 commented on a change in pull request #385: DL: Make metrics and loss
optional compile parameters
URL: https://github.com/apache/madlib/pull/385#discussion_r281314835
##########
File path:
src/ports/postgres/modules/deep_learning/test/unit_tests/test_madlib_keras.py_in
##########
@@ -423,13 +423,23 @@ class MadlibKerasFitTestCase(unittest.TestCase):
opt_name,opt_args,result_params =
self.subject.parse_and_validate_compile_params(test_str)
self.assertDictEqual(result_params, compile_dict)
+ test_str = "optimizer=SGD(lr=0.01, decay=1e-6, nesterov=True),
loss='categorical_crossentropy'"
+ compile_dict = {'optimizer':'SGD(lr=0.01, decay=1e-6, nesterov=True)',
'loss':'categorical_crossentropy'}
+ opt_name,opt_args,result_params =
self.subject.parse_and_validate_compile_params(test_str)
+ self.assertDictEqual(result_params, compile_dict)
+
Review comment:
Should we also add test cases when `loss` and/or `optimizer` are not
specified in `test_str` (tests that expect a plpy error)?
----------------------------------------------------------------
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