tf-encrypted / moose

Secure distributed dataflow framework for encrypted machine learning and data processing
Apache License 2.0
56 stars 15 forks source link

Add output tags in pymoose and all runtimes #1126

Closed jvmncs closed 2 years ago

jvmncs commented 2 years ago

Closes #1088

Adds a pm.output("tag", value) function and corresponding Expression, per the issue above. Also converts the existing OutputOperation to use the first argument as a tag attribute in Moose, which can be used to reconstruct/preserve order of outputs when running computations from Python.

When evaluating computations, all runtimes, executors, and sessions now return a dictionary outputs consisting of (tag, value) key-value pairs, where the tags default to output_0, output_1, etc. if not provided explicitly in Python.