Advitya17 edited a comment on pull request #513:
URL: https://github.com/apache/madlib/pull/513#issuecomment-688997702


   > @Advitya17 What is the syntax error here please?
   > 
   > ```
   > SELECT madlib.madlib_keras_automl('cifar10_train_packed', 
   >                            'automl_cifar10_output', 
   >                            'model_arch_library', 
   >                            'automl_cifar_10_mst_table',
   >                            ARRAY[1], 
   >                            $${'loss': ['categorical_crossentropy'], 
   >                               'optimizer_params_list': [
   >                                   {'optimizer': ['Adam'],'lr': [0.001, 
0.0001, 'log']}
   >                                   {'optimizer': ['Adam'],'lr': [0.001, 
0.0001, 'log']}],
   >                              'metrics':['accuracy']}$$, 
   >                            $${'batch_size': [64, 128], 'epochs': [1]}$$,
   >                            'hyperband', 
   >                            'R=9, eta=3, skip_last=2');
   > ```
   > 
   > ```
   > InternalError: (psycopg2.errors.InternalError_) SyntaxError: invalid 
syntax (<unknown>, line 1) (plpython.c:5038)
   > CONTEXT:  Traceback (most recent call last):
   >   PL/Python function "madlib_keras_automl", line 21, in <module>
   >     schedule_loader = madlib_keras_automl.KerasAutoML(**globals())
   >   PL/Python function "madlib_keras_automl", line 42, in wrapper
   >   PL/Python function "madlib_keras_automl", line 215, in __init__
   >   PL/Python function "madlib_keras_automl", line 308, in 
find_hyperband_config
   >   PL/Python function "madlib_keras_automl", line 42, in wrapper
   >   PL/Python function "madlib_keras_automl", line 283, in __init__
   >   PL/Python function "madlib_keras_automl", line 48, in literal_eval
   >   PL/Python function "madlib_keras_automl", line 36, in parse
   > PL/Python function "madlib_keras_automl"
   > 
   > [SQL: SELECT madlib.madlib_keras_automl('cifar10_train_packed', 
   >                            'automl_cifar10_output', 
   >                            'model_arch_library', 
   >                            'automl_cifar_10_mst_table',
   >                            ARRAY[1], 
   >                            $${'loss': ['categorical_crossentropy'], 
   >                               'optimizer_params_list': [
   >                                   {'optimizer': ['Adam'],'lr': [0.001, 
0.0001, 'log']}
   >                                   {'optimizer': ['Adam'],'lr': [0.001, 
0.0001, 'log']}],
   >                              'metrics':['accuracy']}$$, 
   >                            $${'batch_size': [64, 128], 'epochs': [1]}$$,
   >                            'hyperband', 
   >                            'R=9, eta=3, skip_last=2');]
   > (Background on this error at: http://sqlalche.me/e/2j85)
   > ```
   
   - There needs to be a comma between the dictionaries specified inside 
optimizer_params_list
   - All the params (except optimizer) in the optimizer_params_list should be 
of the format [lower_bound, upper_bound, distribution_type] and you should 
specify `[0.0001, 0.001, 'log']` instead of `[0.001, 0.0001, 'log']`.
   
   Thanks for the question though. When I tried it with the right syntax and 
got the assertion error related to the format of specifying distribution with 
`[0.0001, 0.001, 'log']`, I saw the error message I threw wasn't completely 
intuitive, so I can modify its language a bit. 


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