kaknikhil commented on issue #443: DL: Add training for multiple models URL: https://github.com/apache/madlib/pull/443#issuecomment-534320848 Some more comments from testing 1. If the input table does not exist, we get this error ``` ERROR: spiexceptions.UndefinedTable: relation "cifar10" does not exist LINE 2: FROM cifar10 ^ QUERY: SELECT gp_segment_id, sum(dependent_var_shape[1]) AS images_per_seg FROM cifar10 GROUP BY gp_segment_id CONTEXT: Traceback (most recent call last): PL/Python function "madlib_keras_fit_multiple_model", line 21, in <module> fit_obj = madlib_keras_fit_multiple_model.FitMultipleModel(**globals()) PL/Python function "madlib_keras_fit_multiple_model", line 42, in wrapper PL/Python function "madlib_keras_fit_multiple_model", line 87, in __init__ PL/Python function "madlib_keras_fit_multiple_model", line 146, in get_image_count_per_seg_for_minibatched_data_from_db PL/Python function "madlib_keras_fit_multiple_model" ``` We should instead error out with a meaningful error message just like in madlib_keras_fit. 2. If the input table is not minibatched, then it fails with ``` cifar10=# SELECT madlib.madlib_keras_fit_multiple_model('cifar10_train','cifar_multi_model','mst_table',6,0 ); ERROR: spiexceptions.UndefinedColumn: column "dependent_var_shape" does not exist LINE 1: SELECT gp_segment_id, sum(dependent_var_shape[1]) AS images... ^ QUERY: SELECT gp_segment_id, sum(dependent_var_shape[1]) AS images_per_seg FROM cifar10_train GROUP BY gp_segment_id CONTEXT: Traceback (most recent call last): PL/Python function "madlib_keras_fit_multiple_model", line 21, in <module> fit_obj = madlib_keras_fit_multiple_model.FitMultipleModel(**globals()) PL/Python function "madlib_keras_fit_multiple_model", line 42, in wrapper PL/Python function "madlib_keras_fit_multiple_model", line 87, in __init__ PL/Python function "madlib_keras_fit_multiple_model", line 146, in get_image_count_per_seg_for_minibatched_data_from_db PL/Python function "madlib_keras_fit_multiple_model" ``` We should error out the same way we do in madlib_keras_fit i.e. ` madlib_keras_fit error: Input table 'cifar10_train_summary' does not exist. Please ensure that the source table (cifar10_train) has been preprocessed by the image preprocessor.`
---------------------------------------------------------------- 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
