The document discusses challenges in migrating imperative deep learning programs to graph execution. It provides examples of TensorFlow imperative code that uses features like Python side effects and variables that do not directly translate to graph execution. Specifically, it shows how a model that uses a counter variable to increment another variable on each call would not work as expected, as the initial counter value is captured during tracing, resulting in the variable being incremented on each call rather than just the first one. This demonstrates common problems that can arise from migrating imperative code to graphs and result in unexpected numerical results or reduced performance.
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Raffi Khatchadourian
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 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. We present our ongoing work on automated refactoring that assists developers in specifying whether and how their otherwise eagerly-executed imperative DL code could be reliably and efficiently executed as graphs while preserving semantics. The approach, based on a novel imperative tensor analysis, will automatically determine when it is safe and potentially advantageous to migrate imperative DL code to graph execution and modify decorator parameters or eagerly executing code already running as graphs. The approach is being implemented as a PyDev Eclipse IDE plug-in and uses the WALA Ariadne analysis framework. We discuss our ongoing work towards optimizing imperative DL code to its full potential.
This fast-paced session starts with an introduction to neural networks and linear regression models, along with a quick view of TensorFlow, followed by some Scala APIs for TensorFlow. You'll also see a simple dockerized image of Scala and TensorFlow code and how to execute the code in that image from the command line. No prior knowledge of NNs, Keras, or TensorFlow is required (but you must be comfortable with Scala).
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, and then a quick dive into CNNs. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session. Then we'll see a short introduction to TensorFlow and TensorBoard.
Machine learning with Go. There are some libraries like gonum and gorgonia that allows you to do machine learning. You can also train your deep learning models with python and TensorFlow and use the TensorFlow libraries to read exported models. Go-ONNX is to come.
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, backpropagation, and then a quick dive into CNNs. Basic knowledge of vectors, matrices, and elementary calculus (derivatives), are helpful in order to derive the maximum benefit from this session.
Next we'll see a simple neural network using Keras, followed by an introduction to TensorFlow and TensorBoard. (Bonus points if you know Zorn's Lemma, the Well-Ordering Theorem, and the Axiom of Choice.)
Natural language processing open seminar For Tensorflow usagehyunyoung Lee
This is presentation for Natural Language Processing open seminar in Kookmin University.
The open seminar reference : https://cafe.naver.com/nlpk
My presentation about how to use tensorflow for NLP open seminar for newbies for tensorflow.
Automatic Task-based Code Generation for High Performance DSELJoel Falcou
Providing high level tools for parallel programming while sustaining a high level of performance has been a challenge that techniques like Domain Specific Embedded Languages try to solve. In previous works, we investigated the design of such a DSEL – NT2 – providing a Matlab -like syntax for parallel numerical computations inside a C++ library.
Main issues addressed here is how liimtaions of classical DSEL generation and multithreaded code generation can be overcome.
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Raffi Khatchadourian
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 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. We present our ongoing work on automated refactoring that assists developers in specifying whether and how their otherwise eagerly-executed imperative DL code could be reliably and efficiently executed as graphs while preserving semantics. The approach, based on a novel imperative tensor analysis, will automatically determine when it is safe and potentially advantageous to migrate imperative DL code to graph execution and modify decorator parameters or eagerly executing code already running as graphs. The approach is being implemented as a PyDev Eclipse IDE plug-in and uses the WALA Ariadne analysis framework. We discuss our ongoing work towards optimizing imperative DL code to its full potential.
This fast-paced session starts with an introduction to neural networks and linear regression models, along with a quick view of TensorFlow, followed by some Scala APIs for TensorFlow. You'll also see a simple dockerized image of Scala and TensorFlow code and how to execute the code in that image from the command line. No prior knowledge of NNs, Keras, or TensorFlow is required (but you must be comfortable with Scala).
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, and then a quick dive into CNNs. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session. Then we'll see a short introduction to TensorFlow and TensorBoard.
Machine learning with Go. There are some libraries like gonum and gorgonia that allows you to do machine learning. You can also train your deep learning models with python and TensorFlow and use the TensorFlow libraries to read exported models. Go-ONNX is to come.
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, backpropagation, and then a quick dive into CNNs. Basic knowledge of vectors, matrices, and elementary calculus (derivatives), are helpful in order to derive the maximum benefit from this session.
Next we'll see a simple neural network using Keras, followed by an introduction to TensorFlow and TensorBoard. (Bonus points if you know Zorn's Lemma, the Well-Ordering Theorem, and the Axiom of Choice.)
Natural language processing open seminar For Tensorflow usagehyunyoung Lee
This is presentation for Natural Language Processing open seminar in Kookmin University.
The open seminar reference : https://cafe.naver.com/nlpk
My presentation about how to use tensorflow for NLP open seminar for newbies for tensorflow.
Automatic Task-based Code Generation for High Performance DSELJoel Falcou
Providing high level tools for parallel programming while sustaining a high level of performance has been a challenge that techniques like Domain Specific Embedded Languages try to solve. In previous works, we investigated the design of such a DSEL – NT2 – providing a Matlab -like syntax for parallel numerical computations inside a C++ library.
Main issues addressed here is how liimtaions of classical DSEL generation and multithreaded code generation can be overcome.
Language translation with Deep Learning (RNN) with TensorFlowS N
The author is going to take you into the realm of Recurrent Neural Network (RNN). He will be training a sequence to sequence model on a dataset of English and French sentences that can translate new (unseen) sentences from English to French.
This will be a walkthrough of an end to end technique to train a Deep RNN model. You will learn to build various components necessary to build a Sequence-to-Sequence model.
You will learn about the fundamentals of Deep Learning, mainly RNN, concepts that will be required in this solution. A familiarity of Deep Learning concepts would be handy, but most of the concepts used in this example will be covered during the demo.
Technologies to be used:
Python, Jupyter, TensorFlow, FloydHub
Source code: https://github.com/syednasar/deeplearning/blob/master/language-translation/dlnd_language_translation.ipynb
...
An introduction to Deep Learning (DL) concepts, starting with a simple yet complete neural network (no frameworks), followed by aspects of deep neural networks, such as back propagation, activation functions, CNNs, and the AUT theorem. Next, a quick introduction to TensorFlow and Tensorboard, and then some code samples with Scala and TensorFlow.
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, and then a quick dive into CNNs, followed by a Keras code sample for defining a CNN. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session. Then we'll see a short introduction to TensorFlow 1.x and some insights into TF 2 that will be released some time this year.
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, followed by some TensorFlow features, and then a code sample of training a CNN in tensorflow.js. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session.
A fast-paced introduction to Deep Learning (DL) concepts, such as neural networks, back propagation, activation functions, CNNs, RNNs (if time permits), and the CLT/AUT/fixed-point theorems, along with a basic code sample in TensorFlow.
During this session you will learn how to manually create a basic neural network that acts as a classifier, and also the segue from linear regression to a neural network.
You'll also learn about GANs (Generative Adversarial Networks) for static images as well as voice, and the former case, their potential impact on self-driving cars.
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxvrickens
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition pg. 25
An Introduction to
Computer Science with Java, Python and C++
Community College of Philadelphia edition
Copyright 2017 by C.W. Herbert, all rights reserved.
Last edited October 8, 28, 2019 by C. W. Herbert
This document is a draft of a chapter from An Introduction to Computer Science with Java, Python and C++, written by Charles Herbert. It is available free of charge for students in Computer Science courses at Community College of Philadelphia during the Fall 2019 semester. It may not be reproduced or distributed for any other purposes without proper prior permission.
Please report any typos, other errors, or suggestions for improving the text to [email protected]
Chapter 5 – Python Functions and Modular Programming
Contents
Lesson 5.1User Created Functions in Python2
Python Function Parameters2
Value returning functions3
Example – Methods and Parameter Passing5
9
Lesson 5.2Top-Down Design and Modular Development10
Chapter Exercises13
User Created Functions in Python
So far we have only created software with one continuous Python script. We have used functions from other python modules, such as the square root method from the math class math.sqrt(n). Now we will begin to create our own functions of our own.
A Python function is a block of code that can be used to perform a specific task within a larger computer program. It can be called as needed from other Python software. Most programming languages have similar features, such as methods in Java or subroutines in system software.
The code for user-defined functions in Python is contained in a function definition. A Python function definition is a software unit with a header and a block of Python statements. The header starts with the keyword def followed by the name of the function, then a set parenthesis with any parameters for the function. A colon is used after the parentheses to indicate a block of code follows, just as with the if and while statements. The block of code to be included within the function is indented.
Here is an example of a Python function:
# firstFunction.py
# first demonstration of the use of a function for CSCI 111
# last edited 10/08/2o19 by C. Herbert
function
definition
def myFunction():
print ( "This line being printed by the function MyFunction.\n")
# end myFunction()
### main program ###
function used by the main part of the script
print("Beginning\n")
myFunction()
print("End\n")
# end main program
Functions can used for code that will be repeated within a program, or for modular development, in which long programs are broken into parts and the parts are developed independently. The parts can be developed as Python functions, then integrated to work together by being called from other software.
Python Function Parameters
Data can be passed to a Python function as a parameter of the function. Function parameters are variables listed in parentheses foll ...
Introduction to Deep Learning, Keras, and TensorFlowSri Ambati
This meetup was recorded in San Francisco on Jan 9, 2019.
Video recording of the session can be viewed here: https://youtu.be/yG1UJEzpJ64
Description:
This fast-paced session starts with a simple yet complete neural network (no frameworks), followed by an overview of activation functions, cost functions, backpropagation, and then a quick dive into CNNs. Next, we'll create a neural network using Keras, followed by an introduction to TensorFlow and TensorBoard. For best results, familiarity with basic vectors and matrices, inner (aka "dot") products of vectors, and rudimentary Python is definitely helpful. If time permits, we'll look at the UAT, CLT, and the Fixed Point Theorem. (Bonus points if you know Zorn's Lemma, the Well-Ordering Theorem, and the Axiom of Choice.)
Oswald's Bio:
Oswald Campesato is an education junkie: a former Ph.D. Candidate in Mathematics (ABD), with multiple Master's and 2 Bachelor's degrees. In a previous career, he worked in South America, Italy, and the French Riviera, which enabled him to travel to 70 countries throughout the world.
He has worked in American and Japanese corporations and start-ups, as C/C++ and Java developer to CTO. He works in the web and mobile space, conducts training sessions in Android, Java, Angular 2, and ReactJS, and he writes graphics code for fun. He's comfortable in four languages and aspires to become proficient in Japanese, ideally sometime in the next two decades. He enjoys collaborating with people who share his passion for learning the latest cool stuff, and he's currently working on his 15th book, which is about Angular 2.
Introduction to Deep Learning, Keras, and TensorflowOswald Campesato
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, and then a quick dive into CNNs. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session. Then we'll see how to create a Convolutional Neural Network in Keras, followed by a quick introduction to TensorFlow and TensorBoard.
Computer Science CS Project Matrix CBSE Class 12th XII .pdfPranavAnil9
The following project is based on Matrices and Determinants. It is a menu based program with data file and SQL Connectivity. The program is capable of performing all the complex functions of matrices and determinants that are mentioned in the Class 12th Math’s book. The ‘Menu’ of the program upon which it executes is as follows:
1: Generate a Random Matrix
2: Addition
3: Subtraction
4: Multiplication by a Scalar
5: Multiplication by a Matrix
6: Calculate Determinant
7: Calculate Minor
8: Calculate Cofactor
9: Calculate Adjoint
10: Transpose
11: Inversion
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, followed by some TensorFlow features, and then a code sample of training a CNN in tensorflow.js. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session.
Python is a high level language focused on readability. The Python community developed the concept of "Pythonic Code", requiring not only semantic correctness, but also conformity to universally acknowledged stylistic criteria.
A pre-requisite to write pythonic code is to write idiomatic code. Using the right idioms is a matter of acquired taste and experience, however, some idioms are quite easy to learn.
This presentation focuses on some of these idioms and other stylistic criteria:
* for vs. while
* iterators, itertools
* code conventions (space invaders)
* avoid default values bugs
* first order functions
* internal/external iterators
* substituting the switch statement
* properties, attributes, read only objects
* named tuples
* duck typings
* bits of metaprogramming
* exception management: LBYL vs. EAFP
Overview of TensorFlow For Natural Language Processingananth
TensorFlow open sourced recently by Google is one of the key frameworks that support development of deep learning architectures. In this slideset, part 1, we get started with a few basic primitives of TensorFlow. We will also discuss when and when not to use TensorFlow.
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Raffi Khatchadourian
Logging—used for system events and security breaches to describe more informational yet essential aspects of software features—is pervasive. Given the high transactionality of today's software, logging effectiveness can be reduced by information overload. Log levels help alleviate this problem by correlating a priority to logs that can be later filtered. As software evolves, however, levels of logs documenting surrounding feature implementations may also require modification as features once deemed important may have decreased in urgency and vice-versa. We present an automated approach that assists developers in evolving levels of such (feature) logs. The approach, based on mining Git histories and manipulating a degree of interest (DOI) model,1 transforms source code to revitalize feature log levels based on the “interestingness” of the surrounding code. Built upon JGit and Mylyn, the approach is implemented as an Eclipse IDE plug-in and evaluated on 18 Java projects with ~3 million lines of code and ~4K log statements. Our tool successfully analyzes 99.22% of logging statements, increases log level distributions by ~20 %, and increases the focus of logs in bug fix contexts ~83 % of the time. Moreover, pull (patch) requests were integrated into large and popular open-source projects. The results indicate that the approach is promising in assisting developers in evolving feature log levels.
A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...Raffi Khatchadourian
Logging is a significant programming practice. Due to the highly transactional nature of modern software applications, many logs are generated every day, which may overwhelm developers. Logging information overload can be dangerous to software applications. Using log levels, developers can print the valuable information while hiding the verbose logs during software runtime. As software evolves, the log levels of logging statements associated with the surrounding software feature implementation may also need to be altered. Maintaining log levels necessitates a significant amount of manual effort. In this paper, we propose an automated approach that can rejuvenate feature log levels by matching the interest level of developers in the surrounding features. The approach is implemented as an open-source Eclipse plugin, using two external plug-ins (JGit and Mylyn). The plugin was tested on 18 open-source Java projects consisting of ~3 million lines of code and ~4K log statements. Our tool successfully analyzes 99.22% of logging statements, increases log level distributions by ~20%, and increases the focus of logs in bug fix contexts ~83% of the time. Interested readers can watch our demonstration video (https://www.youtube.com/watch?v=qIULoAXoDv4).
More Related Content
Similar to Challenges in Migrating Imperative Deep Learning Programs to Graph Execution: An Empirical Study
Language translation with Deep Learning (RNN) with TensorFlowS N
The author is going to take you into the realm of Recurrent Neural Network (RNN). He will be training a sequence to sequence model on a dataset of English and French sentences that can translate new (unseen) sentences from English to French.
This will be a walkthrough of an end to end technique to train a Deep RNN model. You will learn to build various components necessary to build a Sequence-to-Sequence model.
You will learn about the fundamentals of Deep Learning, mainly RNN, concepts that will be required in this solution. A familiarity of Deep Learning concepts would be handy, but most of the concepts used in this example will be covered during the demo.
Technologies to be used:
Python, Jupyter, TensorFlow, FloydHub
Source code: https://github.com/syednasar/deeplearning/blob/master/language-translation/dlnd_language_translation.ipynb
...
An introduction to Deep Learning (DL) concepts, starting with a simple yet complete neural network (no frameworks), followed by aspects of deep neural networks, such as back propagation, activation functions, CNNs, and the AUT theorem. Next, a quick introduction to TensorFlow and Tensorboard, and then some code samples with Scala and TensorFlow.
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, and then a quick dive into CNNs, followed by a Keras code sample for defining a CNN. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session. Then we'll see a short introduction to TensorFlow 1.x and some insights into TF 2 that will be released some time this year.
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, followed by some TensorFlow features, and then a code sample of training a CNN in tensorflow.js. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session.
A fast-paced introduction to Deep Learning (DL) concepts, such as neural networks, back propagation, activation functions, CNNs, RNNs (if time permits), and the CLT/AUT/fixed-point theorems, along with a basic code sample in TensorFlow.
During this session you will learn how to manually create a basic neural network that acts as a classifier, and also the segue from linear regression to a neural network.
You'll also learn about GANs (Generative Adversarial Networks) for static images as well as voice, and the former case, their potential impact on self-driving cars.
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxvrickens
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition pg. 25
An Introduction to
Computer Science with Java, Python and C++
Community College of Philadelphia edition
Copyright 2017 by C.W. Herbert, all rights reserved.
Last edited October 8, 28, 2019 by C. W. Herbert
This document is a draft of a chapter from An Introduction to Computer Science with Java, Python and C++, written by Charles Herbert. It is available free of charge for students in Computer Science courses at Community College of Philadelphia during the Fall 2019 semester. It may not be reproduced or distributed for any other purposes without proper prior permission.
Please report any typos, other errors, or suggestions for improving the text to [email protected]
Chapter 5 – Python Functions and Modular Programming
Contents
Lesson 5.1User Created Functions in Python2
Python Function Parameters2
Value returning functions3
Example – Methods and Parameter Passing5
9
Lesson 5.2Top-Down Design and Modular Development10
Chapter Exercises13
User Created Functions in Python
So far we have only created software with one continuous Python script. We have used functions from other python modules, such as the square root method from the math class math.sqrt(n). Now we will begin to create our own functions of our own.
A Python function is a block of code that can be used to perform a specific task within a larger computer program. It can be called as needed from other Python software. Most programming languages have similar features, such as methods in Java or subroutines in system software.
The code for user-defined functions in Python is contained in a function definition. A Python function definition is a software unit with a header and a block of Python statements. The header starts with the keyword def followed by the name of the function, then a set parenthesis with any parameters for the function. A colon is used after the parentheses to indicate a block of code follows, just as with the if and while statements. The block of code to be included within the function is indented.
Here is an example of a Python function:
# firstFunction.py
# first demonstration of the use of a function for CSCI 111
# last edited 10/08/2o19 by C. Herbert
function
definition
def myFunction():
print ( "This line being printed by the function MyFunction.\n")
# end myFunction()
### main program ###
function used by the main part of the script
print("Beginning\n")
myFunction()
print("End\n")
# end main program
Functions can used for code that will be repeated within a program, or for modular development, in which long programs are broken into parts and the parts are developed independently. The parts can be developed as Python functions, then integrated to work together by being called from other software.
Python Function Parameters
Data can be passed to a Python function as a parameter of the function. Function parameters are variables listed in parentheses foll ...
Introduction to Deep Learning, Keras, and TensorFlowSri Ambati
This meetup was recorded in San Francisco on Jan 9, 2019.
Video recording of the session can be viewed here: https://youtu.be/yG1UJEzpJ64
Description:
This fast-paced session starts with a simple yet complete neural network (no frameworks), followed by an overview of activation functions, cost functions, backpropagation, and then a quick dive into CNNs. Next, we'll create a neural network using Keras, followed by an introduction to TensorFlow and TensorBoard. For best results, familiarity with basic vectors and matrices, inner (aka "dot") products of vectors, and rudimentary Python is definitely helpful. If time permits, we'll look at the UAT, CLT, and the Fixed Point Theorem. (Bonus points if you know Zorn's Lemma, the Well-Ordering Theorem, and the Axiom of Choice.)
Oswald's Bio:
Oswald Campesato is an education junkie: a former Ph.D. Candidate in Mathematics (ABD), with multiple Master's and 2 Bachelor's degrees. In a previous career, he worked in South America, Italy, and the French Riviera, which enabled him to travel to 70 countries throughout the world.
He has worked in American and Japanese corporations and start-ups, as C/C++ and Java developer to CTO. He works in the web and mobile space, conducts training sessions in Android, Java, Angular 2, and ReactJS, and he writes graphics code for fun. He's comfortable in four languages and aspires to become proficient in Japanese, ideally sometime in the next two decades. He enjoys collaborating with people who share his passion for learning the latest cool stuff, and he's currently working on his 15th book, which is about Angular 2.
Introduction to Deep Learning, Keras, and TensorflowOswald Campesato
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, and then a quick dive into CNNs. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session. Then we'll see how to create a Convolutional Neural Network in Keras, followed by a quick introduction to TensorFlow and TensorBoard.
Computer Science CS Project Matrix CBSE Class 12th XII .pdfPranavAnil9
The following project is based on Matrices and Determinants. It is a menu based program with data file and SQL Connectivity. The program is capable of performing all the complex functions of matrices and determinants that are mentioned in the Class 12th Math’s book. The ‘Menu’ of the program upon which it executes is as follows:
1: Generate a Random Matrix
2: Addition
3: Subtraction
4: Multiplication by a Scalar
5: Multiplication by a Matrix
6: Calculate Determinant
7: Calculate Minor
8: Calculate Cofactor
9: Calculate Adjoint
10: Transpose
11: Inversion
A fast-paced introduction to Deep Learning concepts, such as activation functions, cost functions, back propagation, followed by some TensorFlow features, and then a code sample of training a CNN in tensorflow.js. Basic knowledge of vectors, matrices, and derivatives is helpful in order to derive the maximum benefit from this session.
Python is a high level language focused on readability. The Python community developed the concept of "Pythonic Code", requiring not only semantic correctness, but also conformity to universally acknowledged stylistic criteria.
A pre-requisite to write pythonic code is to write idiomatic code. Using the right idioms is a matter of acquired taste and experience, however, some idioms are quite easy to learn.
This presentation focuses on some of these idioms and other stylistic criteria:
* for vs. while
* iterators, itertools
* code conventions (space invaders)
* avoid default values bugs
* first order functions
* internal/external iterators
* substituting the switch statement
* properties, attributes, read only objects
* named tuples
* duck typings
* bits of metaprogramming
* exception management: LBYL vs. EAFP
Overview of TensorFlow For Natural Language Processingananth
TensorFlow open sourced recently by Google is one of the key frameworks that support development of deep learning architectures. In this slideset, part 1, we get started with a few basic primitives of TensorFlow. We will also discuss when and when not to use TensorFlow.
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Raffi Khatchadourian
Logging—used for system events and security breaches to describe more informational yet essential aspects of software features—is pervasive. Given the high transactionality of today's software, logging effectiveness can be reduced by information overload. Log levels help alleviate this problem by correlating a priority to logs that can be later filtered. As software evolves, however, levels of logs documenting surrounding feature implementations may also require modification as features once deemed important may have decreased in urgency and vice-versa. We present an automated approach that assists developers in evolving levels of such (feature) logs. The approach, based on mining Git histories and manipulating a degree of interest (DOI) model,1 transforms source code to revitalize feature log levels based on the “interestingness” of the surrounding code. Built upon JGit and Mylyn, the approach is implemented as an Eclipse IDE plug-in and evaluated on 18 Java projects with ~3 million lines of code and ~4K log statements. Our tool successfully analyzes 99.22% of logging statements, increases log level distributions by ~20 %, and increases the focus of logs in bug fix contexts ~83 % of the time. Moreover, pull (patch) requests were integrated into large and popular open-source projects. The results indicate that the approach is promising in assisting developers in evolving feature log levels.
A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...Raffi Khatchadourian
Logging is a significant programming practice. Due to the highly transactional nature of modern software applications, many logs are generated every day, which may overwhelm developers. Logging information overload can be dangerous to software applications. Using log levels, developers can print the valuable information while hiding the verbose logs during software runtime. As software evolves, the log levels of logging statements associated with the surrounding software feature implementation may also need to be altered. Maintaining log levels necessitates a significant amount of manual effort. In this paper, we propose an automated approach that can rejuvenate feature log levels by matching the interest level of developers in the surrounding features. The approach is implemented as an open-source Eclipse plugin, using two external plug-ins (JGit and Mylyn). The plugin was tested on 18 open-source Java projects consisting of ~3 million lines of code and ~4K log statements. Our tool successfully analyzes 99.22% of logging statements, increases log level distributions by ~20%, and increases the focus of logs in bug fix contexts ~83% of the time. Interested readers can watch our demonstration video (https://www.youtube.com/watch?v=qIULoAXoDv4).
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...Raffi Khatchadourian
Actor concurrency is becoming increasingly important in the development of real-world software systems. Although actor concurrency may be less susceptible to some multithreaded concurrency bugs, such as low-level data races and deadlocks, it comes with its own bugs that may be different. However, the fundamental characteristics of actor concurrency bugs, including their symptoms, root causes, API usages, examples, and differences when they come from different sources are still largely unknown. Actor software development can significantly benefit from a comprehensive qualitative and quantitative understanding of these characteristics, which is the focus of this work, to foster better API documentation, development practices, testing, debugging, repairing, and verification frameworks. To conduct this study, we take the following major steps. First, we construct a set of 186 real-world Akka actor bugs from Stack Overflow and GitHub via manual analysis of 3,924
Stack Overflow questions, answers, and comments and 3,315 GitHub commits, messages, original and modified code snippets, issues, and pull requests. Second, we manually study these actor bugs and their fixes to understand and classify their symptoms, root causes, and API usages. Third, we study the differences between the commonalities and distributions of symptoms, root causes, and API usages of our Stack Overflow and GitHub actor bugs. Fourth, we discuss real-world examples of our actor bugs with these symptoms and root causes. Finally, we investigate the relation of our findings with those of previous work and discuss their implications. A few findings of our study are: (1) symptoms of our actor bugs can be classified into five categories, with Error as the most common symptom and Incorrect Exceptions as the least common, (2) root causes of our actor bugs can be classified into ten categories, with Logic as the most common root cause and Untyped Communication as the least common, (3) a small number of Akka API packages are responsible for most of API usages by our actor bugs, and (4) our Stack Overflow and GitHub actor bugs can differ significantly in commonalities and distributions of their symptoms, root causes, and API usages. While some of our findings agree with those of previous work, others sharply contrast.
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...Raffi Khatchadourian
Machine Learning (ML), including Deep Learning (DL), systems, i.e., those with ML capabilities, are pervasive in today’s data-driven society. Such systems are complex; they are comprised of ML models and many subsystems that support learning processes. As with other complex systems, ML systems are prone to classic technical debt issues, especially when such systems are long-lived, but they also exhibit debt specific to these systems. Unfortunately, there is a gap of knowledge in how ML systems actually evolve and are maintained. In this paper, we fill this gap by studying refactorings, i.e., source-to-source semantics-preserving program transformations, performed in real-world, open-source software, and the technical debt issues they alleviate. We analyzed 26 projects, consisting of 4.2 MLOC, along with 327 manually examined code patches. The results indicate that developers refactor these systems for a variety of reasons, both specific and tangential to ML, some refactorings correspond to established technical debt categories, while others do not, and code duplication is a major cross-cutting theme that particularly involved ML configuration and model code, which was also the most refactored. We also introduce 14 and 7 new ML-specific refactorings and technical debt categories, respectively, and put forth several recommendations, best practices, and anti-patterns. The results can potentially assist practitioners, tool developers, and educators in facilitating long-term ML system usefulness.
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Raffi Khatchadourian
Event logging is pervasive in modern applications, assisting developers, users, and administrators, alike in understanding and diagnosing issues involving sophisticated software. Unfortunately, the high transactionality of today's software can cause logging to be less effective due to information overload. Log levels help alleviate this problem by correlating a "severity" to system events that can be filtered. However, as software evolves, log levels may also require alteration as events once deemed important may have decreased in priority and vice-versa. We present our work-in-progress in devising an automated approach that assists developers in evolving logging levels. The approach, based on mining git histories and manipulating a degree of interest (DOI) model, transforms source code to "rejuvenate" log levels based on the "interestingness" of surrounding code. The approach was implemented as a plug-in to the Eclipse IDE, built upon JGit and Mylyn, and was evaluated on 18 Java projects having 2.89 million lines of code and ∼4K log statements. Our tool was able to successfully analyze 99.26% of logging statements, increase the distribution of log levels by 17.14%, and identify logs that were modified by developers with a recall of 79.31% and a level direction match success rate of 86.96%. Moreover, two of our pull (patch) requests were integrated into large and popular open-source projects. The results indicate that the approach is promising in assisting developers in evolving logging levels. We also discuss the relationship to software security, specifically, to side-channel attacks.
Streaming APIs allow for big data processing of native data structures by providing MapReduce-like operations over these structures. However, unlike traditional big data systems, these data structures typically reside in shared memory accessed by multiple cores. Although popular, this emerging hybrid paradigm opens the door to possibly detrimental behavior, such as thread contention and bugs related to non-execution and non-determinism. This study explores the use and misuse of a popular streaming API, namely, Java 8 Streams. The focus is on how developers decide whether or not to run these operations sequentially or in parallel and bugs both specific and tangential to this paradigm. Our study involved analyzing 34 Java projects and 5.53 million lines of code, along with 719 manually examined code patches. Various automated, including interprocedural static analysis, and manual methodologies were employed. The results indicate that streams are pervasive, stream parallelization is not widely used, and performance is a crosscutting concern that accounted for the majority of fixes. We also present coincidences that both confirm and contradict the results of related studies. The study advances our understanding of streams, as well as benefits practitioners, programming language and API designers, tool developers, and educators alike.
Safe Automated Refactoring for Intelligent Parallelization of Java 8 StreamsRaffi Khatchadourian
Streaming APIs are becoming more pervasive in mainstream Object-Oriented programming languages. For example, the Stream API introduced in Java 8 allows for functional-like, MapReduce-style operations in processing both finite and infinite data structures. However, using this API efficiently involves subtle considerations like determining when it is best for stream operations to run in parallel, when running operations in parallel can be less efficient, and when it is safe to run in parallel due to possible lambda expression side-effects. In this paper, we present an automated refactoring approach that assists developers in writing efficient stream code in a semantics-preserving fashion. The approach, based on a novel data ordering and typestate analysis, consists of preconditions for automatically determining when it is safe and possibly advantageous to convert sequential streams to parallel and unorder or de-parallelize already parallel streams. The approach was implemented as a plug-in to the Eclipse IDE, uses the WALA and SAFE analysis frameworks, and was evaluated on 11 Java projects consisting of $\sim$642 thousand lines of code. We found that 36.31% of candidate streams were refactorable, and an average speedup of 3.49 on performance tests was observed. The results indicate that the approach is useful in optimizing stream code to their full potential.
Safe Automated Refactoring for Intelligent Parallelization of Java 8 StreamsRaffi Khatchadourian
Streaming APIs are becoming more pervasive in mainstream Object-Oriented programming languages. For example, the Stream API introduced in Java 8 allows for functional-like, MapReduce-style operations in processing both finite and infinite data structures. However, using this API efficiently involves subtle considerations like determining when it is best for stream operations to run in parallel, when running operations in parallel can be less efficient, and when it is safe to run in parallel due to possible lambda expression side-effects. In this paper, we present an automated refactoring approach that assists developers in writing efficient stream code in a semantics-preserving fashion. The approach, based on a novel data ordering and typestate analysis, consists of preconditions for automatically determining when it is safe and possibly advantageous to convert sequential streams to parallel and unorder or de-parallelize already parallel streams. The approach was implemented as a plug-in to the Eclipse IDE, uses the WALA and SAFE analysis frameworks, and was evaluated on 11 Java projects consisting of $\sim$642 thousand lines of code. We found that 36.31% of candidate streams were refactorable, and an average speedup of 3.49 on performance tests was observed. The results indicate that the approach is useful in optimizing stream code to their full potential.
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Raffi Khatchadourian
Streaming APIs are becoming more pervasive in mainstream Object-Oriented programming languages. For example, the Stream API introduced in Java 8 allows for functional-like, MapReduce-style operations in processing both finite and infinite data structures. However, using this API efficiently involves subtle considerations like determining when it is best for stream operations to run in parallel, when running operations in parallel can be less efficient, and when it is safe to run in parallel due to possible lambda expression side-effects. In this paper, we present an automated refactoring approach that assists developers in writing efficient stream code in a semantics-preserving fashion. The approach, based on a novel data ordering and typestate analysis, consists of preconditions for automatically determining when it is safe and possibly advantageous to convert sequential streams to parallel and unorder or de-parallelize already parallel streams. The approach was implemented as a plug-in to the Eclipse IDE, uses the WALA and SAFE analysis frameworks, and was evaluated on 11 Java projects consisting of ∼642K lines of code. We found that 57 of 157 candidate streams (36.31%) were refactorable, and an average speedup of 3.49 on performance tests was observed. The results indicate that the approach is useful in optimizing stream code to their full potential.
A Tool for Optimizing Java 8 Stream Software via Automated RefactoringRaffi Khatchadourian
Streaming APIs are pervasive in mainstream Object-Oriented languages and platforms. For example, the Java 8 Stream API allows for functional-like, MapReduce-style operations in processing both finite, e.g., collections, and infinite data structures. However, using this API efficiently involves subtle considerations like determining when it is best for stream operations to run in parallel, when running operations in parallel can actually be less efficient, and when it is safe to run in parallel due to possible lambda expression side-effects. In this paper, we describe the engineering aspects of an open source automated refactoring tool called Optimize Streams that assists developers in writing optimal stream software in a semantics-preserving fashion. Based on a novel ordering and typestate analysis, the tool is implemented as a plug-in to the popular Eclipse IDE, using both the WALA and SAFE frameworks. The tool was evaluated on 11 Java projects consisting of ~642 thousand lines of code, where we found that 36.31% of candidate streams were refactorable, and an average speedup of 1.55 on a performance suite was observed. We also describe experiences gained from integrating three very different static analysis frameworks to provide developers with an easy-to-use interface for optimizing their stream code to its full potential.
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...Raffi Khatchadourian
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. However, the Eclipse IDE is missing several key refactorings that could help developers take advantage of new features in Java 8 more easily. In this paper, we discuss our ongoing work in porting the enhanced for loop to lambda expression refactoring from the NetBeans IDE to Eclipse. We also discuss future plans for new Java 8 refactorings not found in any current IDE.
Towards Safe Refactoring for Intelligent Parallelization of Java 8 StreamsRaffi Khatchadourian
The Java 8 Stream API sets forth a promising new programming model that incorporates functional-like, MapReduce-style features into a mainstream programming language. However, using streams correctly and efficiently may involve subtle considerations. In this poster, we present our ongoing work and preliminary results towards an automated refactoring approach that assists developers in writing optimal stream code. The approach, based on ordering and typestate analysis, determines when it is safe and advantageous to convert streams to parallel and optimize a parallel streams.
Proactive Empirical Assessment of New Language Feature Adoption via Automated...Raffi Khatchadourian
Programming languages and platforms improve over time, sometimes resulting in new language features that offer many benefits. However, despite these benefits, developers may not always be willing to adopt them in their projects for various reasons. In this paper, we describe an empirical study where we assess the adoption of a particular new language feature. Studying how developers use (or do not use) new language features is important in programming language research and engineering because it gives designers insight into the usability of the language to create meaning programs in that language. This knowledge, in turn, can drive future innovations in the area. Here, we explore Java 8 default methods, which allow interfaces to contain (instance) method implementations.
Default methods can ease interface evolution, make certain ubiquitous design patterns redundant, and improve both modularity and maintainability. A focus of this work is to discover, through a scientific approach and a novel technique, situations where developers found these constructs useful and where they did not, and the reasons for each. Although several studies center around assessing new language features, to the best of our knowledge, this kind of construct has not been previously considered.
Despite their benefits, we found that developers did not adopt default methods in all situations. Our study consisted of submitting pull requests introducing the language feature to 19 real-world, open source Java projects without altering original program semantics. This novel assessment technique is proactive in that the adoption was driven by an automatic refactoring approach rather than waiting for developers to discover and integrate the feature themselves. In this way, we set forth best practices and patterns of using the language feature effectively earlier rather than later and are able to possibly guide (near) future language evolution. We foresee this technique to be useful in assessing other new language features, design patterns, and other programming idioms.
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Raffi Khatchadourian
Enabling interfaces to declare (instance) method
implementations, Java 8 default methods can be used as a
substitute for the ubiquitous skeletal implementation software design
pattern. Performing this transformation on legacy software
manually, though, may be non-trivial. The refactoring requires
analyzing complex type hierarchies, resolving multiple implementation
inheritance issues, reconciling differences between class
and interface methods, and analyzing tie-breakers (dispatch
precedence) with overriding class methods. All of this is necessary
to preserve type-correctness and confirm semantics preservation.
We demonstrate an automated refactoring tool called MIGRATE
SKELETAL IMPLEMENTATION TO INTERFACE for transforming
legacy Java code to use the new default construct. The tool,
implemented as an Eclipse plug-in, is driven by an efficient,
fully-automated, type constraint-based refactoring approach. It
features an extensive ruleset covering various corner-cases
where default methods cannot be used. The resulting code is
semantically equivalent to the original, more succinct, easier to
comprehend, less complex, and exhibits increased modularity. A
demonstration can be found at http://youtu.be/YZHIy0yePh8.
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Raffi Khatchadourian
Enabling interfaces to declare (instance) method implementations, Java 8 default methods can be used as a substitute for the ubiquitous skeletal implementation software design pattern. Performing this transformation on legacy software manually, though, may be non-trivial. The refactoring requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods. All of this is necessary to preserve type-correctness and confirm semantics preservation. We demonstrate an automated refactoring tool called Migrate Skeletal Implementation to Interface for transforming legacy Java code to use the new default construct. The tool, implemented as an Eclipse plug-in, is driven by an efficient, fully-automated, type constraint-based refactoring approach. It features an extensive ruleset covering various corner-cases where default methods cannot be used. The resulting code is semantically equivalent to the original, more succinct, easier to comprehend, less complex, and exhibits increased modularity. A demonstration can be found at http://youtu.be/YZHIy0yePh8.
Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...Raffi Khatchadourian
Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods as it requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods to preserve type-correctness and confirm semantics preservation. In this paper, we present an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software. The approach features an extensive rule set that covers various corner-cases where default methods cannot be used. To demonstrate applicability, we implemented our approach as an Eclipse plug-in and applied it to 19 real-world Java projects, as well as submitted pull requests to popular GitHub repositories. The indication is that it is useful in migrating skeletal implementation methods to interfaces as default methods, sheds light onto the pattern’s usage, and provides insight to language designers on how this new construct applies to existing software.
Automated Refactoring of Legacy Java Software to Default Methods Talk at GMURaffi Khatchadourian
Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods. In this talk, I discuss an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software.
Towards Improving Interface Modularity in Legacy Java Software Through Automa...Raffi Khatchadourian
The skeletal implementation pattern is a software design pattern
consisting of defining an abstract class that provides a partial interface implementation. However, since Java allows only single class inheritance, if implementers decide to extend a skeletal implementation, they will not be allowed to extend any other class. Also, discovering the skeletal implementation may require a global analysis. Java 8 enhanced interfaces alleviate these problems by allowing interfaces to contain (default) method implementations, which implementers inherit. Java classes are then free to extend a different class, and a separate abstract class is no longer needed; developers considering implementing an interface need only examine the interface itself. We argue that both these benefits improve software modularity, and discuss our ongoing work in developing an automated refactoring tool that would assist developers in taking advantage of the enhanced interface feature for their legacy Java software.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Essentials of Automations: The Art of Triggers and Actions in FME
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution: An Empirical Study
1. Introduction Motivation Approach Methodology Results Conclusion
Challenges in Migrating Imperative Deep
Learning Programs to Graph Execution: An
Empirical Study
Tatiana Castro Vélez1
Raffi Khatchadourian1,2
Mehdi
Bagherzadeh3
Anita Raja1,2
1
City University of New York (CUNY) Graduate Center, USA
2
City University of New York (CUNY) Hunter College, USA
3
Oakland University, USA
Computer Science, George Mason University, March 24, 2022
To appear at the International Conference on Mining Software
Repositories (MSR ’22) co-located with ICSE ’22.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 1 / 32
2. Introduction Motivation Approach Methodology Results Conclusion
Deep Learning Systems & Run-time Performance
Machine Learning (ML), including Deep Learning (DL), systems are
pervasive.
As datasets grow, efficiency becomes essential to support
responsiveness [Zhou et al., 2020].
For efficiency, DL frameworks have traditionally embraced a deferred
execution-style supporting graph-based (DNN) computation.
Scalable, but development is . . .
Error-prone.
Cumbersome.
Produces programs that are difficult to debug.
Because graph computation executes statements in a non-imperative
order, traditional SE tools cannot help troubleshoot bugs [Arpteg
et al., 2018].
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 2 / 32
3. TensorFlow Deferred Execution-style Code
1 # Build a graph.
2 a = tf.constant(5.0)
3 b = tf.constant(6.0)
4 c = a * b
5
6 # Launch graph in a session.
7 sess = tf.Session()
8
9 # Evaluate the tensor `c`.
10 print(sess.run(c)) # prints 30.0
Lines 2–4 build a computation graph.
Line 4 does not execute until the Session created on line 7 is run on
line 10.
No native support common imperative program constructs, e.g.,
iteration.
4. TensorFlow Deferred Execution-style Code
1 # Build a graph.
2 a = tf.constant(5.0)
3 b = tf.constant(6.0)
4 c = a * b
5
6 # Launch graph in a session.
7 sess = tf.Session()
8
9 # Evaluate the tensor `c`.
10 print(sess.run(c)) # prints 30.0
Lines 2–4 build a computation graph.
Line 4 does not execute until the Session created on line 7 is run on
line 10.
No native support common imperative program constructs, e.g.,
iteration.
5. TensorFlow Deferred Execution-style Code
1 # Build a graph.
2 a = tf.constant(5.0)
3 b = tf.constant(6.0)
4 c = a * b
5
6 # Launch graph in a session.
7 sess = tf.Session()
8
9 # Evaluate the tensor `c`.
10 print(sess.run(c)) # prints 30.0
Lines 2–4 build a computation graph.
Line 4 does not execute until the Session created on line 7 is run on
line 10.
No native support common imperative program constructs, e.g.,
iteration.
6. Introduction Motivation Approach Methodology Results Conclusion
Imperative DL Programming, Eager Execution &
Hybridization
More natural, less error-prone, and easier-to-debug imperative DL
frameworks (e.g., TensorFlow Eager, Keras, PyTorch) encouraging
eager execution have emerged.
Come at the expense of run-time performance.
Hybrid approaches (e.g., Hybridize, TorchScript, AutoGraph) have
emerged.
Integrated into mainstream DL frameworks (e.g.,
TensorFlow, MXNet, PyTorch).
Execute imperative DL programs as static graphs at run-time.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 4 / 32
7. TensorFlow Imperative (OO) DL Model Code (Images)
1 class SequentialModel(tf.keras.Model):
2 def __init__(self, **kwargs):
3 super(SequentialModel, self).__init__(...)
4 self.flatten = layers.Flatten(input_shape=(28, 28))
5 num_layers = 100 # Add many small layers.
6 self.layers = [layers.Dense(64, activation = "relu") for n in
range(num_layers)]
,
→
7 self.dropout = tf.keras.layers.Dropout(0.2)
8 self.dense_2 = tf.keras.layers.Dense(10)
9
10 @tf.function(...) # Executes model as graph (optional args).
11 def __call__(self, x):
12 x = self.flatten(x)
13 for layer in self.layers:
14 x = layer(x)
15 x = self.dropout(x)
16 x = self.dense_2(x)
17 return x
On line 10, AutoGraph used to potentially enhance performance.
Decorates model’s call() method with @tf.function, possibly
providing optional yet influential decorator arguments.
At run-time, call()’s execution will be “traced” (∼9.22 speedup).
8. TensorFlow Imperative (OO) DL Model Code (Images)
1 class SequentialModel(tf.keras.Model):
2 def __init__(self, **kwargs):
3 super(SequentialModel, self).__init__(...)
4 self.flatten = layers.Flatten(input_shape=(28, 28))
5 num_layers = 100 # Add many small layers.
6 self.layers = [layers.Dense(64, activation = "relu") for n in
range(num_layers)]
,
→
7 self.dropout = tf.keras.layers.Dropout(0.2)
8 self.dense_2 = tf.keras.layers.Dense(10)
9
10 @tf.function(...) # Executes model as graph (optional args).
11 def __call__(self, x):
12 x = self.flatten(x)
13 for layer in self.layers:
14 x = layer(x)
15 x = self.dropout(x)
16 x = self.dense_2(x)
17 return x
On line 10, AutoGraph used to potentially enhance performance.
Decorates model’s call() method with @tf.function, possibly
providing optional yet influential decorator arguments.
At run-time, call()’s execution will be “traced” (∼9.22 speedup).
9. TensorFlow Imperative (OO) DL Model Code (Images)
1 class SequentialModel(tf.keras.Model):
2 def __init__(self, **kwargs):
3 super(SequentialModel, self).__init__(...)
4 self.flatten = layers.Flatten(input_shape=(28, 28))
5 num_layers = 100 # Add many small layers.
6 self.layers = [layers.Dense(64, activation = "relu") for n in
range(num_layers)]
,
→
7 self.dropout = tf.keras.layers.Dropout(0.2)
8 self.dense_2 = tf.keras.layers.Dense(10)
9
10 @tf.function(...) # Executes model as graph (optional args).
11 def __call__(self, x):
12 x = self.flatten(x)
13 for layer in self.layers:
14 x = layer(x)
15 x = self.dropout(x)
16 x = self.dense_2(x)
17 return x
On line 10, AutoGraph used to potentially enhance performance.
Decorates model’s call() method with @tf.function, possibly
providing optional yet influential decorator arguments.
At run-time, call()’s execution will be “traced” (∼9.22 speedup).
10. Introduction Motivation Approach Methodology Results Conclusion
Hybridization Drawbacks
Necessitate non-trivial, specialized metadata [Jeong et al., 2019].
Exhibit limitations and known issues with native program constructs.
Subtle considerations are required to:
Make code amenable to safe, accurate, and efficient graph execution.
Avoid performance bottlenecks and semantically inequivalent results.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 6 / 32
11. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code With Python Side-effects
1 @tf.function
2 def f(x):
3 print("Input: ", x)
4 f(1)
5 f(1)
6 f(2)
Output (expecting 1, 1, 2):
Input: 1
Input: 2
Side-effect producing, native Python statements are problematic for
tf.function-decorated functions (i.e., “tf.functions”).
Example
Printing, list appending, global variable mutation.
Because they are traced, a function’s behavior is “etched” into its
corresponding graph.
Can have unexpectant results, executing side-effects multiple times
or not at all.
Side-effects occur when tf.functions are called the first time.
Subsequent calls with similar arguments execute the graph instead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 7 / 32
12. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code With Python Side-effects
1 @tf.function
2 def f(x):
3 print("Input: ", x)
4 f(1)
5 f(1)
6 f(2)
Output (expecting 1, 1, 2):
Input: 1
Input: 2
Side-effect producing, native Python statements are problematic for
tf.function-decorated functions (i.e., “tf.functions”).
Example
Printing, list appending, global variable mutation.
Because they are traced, a function’s behavior is “etched” into its
corresponding graph.
Can have unexpectant results, executing side-effects multiple times
or not at all.
Side-effects occur when tf.functions are called the first time.
Subsequent calls with similar arguments execute the graph instead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 7 / 32
13. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code With Python Side-effects
1 @tf.function
2 def f(x):
3 print("Input: ", x)
4 f(1)
5 f(1)
6 f(2)
Output (expecting 1, 1, 2):
Input: 1
Input: 2
Side-effect producing, native Python statements are problematic for
tf.function-decorated functions (i.e., “tf.functions”).
Example
Printing, list appending, global variable mutation.
Because they are traced, a function’s behavior is “etched” into its
corresponding graph.
Can have unexpectant results, executing side-effects multiple times
or not at all.
Side-effects occur when tf.functions are called the first time.
Subsequent calls with similar arguments execute the graph instead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 7 / 32
14. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code With Python Side-effects
1 @tf.function
2 def f(x):
3 print("Input: ", x)
4 f(1)
5 f(1)
6 f(2)
Output (expecting 1, 1, 2):
Input: 1
Input: 2
Side-effect producing, native Python statements are problematic for
tf.function-decorated functions (i.e., “tf.functions”).
Example
Printing, list appending, global variable mutation.
Because they are traced, a function’s behavior is “etched” into its
corresponding graph.
Can have unexpectant results, executing side-effects multiple times
or not at all.
Side-effects occur when tf.functions are called the first time.
Subsequent calls with similar arguments execute the graph instead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 7 / 32
15. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code With Python Side-effects
1 @tf.function
2 def f(x):
3 print("Input: ", x)
4 f(1)
5 f(1)
6 f(2)
Output (expecting 1, 1, 2):
Input: 1
Input: 2
Side-effect producing, native Python statements are problematic for
tf.function-decorated functions (i.e., “tf.functions”).
Example
Printing, list appending, global variable mutation.
Because they are traced, a function’s behavior is “etched” into its
corresponding graph.
Can have unexpectant results, executing side-effects multiple times
or not at all.
Side-effects occur when tf.functions are called the first time.
Subsequent calls with similar arguments execute the graph instead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 7 / 32
16. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code Using a Counter
1 class Model(tf.Module):
2 def __init__(self):
3 self.v = tf.Variable(0)
4 self.counter = 0
5
6 @tf.function
7 def __call__(self):
8 if self.counter == 0:
9 self.counter += 1
10 self.v.assign_add(1)
11 return self.v
12 m = Model()
13 for n in range(3):
14 print(m().numpy())
Output (expecting 1, 1, 1):
1
2
3
A model uses a counter to safeguard a variable incrementation.
The initial value of counter (line 4), however, is captured during
tracing upon the first model invocation (line 14).
Variable v is incremented unconditionally (line 10) each time the
model is invoked.
Such problems are common in migrating to graph execution.
Can result in suspicious numerical results or lower performance.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 8 / 32
17. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code Using a Counter
1 class Model(tf.Module):
2 def __init__(self):
3 self.v = tf.Variable(0)
4 self.counter = 0
5
6 @tf.function
7 def __call__(self):
8 if self.counter == 0:
9 self.counter += 1
10 self.v.assign_add(1)
11 return self.v
12 m = Model()
13 for n in range(3):
14 print(m().numpy())
Output (expecting 1, 1, 1):
1
2
3
A model uses a counter to safeguard a variable incrementation.
The initial value of counter (line 4), however, is captured during
tracing upon the first model invocation (line 14).
Variable v is incremented unconditionally (line 10) each time the
model is invoked.
Such problems are common in migrating to graph execution.
Can result in suspicious numerical results or lower performance.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 8 / 32
18. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code Using a Counter
1 class Model(tf.Module):
2 def __init__(self):
3 self.v = tf.Variable(0)
4 self.counter = 0
5
6 @tf.function
7 def __call__(self):
8 if self.counter == 0:
9 self.counter += 1
10 self.v.assign_add(1)
11 return self.v
12 m = Model()
13 for n in range(3):
14 print(m().numpy())
Output (expecting 1, 1, 1):
1
2
3
A model uses a counter to safeguard a variable incrementation.
The initial value of counter (line 4), however, is captured during
tracing upon the first model invocation (line 14).
Variable v is incremented unconditionally (line 10) each time the
model is invoked.
Such problems are common in migrating to graph execution.
Can result in suspicious numerical results or lower performance.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 8 / 32
19. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code Using a Counter
1 class Model(tf.Module):
2 def __init__(self):
3 self.v = tf.Variable(0)
4 self.counter = 0
5
6 @tf.function
7 def __call__(self):
8 if self.counter == 0:
9 self.counter += 1
10 self.v.assign_add(1)
11 return self.v
12 m = Model()
13 for n in range(3):
14 print(m().numpy())
Output (expecting 1, 1, 1):
1
2
3
A model uses a counter to safeguard a variable incrementation.
The initial value of counter (line 4), however, is captured during
tracing upon the first model invocation (line 14).
Variable v is incremented unconditionally (line 10) each time the
model is invoked.
Such problems are common in migrating to graph execution.
Can result in suspicious numerical results or lower performance.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 8 / 32
20. Introduction Motivation Approach Methodology Results Conclusion
Imperative TensorFlow Code Using a Counter
1 class Model(tf.Module):
2 def __init__(self):
3 self.v = tf.Variable(0)
4 self.counter = 0
5
6 @tf.function
7 def __call__(self):
8 if self.counter == 0:
9 self.counter += 1
10 self.v.assign_add(1)
11 return self.v
12 m = Model()
13 for n in range(3):
14 print(m().numpy())
Output (expecting 1, 1, 1):
1
2
3
A model uses a counter to safeguard a variable incrementation.
The initial value of counter (line 4), however, is captured during
tracing upon the first model invocation (line 14).
Variable v is incremented unconditionally (line 10) each time the
model is invoked.
Such problems are common in migrating to graph execution.
Can result in suspicious numerical results or lower performance.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 8 / 32
21. Introduction Motivation Approach Methodology Results Conclusion
Developer Burden
When migrating imperative DL code to graph execution, developers are
burdened with:
Making their code compatible with the underlying execution model.
Manually specifying which functions that should be converted.
Issues
When and where should @tf.function should be applied?
Calling tf.functions recursively could cause infinite loops.
Even if a recursion seems to work, the tf.function will be traced
multiple times (“retracing”) potentially impacting performance.
Using @tf.function on small computations can be dominated by graph
creation overhead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 9 / 32
22. Introduction Motivation Approach Methodology Results Conclusion
Developer Burden
When migrating imperative DL code to graph execution, developers are
burdened with:
Making their code compatible with the underlying execution model.
Manually specifying which functions that should be converted.
Issues
When and where should @tf.function should be applied?
Calling tf.functions recursively could cause infinite loops.
Even if a recursion seems to work, the tf.function will be traced
multiple times (“retracing”) potentially impacting performance.
Using @tf.function on small computations can be dominated by graph
creation overhead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 9 / 32
23. Introduction Motivation Approach Methodology Results Conclusion
Developer Burden
When migrating imperative DL code to graph execution, developers are
burdened with:
Making their code compatible with the underlying execution model.
Manually specifying which functions that should be converted.
Issues
When and where should @tf.function should be applied?
Calling tf.functions recursively could cause infinite loops.
Even if a recursion seems to work, the tf.function will be traced
multiple times (“retracing”) potentially impacting performance.
Using @tf.function on small computations can be dominated by graph
creation overhead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 9 / 32
24. Introduction Motivation Approach Methodology Results Conclusion
Developer Burden
When migrating imperative DL code to graph execution, developers are
burdened with:
Making their code compatible with the underlying execution model.
Manually specifying which functions that should be converted.
Issues
When and where should @tf.function should be applied?
Calling tf.functions recursively could cause infinite loops.
Even if a recursion seems to work, the tf.function will be traced
multiple times (“retracing”) potentially impacting performance.
Using @tf.function on small computations can be dominated by graph
creation overhead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 9 / 32
25. Introduction Motivation Approach Methodology Results Conclusion
Developer Burden
When migrating imperative DL code to graph execution, developers are
burdened with:
Making their code compatible with the underlying execution model.
Manually specifying which functions that should be converted.
Issues
When and where should @tf.function should be applied?
Calling tf.functions recursively could cause infinite loops.
Even if a recursion seems to work, the tf.function will be traced
multiple times (“retracing”) potentially impacting performance.
Using @tf.function on small computations can be dominated by graph
creation overhead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 9 / 32
26. Introduction Motivation Approach Methodology Results Conclusion
Developer Burden
When migrating imperative DL code to graph execution, developers are
burdened with:
Making their code compatible with the underlying execution model.
Manually specifying which functions that should be converted.
Issues
When and where should @tf.function should be applied?
Calling tf.functions recursively could cause infinite loops.
Even if a recursion seems to work, the tf.function will be traced
multiple times (“retracing”) potentially impacting performance.
Using @tf.function on small computations can be dominated by graph
creation overhead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 9 / 32
27. Introduction Motivation Approach Methodology Results Conclusion
Developer Burden
When migrating imperative DL code to graph execution, developers are
burdened with:
Making their code compatible with the underlying execution model.
Manually specifying which functions that should be converted.
Issues
When and where should @tf.function should be applied?
Calling tf.functions recursively could cause infinite loops.
Even if a recursion seems to work, the tf.function will be traced
multiple times (“retracing”) potentially impacting performance.
Using @tf.function on small computations can be dominated by graph
creation overhead.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 9 / 32
28. Introduction Motivation Approach Methodology Results Conclusion
Using Hybridization Parameters
1 model = SequentialModel()
2 res1 = model(tf.constant([1, 2, 3]))
3 res2 = model(tf.constant([1, 2, 3, 4, 5]))
WARNING: 5 out of the last 5
calls triggered
tf.function retracing.
Tracing is expensive.
,
→
,
→
,
→
Listing: DL model client code using varying datasets.
Decorating the correct function but with incorrect decorator
arguments may result in performance degradation.
Retracing helps ensure that the correct graphs are generated for
each set of inputs.
Excessive retracing may cause code to run more slowly had
tf.function not been used.
Invoking a model multiple times using different datasets produces
the warning on the right.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 10 / 32
29. Introduction Motivation Approach Methodology Results Conclusion
Using Hybridization Parameters
1 model = SequentialModel()
2 res1 = model(tf.constant([1, 2, 3]))
3 res2 = model(tf.constant([1, 2, 3, 4, 5]))
WARNING: 5 out of the last 5
calls triggered
tf.function retracing.
Tracing is expensive.
,
→
,
→
,
→
Listing: DL model client code using varying datasets.
Decorating the correct function but with incorrect decorator
arguments may result in performance degradation.
Retracing helps ensure that the correct graphs are generated for
each set of inputs.
Excessive retracing may cause code to run more slowly had
tf.function not been used.
Invoking a model multiple times using different datasets produces
the warning on the right.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 10 / 32
30. Introduction Motivation Approach Methodology Results Conclusion
Using Hybridization Parameters
1 model = SequentialModel()
2 res1 = model(tf.constant([1, 2, 3]))
3 res2 = model(tf.constant([1, 2, 3, 4, 5]))
WARNING: 5 out of the last 5
calls triggered
tf.function retracing.
Tracing is expensive.
,
→
,
→
,
→
Listing: DL model client code using varying datasets.
Decorating the correct function but with incorrect decorator
arguments may result in performance degradation.
Retracing helps ensure that the correct graphs are generated for
each set of inputs.
Excessive retracing may cause code to run more slowly had
tf.function not been used.
Invoking a model multiple times using different datasets produces
the warning on the right.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 10 / 32
31. Introduction Motivation Approach Methodology Results Conclusion
Using Hybridization Parameters
1 model = SequentialModel()
2 res1 = model(tf.constant([1, 2, 3]))
3 res2 = model(tf.constant([1, 2, 3, 4, 5]))
WARNING: 5 out of the last 5
calls triggered
tf.function retracing.
Tracing is expensive.
,
→
,
→
,
→
Listing: DL model client code using varying datasets.
Decorating the correct function but with incorrect decorator
arguments may result in performance degradation.
Retracing helps ensure that the correct graphs are generated for
each set of inputs.
Excessive retracing may cause code to run more slowly had
tf.function not been used.
Invoking a model multiple times using different datasets produces
the warning on the right.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 10 / 32
32. Introduction Motivation Approach Methodology Results Conclusion
Limiting Retracing
To fix the problem, specify an input_signature in the model code:
Example
@tf.function(input_signature=(tf.TensorSpec(shape=[None],
dtype=tf.int32),))
,
→
A [None] dimension in the tf.TensorSpec allows for flexibility in
trace (graph) reuse.
Since tensors are matched on their shape, a None wild card allows
tf.functions to reuse traces for variably-sized input.
Can occur when sequences or images are of different lengths or sizes,
respectively.
Since each call no longer produces a trace, the warning disappears
and the performance bottleneck is averted.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 11 / 32
33. Introduction Motivation Approach Methodology Results Conclusion
Limiting Retracing
To fix the problem, specify an input_signature in the model code:
Example
@tf.function(input_signature=(tf.TensorSpec(shape=[None],
dtype=tf.int32),))
,
→
A [None] dimension in the tf.TensorSpec allows for flexibility in
trace (graph) reuse.
Since tensors are matched on their shape, a None wild card allows
tf.functions to reuse traces for variably-sized input.
Can occur when sequences or images are of different lengths or sizes,
respectively.
Since each call no longer produces a trace, the warning disappears
and the performance bottleneck is averted.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 11 / 32
34. Introduction Motivation Approach Methodology Results Conclusion
Limiting Retracing
To fix the problem, specify an input_signature in the model code:
Example
@tf.function(input_signature=(tf.TensorSpec(shape=[None],
dtype=tf.int32),))
,
→
A [None] dimension in the tf.TensorSpec allows for flexibility in
trace (graph) reuse.
Since tensors are matched on their shape, a None wild card allows
tf.functions to reuse traces for variably-sized input.
Can occur when sequences or images are of different lengths or sizes,
respectively.
Since each call no longer produces a trace, the warning disappears
and the performance bottleneck is averted.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 11 / 32
35. Introduction Motivation Approach Methodology Results Conclusion
Limiting Retracing
To fix the problem, specify an input_signature in the model code:
Example
@tf.function(input_signature=(tf.TensorSpec(shape=[None],
dtype=tf.int32),))
,
→
A [None] dimension in the tf.TensorSpec allows for flexibility in
trace (graph) reuse.
Since tensors are matched on their shape, a None wild card allows
tf.functions to reuse traces for variably-sized input.
Can occur when sequences or images are of different lengths or sizes,
respectively.
Since each call no longer produces a trace, the warning disappears
and the performance bottleneck is averted.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 11 / 32
36. Introduction Motivation Approach Methodology Results Conclusion
Hybridization Alternatives
Alternatives to hybridization exists, e.g., JANUS [Jeong et al., 2019].
Require custom Python interpreters,
May be impractical for industry.
Support only specific Python constructs.
Must be updated with new language versions for consistency.
Python, for example, has historically underwent major revisions.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 12 / 32
37. Introduction Motivation Approach Methodology Results Conclusion
Motivation
Knowledge gap in how hybridization is used in real-world DL
applications.
Challenges in successfully applying hybridization are underexplored.
Without such insight, DL systems may be inefficient, fallible, and
difficult to maintain.
Insight
Advances in DL are likely to be futile if they cannot be effectively used.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 13 / 32
38. Introduction Motivation Approach Methodology Results Conclusion
Approach
Empirical study on common development challenges in migrating
imperative DL code to graph execution using hybridization in
open-source DL systems.
Discover bug patterns and corresponding challenges involved in
writing reliable yet performant imperative DL code.
Focus on hybridization in TensorFlow.
Implications
Help drive:
New automated migration techniques.
IDE code completion.
Automated (data science-specific) refactoring mining approaches,
e.g., RefactoringMiner 2.0 [Tsantalis et al., 2020].
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 14 / 32
39. Introduction Motivation Approach Methodology Results Conclusion
Advance knowledge of this emerging yet pervasive hybrid paradigm.
Provide feedback to language and API designers for future API
versions.
Help tool designers comprehend difficulties with writing performant
imperative DL code.
Propose preliminary recommendations, best practices, and
anti-patterns for practitioners in using hybridization effectively.
Assist educators in teaching hybridization APIs.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 15 / 32
40. Introduction Motivation Approach Methodology Results Conclusion
Subject DL Systems
Analyzed occurrences of tf.function in 250 Python DL projects:
19.7 MLOC.
470 manually examined code patches (Git commits).
446 manually examined bug reports (GitHub issues).
Vary widely in domain, application, size, and popularity.
Non-trivial GitHub metrics (stars, forks, collaborators).
Mix of DL libraries, frameworks, and applications.
Used in previous studies or in a DS dataset [Biswas et al., 2019].
Non-trivial portion involving DL.
Include projects from Apache, Apple, Google, and NVIDIA.
Also include lesser-known repositories.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 16 / 32
41. Mining for Changesets and GitHub Issues
Mined repositories for:
Git commits whose
changeset contains
tf.function.
GitHub issues mentioning
“tf.function.”
Hybridization relatively new.
tf.function released on
Sep 30, 2019.
Changesets
Used gitcproc [Casalnuovo et al., 2017] to classify Git commit
changesets (patches) representing hybridization bug fixes using NLP.
GitHub Issues
Used standard GitHub search API.
Filtered issues containing irrelevant discussion using a model.
42. Introduction Motivation Approach Methodology Results Conclusion
Manual Examination
Git Commits
Manually examined all commits.
Utilized referenced bug reports
and commit log messages.
GitHub Issues
Randomly selected a subset of
issues to manually examine.
Favored issues containing code
snippets.
Studied changesets and GitHub issues to determine hybridization
bugs and usage challenge categories.
Contacted developers for clarification.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 18 / 32
43. Introduction Motivation Approach Methodology Results Conclusion
Table: Studied subjects.
subj KLOC studied periods cmts/iss kws exe
fixes 122 10,879 2015-11-06 to 2021-01-14 199,140 470 470
reports 167 17,378 2012-05-07 to 2021-08-11 237,232 704 446
Total 250*
19,677*
2012-05-07 to 2021-08-11 436,372 1,174 916
*
Represents unique totals due to subject overlap between the study portions.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 19 / 32
44. Introduction Motivation Approach Methodology Results Conclusion
Table: Studied subjects.
subj KLOC studied periods cmts/iss kws exe
fixes 122 10,879 2015-11-06 to 2021-01-14 199,140 470 470
reports 167 17,378 2012-05-07 to 2021-08-11 237,232 704 446
Total 250*
19,677*
2012-05-07 to 2021-08-11 436,372 1,174 916
*
Represents unique totals due to subject overlap between the study portions.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 19 / 32
45. Introduction Motivation Approach Methodology Results Conclusion
Table: Studied subjects.
subj KLOC studied periods cmts/iss kws exe
fixes 122 10,879 2015-11-06 to 2021-01-14 199,140 470 470
reports 167 17,378 2012-05-07 to 2021-08-11 237,232 704 446
Total 250*
19,677*
2012-05-07 to 2021-08-11 436,372 1,174 916
*
Represents unique totals due to subject overlap between the study portions.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 19 / 32
46. Introduction Motivation Approach Methodology Results Conclusion
Quantitative Analysis
Manually examined 916 commits/GitHub issues.
Found 280 hybridization challenges (bug fixes/reported issues).
Devised a challenge category hierarchy—in part—by using
TensorFlow documentation.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 20 / 32
48. Introduction Motivation Approach Methodology Results Conclusion
Table: Discovered top-level problem categories.
problem abbr cmts iss total
Performance PRF 74 37 111
API misuse APM 23 30 53
Incompatibility INC 16 33 49
TensorFlow bug TFB 4 18 22
Other OTH 14 2 16
Unknown UKN 10 0 10
Test TST 8 0 8
Debuggability DBG 4 2 6
Exposed variable state EVS 1 1 2
Compilation error CMP 1 0 1
Numerical errors NME 1 0 1
Segmentation fault SEG 1 0 1
Total 157 123 280
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 22 / 32
49. Introduction Motivation Approach Methodology Results Conclusion
Findings Summary I
Hybridization
1 Is prone to API misuse.
2 Can result in performance degradation—the opposite of its intention.
3 Has limited application due to execution mode incompatibility.
At 39.64% (111/280), performance problems was the largest category
involving tf.function usage.
Despite its intent to improve code performance, in 7.21% (8/111) of
cases, tf.function caused performance degradation.
Only 54.95% (61/111) of imperative DL code performance problems
were fixed by adding @tf.function.
The remaining 45.05% were due to existing usages of tf.function.
25.23% of performance fixes involve altering developer-supplied
arguments to tf.function(...).
18.92% of performance problems involve incorrect input tensor
shape specifications.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 23 / 32
50. Introduction Motivation Approach Methodology Results Conclusion
Findings Summary II
At 18.93%, API misuse—using tf.function inconsistently w.r.t. its
documentation—was the second largest problem category.
37.74% (20/53) of API misuse was caused by developers not
understanding how to use hybridization APIs correctly.
To fix API misuse, tf.function was removed in 28.30% of cases.
In 46.67% of these cases, developers abandoned hybridization due to
API confusion, of which 62.50% resulted in run-time errors.
Execution mode incompatibility—at 17.50% (49/280)—was the third
largest problem category.
Developers struggle to seamlessly use similar constructs between
different modes.
81.63% of incompatibility problems lead to run-time errors or
unexpected results.
Do not surface until after running the code.
TensorFlow bugs made up 7.86% of discovered problems.
Developers were offered a workaround or waited for a new framework
version.
9.09% of these involve deadlocks.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 24 / 32
51. Qualitative Analysis I
Performance
1 + @tf.function
2 def pm(linear):
3 state = lpt_init(linear, a0=0.1, order=1)
4 final_state = nbody(state, stages, nc)
5 tfinal_field = cic_paint(tf.zeros_like(linear), final_state[0])
6 return tfinal_field
pm() is decorated with @tf.function (line 1).
Using tf.function “ensure[s] that the graph for [a] function is
compiled once and not every time it is called, thus gaining in speed
and performance” [Modi, 2021].
Best Practice
Favor @tf.function on Python functions containing imperative,
otherwise eagerly-executed, DL code to improve performance.
52. Qualitative Analysis II
https://github.com/tensorflow/addons/pull/2264
Developers struggle to enhance performance using hybridization.
“. . . it does far too much hidden magic . . .” [Roberts, 2020].
Retracing can cause worse performance than not using hybridization.
One problem is related to hybridizing inner functions (above).
The fix involved moving @tf.function to the top-level function,
making it run ∼25%–40% faster.
The root cause was that nested functions are uncachable.
Function nesting is a common Python modularity mechanism!
Anti-Pattern
Hybridizing nested functions may cause performance degradation.
Sacrifice modularity by hybridizing top-level function or refactoring to top.
53. Qualitative Analysis III
Input Signatures
1 - @tf.function
2 + @tf.function(input_signature=[
3 + tf.TensorSpec(shape=(None, self.num_states), dtype=tf.float32),
4 + tf.TensorSpec(shape=(None, self.num_actions), dtype=tf.float32),
5 + tf.TensorSpec(shape=(None, 1), dtype=tf.float32),
6 + tf.TensorSpec(shape=(None, self.num_states), dtype=tf.float32),])
7 def update_weights(s, a, r, sn): # ...
Arguments to tf.function(), particularly involving input tensor
shapes, may also influence performance.
An underspecified input signature—one of the most used
tf.function parameters that we observed.
On lines 2–6, a performance regression was fixed by adding an
input_signature to a weight distribution tf.function to “make
sure it does not recreate graph, which will slow down training
significantly” [Koesnadi, 2021].
The sequence of tf.TensorSpecs specifies the intended tensor shapes
and data types (dtypes) that will be supplied to update_weights().
54. Qualitative Analysis IV
Otherwise, a separate (concrete) function (graph) is instantiated for
each inferred input signature, which—depending on context—may
result in retracing.
Best Practice
If possible, supply an input_signature argument to tf.function with
the intended shape and types of any input tensors to avert retracing—a
practice similar to that of providing type annotations to variables in
dynamic languages to assist with type inferencing.
55. Introduction Motivation Approach Methodology Results Conclusion
More Preliminary Best Practices
When an operation is deemed incompatible with hybridization, check
the documentation to see if additional steps are required to make
the imperative DL code more amenable to graph conversion.
Framework limitations may impede performance enhancements.
Check for potential workarounds of (unresolved) TensorFlow bugs.
Use tf.config.run_functions_eagerly(True) to temporarily
disable tf.function to facilitate debugging.
More details in the paper! http://arxiv.org/abs/2201.09953
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 29 / 32
56. Introduction Motivation Approach Methodology Results Conclusion
Conclusion
Studied hybridization bugs and challenges in migrating imperative
DL code to graph execution.
1 Despite the purpose of hybridization, care must be taken to avoid
performance degradation.
2 Not all imperative DL code is amenable to graph conversion.
3 Must be cognizant of which code is running in graph mode and
which is not.
Future Work
Analyze alternative developer resources, e.g., Stack Overflow.
Develop automated refactoring approaches.
Integrate our results into automated refactoring detection
techniques.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 30 / 32
57. Introduction Motivation Approach Methodology Results Conclusion
For Further Reading I
Abadi, Martı́n et al. (2016). “TensorFlow: A System for Large-Scale Machine Learning”. In: Symposium on Operating Systems
Design and Implementation.
Agrawal, Akshay et al. (2019). TensorFlow Eager: A Multi-Stage, Python-Embedded DSL for Machine Learning. arXiv:
1903.01855 [cs.PL].
Apache (Apr. 8, 2021). Hybridize. Apache MXNet documentation. url:
https://mxnet.apache.org/versions/1.8.0/api/python/docs/tutorials/packages/gluon/blocks/hybridize.html (visited
on 04/08/2021).
Arpteg, A., B. Brinne, L. Crnkovic-Friis, and J. Bosch (2018). “Software Engineering Challenges of Deep Learning”. In: Euromicro
Conference on Software Engineering and Advanced Applications. IEEE, pp. 50–59. doi: 10.1109/SEAA.2018.00018.
Biswas, S., M. J. Islam, Y. Huang, and H. Rajan (2019). “Boa Meets Python: A Boa Dataset of Data Science Software in Python
Language”. In: Mining Software Repositories, pp. 577–581. doi: 10.1109/MSR.2019.00086.
Casalnuovo, Casey, Yagnik Suchak, Baishakhi Ray, and Cindy Rubio-González (2017). “GitcProc: A tool for processing and
classifying GitHub commits”. In: International Symposium on Software Testing and Analysis. ISSTA ’17. ACM, pp. 396–399. doi:
10.1145/3092703.3098230.
Chen, Tianqi, Mu Li, Yutian Li, Min Lin, Naiyan Wang, Minjie Wang, Tianjun Xiao, Bing Xu, Chiyuan Zhang, and Zheng Zhang
(2015). “MXNet: A Flexible and Efficient Machine Learning Library for Heterogeneous Distributed Systems”. In: Workshop on
Machine Learning Systems at NIPS. arXiv: 1512.01274 [cs.DC].
Chollet, François (2020). Deep Learning with Python. 2nd ed. Manning.
Facebook Inc. (2019). PyTorch Documentation. TorchScript. en. url: https://pytorch.org/docs/stable/jit.html (visited on
02/19/2021).
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 31 / 32
58. Introduction Motivation Approach Methodology Results Conclusion
For Further Reading II
Jeong, Eunji, Sungwoo Cho, Gyeong-In Yu, Joo Seong Jeong, Dong-Jin Shin, Taebum Kim, and Byung-Gon Chun (July 2019).
“Speculative Symbolic Graph Execution of Imperative Deep Learning Programs”. In: SIGOPS Oper. Syst. Rev. 53.1, pp. 26–33.
issn: 0163-5980. doi: 10.1145/3352020.3352025.
Koesnadi, Samuel Matthew (Feb. 26, 2021). Fixed all . . . this should work. samuelmat19/DDPG-tf2. 02a3f29. ML6. url:
https://github.com/samuelmat19/DDPG-tf2/commit/02a3f297#r47584455 (visited on 01/12/2022).
Modi, Chirag (Apr. 16, 2021). bug boxsize=nc. modichirag/galference. af1664e. UC Berkeley. url: https://git.io/J9ciM
(visited on 01/10/2022).
Moldovan, Dan, James M. Decker, Fei Wang, Andrew A. Johnson, Brian K. Lee, Zachary Nado, D. Sculley, Tiark Rompf, and
Alexander B. Wiltschko (2019). AutoGraph: Imperative-style Coding with Graph-based Performance. arXiv: 1810.08061 [cs.PL].
Paszke, Adam et al. (Dec. 3, 2019). PyTorch: An Imperative Style, High-Performance Deep Learning Library. arXiv: 1912.01703
[cs.LG].
Roberts, Chase (May 26, 2020). Added jitted ncon. Pull Request #623. google/TensorNetwork. Xanadu. url:
https://git.io/J9cMx (visited on 01/10/2022).
Tsantalis, Nikolaos, Ameya Ketkar, and Danny Dig (2020). “RefactoringMiner 2.0”. In: IEEE Trans. Softw. Eng. doi:
10.1109/TSE.2020.3007722.
Zhou, Weijie, Yue Zhao, Guoqiang Zhang, and Xipeng Shen (2020). “HARP: Holistic Analysis for Refactoring Python-Based
Analytics Programs”. In: International Conference on Software Engineering, pp. 506–517. doi: 10.1145/3377811.3380434.
Tatiana Castro Vélez, Raffi Khatchadourian, Mehdi Bagherzadeh, Anita Raja Challenges in Migrating Imperative DL Programs to Graphs 32 / 32