[
https://issues.apache.org/jira/browse/MADLIB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16906707#comment-16906707
]
Frank McQuillan commented on MADLIB-1371:
-----------------------------------------
madlib=# SELECT madlib.madlib_keras_fit('iris_train_packed', -- source table
madlib(# 'iris_model', -- model output
table
madlib(# 'model_arch_library', -- model arch
table
madlib(# NULL, -- model arch
id
madlib(# $$ loss='categorical_crossentropy',
optimizer='adam', metrics=['accuracy'] $$, -- compile_params
madlib(# $$ batch_size=5, epochs=3 $$, --
fit_params
madlib(# 10 -- num_iterations
madlib(# );
ERROR: plpy.Error: madlib_keras_fit: Invalid model architecture ID.
(plpython.c:5038)
CONTEXT: Traceback (most recent call last):
PL/Python function "madlib_keras_fit", line 21, in <module>
madlib_keras.fit(**globals())
PL/Python function "madlib_keras_fit", line 42, in wrapper
PL/Python function "madlib_keras_fit", line 65, in fit
PL/Python function "madlib_keras_fit", line 232, in __init__
PL/Python function "madlib_keras_fit", line 256, in _validate_input_args
PL/Python function "madlib_keras_fit", line 134, in validate_model_arch_table
PL/Python function "madlib_keras_fit", line 96, in _assert
PL/Python function "madlib_keras_fit"
> DL: Exception during madlib_keras_fit when model_arch_id is passed as NULL
> --------------------------------------------------------------------------
>
> Key: MADLIB-1371
> URL: https://issues.apache.org/jira/browse/MADLIB-1371
> Project: Apache MADlib
> Issue Type: Bug
> Components: Deep Learning
> Reporter: Nikhil
> Priority: Major
> Fix For: v1.17
>
>
> While calling madlib_keras_fit, if we pass in the model arch id as NULL, we
> get the following exception
> {code}
> SELECT madlib_keras_fit(
> 'cifar_10_sample_batched',
> 'keras_saved_out',
> 'model_arch',
> NULL, --null model arch
> $$ optimizer=SGD(lr=0.01, decay=1e-6, nesterov=True),
> loss='categorical_crossentropy', metrics=['mae']$$::text,
> $$ batch_size=2, epochs=1, verbose=0 $$::text,
> 3,
> NULL);
> LINE 1: ...el_arch, model_weights FROM model_arch WHERE model_id = None
> ^
> QUERY: SELECT model_arch, model_weights FROM model_arch WHERE model_id = None
> CONTEXT: Traceback (most recent call last):
> PL/Python function "madlib_keras_fit", line 21, in <module>
> madlib_keras.fit(**globals())
> PL/Python function "madlib_keras_fit", line 42, in wrapper
> PL/Python function "madlib_keras_fit", line 95, in fit
> PL/Python function "madlib_keras_fit"
> {code}
>
> We should instead error out gracefully and print a more meaningful error
> message
>
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)