Imperative Deep Learning programming is a promising paradigm for creating reliable and efficient Deep Learning programs. However, it is challenging to write correct and efficient imperative Deep Learning programs in TensorFlow (v2), a popular Deep Learning framework. TensorFlow provides a high-level API (@tf.function
) that allows users to execute computational graphs using nature, imperative programming. However, writing efficient imperative TensorFlow programs requires careful consideration.
This tool consists of automated refactoring research prototype plug-ins for Eclipse PyDev that assists developers in writing optimal imperative Deep Learning code in a semantics-preserving fashion. Refactoring preconditions and transformations for automatically determining when it is safe and potentially advantageous to migrate an eager function to hybrid and improve upon already hybrid Python functions are included. The approach utilizes the WALA Ariadne static analysis framework that has been modernized to TensorFlow 2 and extended to work with modern Python constructs and whole projects. The tool also features a side-effect analysis that is used to determine if a Python function is safe to hybridize.
Coming soon!
Coming soon!
The refactoring can be run in two different ways:
- As a command.
- Select a project.
- Select "Hybridize function..." from the "Quick Access" dialog (CTRL-3).
- As a menu item.
- Right-click on a project.
- Under "Refactor," choose "Hybridize function..."
Currently, the refactoring works only via the package explorer and the outline views. You can either select a single project to optimize or select multiple projects. In each case, the tool will find functions in the enclosing projects to refactor.
Use the edu.cuny.hunter.hybridize.evaluator
plug-in project to run the evaluation. The evaluation process will produce several CSVs, as well as perform the transformation if desired (see below for details). The evaluator will output several CSV files with the results of the evaluation. For convenience, there is an Eclipse launch configuration that can be used to run the evaluation. The run configuration is named edu.cuny.hunter.hybridize.eval/Evaluate Hybridize Functions.launch
. In the run configuration dialog, you can specify several arguments to the evaluator as system properties.
You can run the evaluator in several different ways, including as a command or as a menu item, which is shown in the menu bar. Either way, you must evaluate entire projects, as the evaluator will collect project-level data. Information on configuring the evaluator can be found on this wiki page.
Coming soon!
Coming soon!
Coming soon!
For information on contributing, see CONTRIBUTING.md.