Skip to content

support human shape annotation in meta column info #137

Description

@yupbank
data = [Row(x=[float(x), float(2 * x)], key=str(x % 2)) for x in range(1, 6)]
df_analyzed = tfs.analyze(sqlContext.createDataFrame(data))
df = sqlContext.createDataFrame(data)

# this would work
grouped_df_analyzed = df_analyzed.groupby('key')

In [79]: with tf.Graph().as_default() as g:
    ...:     x = tf.placeholder(tf.double, [None, 2], name='x_input')
    ...:     y = tf.reduce_mean(x, 0, name='x')
    ...:     df_1 = tfs.aggregate(y, grouped_df_analyzed)

#while this would fail..

grouped_df  = df.groupby('key')

In [80]: with tf.Graph().as_default() as g:
    ...:     x = tf.placeholder(tf.double, [None, 2], name='x_input')
    ...:     y = tf.reduce_mean(x, 0, name='x')
    ...:     df_1 = tfs.aggregate(y, grouped_df)

# with reason

java.lang.Exception: The data column 'x' has shape [?,?], not compatible with shape [?,2] requested by the TF graph

which would be useful if there is a function the take human input into the meta data...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions