kaknikhil commented on a change in pull request #397:  DL: Update content of 
the model summary table
URL: https://github.com/apache/madlib/pull/397#discussion_r288223462
 
 

 ##########
 File path: src/ports/postgres/modules/deep_learning/madlib_keras.py_in
 ##########
 @@ -238,19 +223,22 @@ def fit(schema_madlib, source_table, 
model,model_arch_table,
     independent_varname_in_source_table = 
src_summary_dict['independent_varname_in_source_table']
     # Define some constants to be inserted into the summary table.
     model_type = "madlib_keras"
-    model_size = sys.getsizeof(model)
+    compile_params_dict = convert_string_of_args_to_dict(compile_params)
+    metrics_list = get_metrics_from_compile_param(compile_params)
+    is_metrics_specified = True if metrics_list else False
+    metrics_type = 'ARRAY{0}'.format(metrics_list) if is_metrics_specified 
else 'NULL'
     metrics_iters = metrics_iters if metrics_iters else 'NULL'
     # We always compute the training loss and metrics, at least once.
-    training_metrics_final = training_metrics[-1]
     training_loss_final = training_loss[-1]
-    training_metrics = training_metrics if training_metrics else 'NULL'
-    training_loss = training_loss if training_loss else 'NULL'
+    training_loss = 'ARRAY{0}'.format(training_loss) if training_loss else 
'NULL'
 
 Review comment:
   can't we  avoid this if check if we use plpy prepare for training_loss and 
others ?

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