fmcquillan99 edited a comment on pull request #511:
URL: https://github.com/apache/madlib/pull/511#issuecomment-679264964


   re-testing
   
   (3)
   adding `loss_type` to info table:
   ```
   madlib=# \d iris_multi_model_info
              Table "public.iris_multi_model_info"
             Column          |        Type        | Modifiers 
   --------------------------+--------------------+-----------
    mst_key                  | integer            | not null
    model_id                 | integer            | 
    compile_params           | text               | 
    fit_params               | text               | 
    model_type               | text               | 
    model_size               | double precision   | 
    metrics_elapsed_time     | double precision[] | 
    metrics_type             | text[]             | 
    loss_type                | text               | 
    training_metrics_final   | double precision   | 
    training_loss_final      | double precision   | 
    training_metrics         | double precision[] | 
    training_loss            | double precision[] | 
    validation_metrics_final | double precision   | 
    validation_loss_final    | double precision   | 
    validation_metrics       | double precision[] | 
    validation_loss          | double precision[] | 
   ```
   OK
   
   (4)
   ```DROP TABLE IF EXISTS iris_model_cl, iris_model_cl_summary;
   
   SELECT madlib.madlib_keras_fit('iris_train_packed',   -- source table
                                  'iris_model_cl',          -- model output 
table
                                  'model_arch_library',  -- model arch table
                                   1,                    -- model arch id
                                   $$ loss=rmse, optimizer='adam', 
metrics=['rmse'] $$,  -- compile_params
                                   $$ batch_size=5, epochs=3 $$,  -- fit_params
                                   3,                    -- num_iteration
                                  NULL, -- use_gpus,
                                  NULL, -- validation_table,
                                  NULL, -- metrics_compute_frequency,
                                  NULL, -- warm_start,
                                  NULL, -- name
                                  NULL, -- description
                                  'test_custom_function_table' -- object table
                                 );
   ```
   produces
   ```
   INFO:  
        Time for training in iteration 1: 2.89410400391 sec
   CONTEXT:  PL/Python function "madlib_keras_fit"
   INFO:  
        Time for training in iteration 2: 0.0521700382233 sec
   CONTEXT:  PL/Python function "madlib_keras_fit"
   INFO:  
        Time for training in iteration 3: 0.0579919815063 sec
   DETAIL:  
        Time for evaluating training dataset in iteration 3: 0.225339174271 sec
        Training set metric after iteration 3: 0.375931799412
        Training set loss after iteration 3: 0.375931799412
   CONTEXT:  PL/Python function "madlib_keras_fit"
   -[ RECORD 1 ]----+-
   madlib_keras_fit | 
   
   Time: 6035.621 ms
   ```
   OK
   
   (5)
   ```
   $$ loss=rmse, optimizer='adam', metrics=['squared_error'] $$,  -- 
compile_params
   $$ loss='rmse', optimizer='adam', metrics=['squared_error'] $$,  -- 
compile_params
   ```
   both work
   ```
   $$ loss=rmse, optimizer='adam', metrics=[squared_error] $$,  -- 
compile_params
   ```
   does not but that is fine.  Would required too many changes to parsers.
   OK
   
   so overall LGTM


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to