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/05/20 21:50:31 UTC

[GitHub] [madlib] jingyimei commented on a change in pull request #393: DL: Add support for reporting various metrics in fit/evaluate

jingyimei commented on a change in pull request #393: DL: Add support for reporting various metrics in fit/evaluate
URL: https://github.com/apache/madlib/pull/393#discussion_r285781505
 
 

 ##########
 File path: src/ports/postgres/modules/deep_learning/madlib_keras.py_in
 ##########
 @@ -282,30 +270,30 @@ def fit(schema_madlib, source_table, model,model_arch_table,
             $MAD${dependent_varname_in_source_table}$MAD$::TEXT AS dependent_varname,
             $MAD${independent_varname_in_source_table}$MAD$::TEXT AS independent_varname,
             $MAD${model_arch_table}$MAD$::TEXT AS model_arch_table,
-            {model_arch_id} AS model_arch_id,
+            {model_arch_id}::INTEGER AS model_arch_id,
             $1 AS compile_params,
             $2 AS fit_params,
-            {num_iterations} AS num_iterations,
+            {num_iterations}::INTEGER AS num_iterations,
             {validation_table}::TEXT AS validation_table,
-            {metrics_compute_frequency} AS metrics_compute_frequency,
+            {metrics_compute_frequency}::INTEGER AS metrics_compute_frequency,
             $3 AS name,
             $4 AS description,
             '{model_type}'::TEXT AS model_type,
-            {model_size} AS model_size,
+            {model_size}::INTEGER AS model_size,
             '{start_training_time}'::TIMESTAMP AS start_training_time,
             '{end_training_time}'::TIMESTAMP AS end_training_time,
             $5 AS time_iter,
             '{version}'::TEXT AS madlib_version,
-            {num_classes} AS num_classes,
+            {num_classes}::INTEGER AS num_classes,
 
 Review comment:
   If we don't type cast, it will be an unknown type in those column, and postgres will give a warning, so that the whole create summary table sql will be printed out in the log.

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