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

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

    [ https://issues.apache.org/jira/browse/MADLIB-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16854971#comment-16854971 ] 

Ekta Khanna commented on MADLIB-1309:
-------------------------------------

Merged as part of the following PRs: 

[https://github.com/apache/madlib/pull/359]
[https://github.com/apache/madlib/pull/372
] [https://github.com/apache/madlib/pull/380]

> 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
>            Priority: Major
>             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)