njayaram2 commented on a change in pull request #430: Add generate mst table 
utility.
URL: https://github.com/apache/madlib/pull/430#discussion_r312180243
 
 

 ##########
 File path: 
src/ports/postgres/modules/deep_learning/madlib_keras_validator.py_in
 ##########
 @@ -309,3 +311,72 @@ class FitInputValidator:
                 self.validation_table, self.independent_varname,
                 input_shape, 2)
 
+
+
+class GenerateMstInputValidator():
+    def __init__(self,
+                 model_selection_table,
+                 model_arch_table,
+                 model_arch_id_list,
+                 compile_params_list,
+                 fit_params_list
+                 ):
+        self.model_arch_table = model_arch_table
+        self.model_selection_table = model_selection_table
+        self.model_arch_id_list = model_arch_id_list
+        self.compile_params_list = compile_params_list
+        self.fit_params_list = fit_params_list
+        self.module_name = 'madlib_keras_generate_mst_table'
+        self._validate_input_args()
+
+    def _validate_input_args(self):
+        self._valid_input_output_tables()
+        self._valid_model_arch_ids()
+        self._valid_compile_and_fit_params()
+
+    def _valid_model_arch_ids(self):
+        model_arch_id_str = \
+            '(' + \
+            ','.join([str(x) for x in self.model_arch_id_list]) + \
+            ')'
 
 Review comment:
   You can re-write this as the following for better readability:
   ```
    model_arch_id_str = '({0})'.format(','.join([str(x) for x in 
self.model_arch_id_list]))
   ```

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