Skip to content

ponder-lab/Hybridize-Functions-Refactoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hybridize-Functions-Refactoring

Build Status Coverage Status GitHub license Java profiler

Introduction

Icon 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.

Screenshot

Coming soon!

Demonstration

Coming soon!

Usage

General Usage

The refactoring can be run in two different ways:

  1. As a command.
    1. Select a project.
    2. Select "Hybridize function..." from the "Quick Access" dialog (CTRL-3).
  2. As a menu item.
    1. Right-click on a project.
    2. 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.

Running the Evaluator

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.

Installation

Coming soon!

Update Site

Coming soon!

Eclipse Marketplace

Coming soon!

Contributing

For information on contributing, see CONTRIBUTING.md.

About

Refactorings for optimizing imperative TensorFlow clients for greater efficiency.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published