hybridize-functions-refactoring
Refactorings for optimizing imperative TensorFlow clients for greater efficiency.
https://github.com/ponder-lab/hybridize-functions-refactoring
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: acm.org, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Keywords
Repository
Refactorings for optimizing imperative TensorFlow clients for greater efficiency.
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 56
- Releases: 1
Topics
Metadata Files
README.md
Hybridize-Functions-Refactoring
Introduction
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

Usage
The tool is designed to be used in the Eclipse IDE with the PyDev plug-in. Thus, the tool is designed to operate on Python files contained within PyDev projects, as that is where it obtains metadata from the projects such as PYTHONPATH. However, currently, the tool is only compatible only with our PyDev 9.3 development branch. That means that you will have to have our version of PyDev installed in your Eclipse instance before using this plug-in. Thus, if you have a version of PyDev previously installed, you will need to uninstall it before installing our tool. Integration with the standard PyDev version is being tracked by #152. Installation via our update site should install the necessary PyDev version automatically.
Once the plug-in and dependencies are installed, the refactoring can be run in two different ways:
- As a command.
- Select a Python code entity.
- Select "Hybridize function..." from the "Quick Access" dialog (CTRL-3).
- As a menu item.
- Right-click on a Python code entity.
- Under "Refactor," choose "Hybridize function..."
Currently, the refactoring works only via the package explorer and the outline views. You can either select a code entity to optimize or select multiple entities. In each case, the tool will find functions in the enclosing entity to refactor.
Update
Due to https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/370, only the "command" is working.
Installation
The tool has been tested on Eclipse IDE for RCP and RAP Developers Version: 2023-03 (4.27.0), Build id: 20230309-1520 under Java 17.
Update Site
An alpha version of our tool is available via an Eclipse update site at:
https://raw.githubusercontent.com/ponder-lab/Hybridize-Functions-Refactoring/main/edu.cuny.hunter.hybridize.updatesite
Please choose the latest version.
Eclipse Marketplace
Coming soon!
Dependencies
The refactoring has several dependencies as listed below. If you experience any trouble installing the plug-in using the above update site, you can manually install the dependencies. The latest version of the plug-ins should be installed:
Dependency | Update Site --- | --- Common Eclipse Refactoring Framework | https://raw.githubusercontent.com/ponder-lab/Common-Eclipse-Java-Refactoring-Framework/master/edu.cuny.citytech.refactoring.common.updatesite PyDev | https://raw.githubusercontent.com/ponder-lab/Pydev/pydev93/org.python.pydev.updatesite WALA | https://raw.githubusercontent.com/ponder-lab/WALA/v1.6/com.ibm.wala-repository
Contributing
For information on contributing, see CONTRIBUTING.md.
Further Information
See the wiki for further information.
Owner
- Name: PONDER
- Login: ponder-lab
- Kind: organization
- Email: ponder@hunter.cuny.edu
- Location: New York, NY
- Website: http://ponder-lab.github.io
- Repositories: 146
- Profile: https://github.com/ponder-lab
The PrOgramming laNguages anD software Engineering Research (PONDER) Lab at CUNY.
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Khatchadourian
given-names: Raffi
orcid: https://orcid.org/0000-0002-7930-0182
- family-names: Castro Vélez
given-names: Tatiana
orcid: https://orcid.org/0000-0002-6122-269X
title: "Hybridize Functions Refactoring"
version: v1.4.0
date-released: 2025-03-18
type: software
doi: 10.5281/zenodo.15045769
repository-code: "http://github.com/ponder-lab/Hybridize-Functions-Refactoring"
preferred-citation:
authors:
- family-names: Khatchadourian
given-names: Raffi
orcid: https://orcid.org/0000-0002-7930-0182
- family-names: Castro Vélez
given-names: Tatiana
orcid: https://orcid.org/0000-0002-6122-269X
- family-names: Bagherzadeh
given-names: Mehdi
orcid: https://orcid.org/0000-0003-1549-881X
- family-names: Jia
given-names: Nan
orcid: https://orcid.org/0000-0002-6122-269X
- family-names: Raja
given-names: Anita
orcid: https://orcid.org/0000-0002-0735-7358
title: "Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Learning Programs to Graph Execution"
abstract: "Efficiency is essential to support responsiveness w.r.t. ever-growing datasets, especially for Deep Learning (DL) systems. DL frameworks have traditionally embraced deferred execution-style DL code---supporting symbolic, graph-based Deep Neural Network (DNN) computation. While scalable, such development is error-prone, non-intuitive, and difficult to debug. Consequently, more natural, imperative DL frameworks encouraging eager execution have emerged but at the expense of run-time performance. Though hybrid approaches aim for the ``best of both worlds,'' using them effectively requires subtle considerations to make code amenable to safe, accurate, and efficient graph execution---avoiding performance bottlenecks and semantically inequivalent results. We discuss the engineering aspects of a refactoring tool that automatically determines when it is safe and potentially advantageous to migrate imperative DL code to graph execution and vice-versa."
type: conference-paper
date-released: 2025-05-01
doi: 10.1007/978-3-031-90900-9_5
keywords:
- "deep learning"
- "refactoring"
- "imperative programs"
- "graphs"
conference:
date-end: "2025-05-08"
name: "FASE 2025"
GitHub Events
Total
- Create event: 35
- Release event: 1
- Issues event: 5
- Delete event: 31
- Issue comment event: 30
- Push event: 123
- Gollum event: 1
- Pull request review event: 40
- Pull request event: 55
- Fork event: 1
Last Year
- Create event: 35
- Release event: 1
- Issues event: 5
- Delete event: 31
- Issue comment event: 30
- Push event: 123
- Gollum event: 1
- Pull request review event: 40
- Pull request event: 55
- Fork event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 2
- Total pull requests: 21
- Average time to close issues: N/A
- Average time to close pull requests: 29 days
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.38
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 18
Past Year
- Issues: 2
- Pull requests: 21
- Average time to close issues: N/A
- Average time to close pull requests: 29 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.38
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 18
Top Authors
Issue Authors
- khatchad (5)
Pull Request Authors
- dependabot[bot] (30)
- khatchad (4)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- dependabot/fetch-metadata v1.1.1 composite
- dependabot/fetch-metadata v1.1.1 composite
- actions/checkout v4 composite
- actions/setup-java v4 composite
- advanced-security/maven-dependency-submission-action 571e99aab1055c2e71a1e2309b9691de18d6b7d6 composite
- edu.cuny.hunter.hybridize:edu.cuny.hunter.hybridize.core 1.0.0-SNAPSHOT compile
- edu.cuny.hunter.hybridize:edu.cuny.hunter.hybridize.ui 1.0.0-SNAPSHOT compile
- edu.cuny.hunter.hybridize:edu.cuny.hunter.hybridize.tests 1.0.0-SNAPSHOT test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- numpy ==1.23.4 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- matplotlib ==3.8.2 test
- numpy ==1.23.4 test
- tensorflow ==2.9.3 test
- matplotlib ==3.8.2 test
- numpy ==1.23.4 test
- tensorflow ==2.9.3 test
- matplotlib ==3.8.2 test
- numpy ==1.23.4 test
- tensorflow ==2.9.3 test
- matplotlib ==3.8.2 test
- numpy ==1.23.4 test
- tensorflow ==2.9.3 test
- matplotlib ==3.8.2 test
- numpy ==1.23.4 test
- tensorflow ==2.9.3 test
- matplotlib ==3.8.2 test
- numpy ==1.23.4 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
- tensorflow ==2.9.3 test
