You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@madlib.apache.org by "Nandish Jayaram (JIRA)" <ji...@apache.org> on 2019/03/20 17:37:00 UTC

[jira] [Created] (MADLIB-1309) Change the way we pass compile_params and fit_params to madlib_keras.fit and madlib_keras.predict

Nandish Jayaram created MADLIB-1309:
---------------------------------------

             Summary: Change the way we pass compile_params and fit_params to madlib_keras.fit and madlib_keras.predict
                 Key: MADLIB-1309
                 URL: https://issues.apache.org/jira/browse/MADLIB-1309
             Project: Apache MADlib
          Issue Type: Improvement
          Components: Deep Learning
            Reporter: Nandish Jayaram
             Fix For: v1.16


Based on the code in PR [https://github.com/apache/madlib/pull/355:]

Currently we have to pass in the compile_params and fit_params as follows
{code}
SELECT madlib.madlib_keras_fit(... , '''optimizer''=SGD(lr=0.01, decay=1e-6, nesterov=True), ''loss''=''categorical_crossentropy'', ''metrics''=[''accuracy'']'::text,
 ,'''batch_size''=2, ''epochs''=1, ''verbose''=0'::text ...)
{code}

Internally in the code we use a function called `convert_string_of_args_to_dict` which does some string parsing and then calls eval to create a dictionary. This is bug prone and unsafe. We should look into using the function `extract_keyvalue_params` (might have to change it. We can easily write a unit test for `extract_keyvalue_params`)

We should also think about how complicated compile_params can get and how can we generalize the code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)