orhankislal commented on a change in pull request #14: Image loader python module, and demo notebook URL: https://github.com/apache/madlib-site/pull/14#discussion_r294948803
########## File path: community-artifacts/madlib_image_loader.py ########## @@ -0,0 +1,384 @@ +# +# Python module to load images into postgres or greenplum db, for +# use with madlib deep_learning module. +# +# The format of the image tables created will have at least 3 rows: +# (id SERIAL, x REAL[], y). Each row is 1 image, +# with image data represented by x (a 3D array of type "real"), and +# y (category) as text. id is just a unique identifier for each image, +# so they don't get mixed up during prediction. +# +# ImageLoader.ROWS_PER_FILE = 1000 by default; this is the number of rows per +# temporary file (or StringIO buffer) loaded at once. +# + +# User API is through ImageLoader and DbCredentials class constructors, +# and ImageLoader.load_np_array_to_table +# +# 1. Create objects: +# +# db_creds = DbCredentials(db_name='madlib', user=None, password='', host='localhost', port=5432) +# +# iloader = ImageLoader(db_creds, num_workers, table_name=None) Review comment: The table name is not in the constructor of this class. ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
