ponder-lab / Hybridize-Functions-Refactoring

Refactorings for optimizing imperative TensorFlow clients for greater efficiency.
Eclipse Public License 2.0
0 stars 0 forks source link

Parse positional arguments to tf.function #108

Open khatchad opened 1 year ago

khatchad commented 1 year ago

If so, we need to parse the positional arguments as well.

Related to #30.

khatchad commented 1 year ago

From https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/function:

tf.function(
    func=None,
    input_signature=None,
    autograph=True,
    jit_compile=None,
    reduce_retracing=False,
    experimental_implements=None,
    experimental_autograph_options=None,
    experimental_relax_shapes=None,
    experimental_compile=None,
    experimental_follow_type_hints=None
) -> [tf.types.experimental.GenericFunction](https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/types/experimental/GenericFunction)
khatchad commented 1 year ago

Need 10 test cases.

khatchad commented 1 year ago

@tatianacv Use the positions of the arguments, not the count.

khatchad commented 1 year ago

Must find the definition of the tf.function signature we are using to lookup the number of order of parameters. Ensure that it matches what we are expecting (up to v2.9), otherwise, throw an exception.