Characterization and Automatic Updates of Deprecated Machine-Learning API Usages - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2021

Characterization and Automatic Updates of Deprecated Machine-Learning API Usages

Stefanus A Haryono
  • Fonction : Auteur
  • PersonId : 1074379
Ferdian Thung
  • Fonction : Auteur
  • PersonId : 1111930
David Lo
  • Fonction : Auteur
  • PersonId : 998134
Lingxiao Jiang
  • Fonction : Auteur
  • PersonId : 1111931

Résumé

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.
Fichier principal
Vignette du fichier
ICSME_2021_Research_Paper_MLCatchUp.pdf (280.43 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03361379 , version 1 (05-10-2021)

Identifiants

Citer

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⟩
43 Consultations
87 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More