This is an automated email from the ASF dual-hosted git repository. okislal pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/madlib.git
The following commit(s) were added to refs/heads/master by this push: new 35e959d DL: Remove quote_ident to allow tables on schemas 35e959d is described below commit 35e959d28984047304eb8470263a886f7ff0a313 Author: Orhan Kislal <okis...@apache.org> AuthorDate: Fri Oct 25 10:29:26 2019 -0400 DL: Remove quote_ident to allow tables on schemas JIRA: MADLIB-1388 Closes #452 --- src/ports/postgres/modules/deep_learning/madlib_keras.py_in | 3 --- .../modules/deep_learning/madlib_keras_predict.py_in | 7 +++---- .../modules/deep_learning/test/madlib_keras_fit.sql_in | 12 ++++++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/ports/postgres/modules/deep_learning/madlib_keras.py_in b/src/ports/postgres/modules/deep_learning/madlib_keras.py_in index 96fd3fe..9713a2a 100644 --- a/src/ports/postgres/modules/deep_learning/madlib_keras.py_in +++ b/src/ports/postgres/modules/deep_learning/madlib_keras.py_in @@ -38,7 +38,6 @@ from utilities.utilities import is_platform_pg from utilities.utilities import get_segments_per_host from utilities.utilities import madlib_version from utilities.validate_args import get_expr_type -from utilities.validate_args import quote_ident from utilities.control import MinWarning import tensorflow as tf @@ -79,8 +78,6 @@ def fit(schema_madlib, source_table, model, model_arch_table, gpus_per_host=0, validation_table=None, metrics_compute_frequency=None, warm_start=False, name="", description="", **kwargs): - source_table = quote_ident(source_table) - model_arch_table = quote_ident(model_arch_table) fit_params = "" if not fit_params else fit_params _assert(compile_params, "Compile parameters cannot be empty or NULL.") diff --git a/src/ports/postgres/modules/deep_learning/madlib_keras_predict.py_in b/src/ports/postgres/modules/deep_learning/madlib_keras_predict.py_in index 4d94936..ff0a47b 100644 --- a/src/ports/postgres/modules/deep_learning/madlib_keras_predict.py_in +++ b/src/ports/postgres/modules/deep_learning/madlib_keras_predict.py_in @@ -36,7 +36,6 @@ from utilities.utilities import create_cols_from_array_sql_string from utilities.utilities import get_segments_per_host from utilities.utilities import unique_string from utilities.validate_args import input_tbl_valid -from utilities.validate_args import quote_ident from madlib_keras_wrapper import * @@ -214,7 +213,7 @@ class PredictBYOM(BasePredict): def validate_and_set_defaults(self): # Set some defaults first and then validate and then set some more defaults self.model_arch, self.model_weights = get_model_arch_weights( - quote_ident(self.model_arch_table), self.model_arch_id) + self.model_arch_table, self.model_arch_id) # Assert model_weights and model_arch are not empty. _assert(self.model_weights and self.model_arch, "{0}: Model weights and architecture should not be NULL.".format( @@ -391,14 +390,14 @@ For more details on function usage: pred_type, -- The type of the desired output gpus_per_host, -- Number of GPUs per segment host to be used for training - class_values, -- List of class labels that were used while training the + class_values, -- List of class labels that were used while training the model. If class_values is passed in as NULL, the output table will have a column named 'prob' which is an array of probabilities of all the classes. Otherwise if class_values is not NULL, then the output table will contain a column for each class/label from the training data - normalizing_const -- Normalizing constant used for standardizing arrays in + normalizing_const -- Normalizing constant used for standardizing arrays in independent_varname ) ); diff --git a/src/ports/postgres/modules/deep_learning/test/madlib_keras_fit.sql_in b/src/ports/postgres/modules/deep_learning/test/madlib_keras_fit.sql_in index 5daafb2..6a2ce6e 100644 --- a/src/ports/postgres/modules/deep_learning/test/madlib_keras_fit.sql_in +++ b/src/ports/postgres/modules/deep_learning/test/madlib_keras_fit.sql_in @@ -377,3 +377,15 @@ SELECT 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, 3); + +DROP TABLE IF EXISTS keras_saved_out, keras_saved_out_summary; +CREATE TABLE "special-char?" AS SELECT * FROM model_arch; +SELECT madlib_keras_fit( + 'cifar_10_sample_test_shape_batched', + 'keras_saved_out', + '"special-char?"', + 3, + $$ optimizer=SGD(lr=0.01, decay=1e-6, nesterov=True), loss='categorical_crossentropy', metrics=['accuracy']$$::text, + $$ batch_size=2, epochs=1, verbose=0 $$::text, + 3); +