Skip to Main content Skip to Navigation
New interface
Conference papers

Characterization and Automatic Updates of Deprecated Machine-Learning API Usages

Abstract : Due to the rise of AI applications, machine learning (ML) libraries, often written in Python, have become far more accessible. ML libraries tend to be updated periodically, which may deprecate existing APIs, making it necessary for application developers to update their usages. In this paper, we build a tool to automate deprecated API usage updates. We first present an empirical study to better understand how updates of deprecated ML API usages in Python can be done. The study involves a dataset of 112 deprecated APIs from Scikit-Learn, TensorFlow, and PyTorch. Guided by the findings of our empirical study, we propose MLCatchUp, a tool to automate the updates of Python deprecated API usages, that automatically infers the API migration transformation through comparison of the deprecated and updated API signatures. These transformations are expressed in a Domain Specific Language (DSL). We evaluate MLCatchUp using a dataset containing 267 files with 551 API usages that we collected from public GitHub repositories. In our dataset, MLCatchUp can detect deprecated API usages with perfect accuracy, and update them correctly for 80.6% of the cases. We further improve the accuracy of MLCatchUp in performing updates by adding a feature that allows it to accept an additional user input that specifies the transformation constraints in the DSL for context-dependent API migration. Using this addition, MLCatchUp can make correct updates for 90.7% of the cases.
Document type :
Conference papers
Complete list of metadata
Contributor : Julia Lawall Connect in order to contact the contributor
Submitted on : Tuesday, October 5, 2021 - 10:03:33 AM
Last modification on : Tuesday, October 25, 2022 - 4:21:50 PM
Long-term archiving on: : Thursday, January 6, 2022 - 6:12:16 PM


Files produced by the author(s)



Stefanus A Haryono, Ferdian Thung, David Lo, Julia Lawall, Lingxiao Jiang. Characterization and Automatic Updates of Deprecated Machine-Learning API Usages. ICSME 2021 - IEEE International Conference on Software Maintenance and Evolution, Sep 2021, Luxembourg City / Virtual, Luxembourg. ⟨10.1109/ICSME52107.2021.00019⟩. ⟨hal-03361379⟩



Record views


Files downloads