Predict shall be replaced by an agentic pipeline that select the best scikit learn tools regarding function prototype and sample data.
Generated code will be stored in a file with the same name as the original python file except that .py is replaced by .oh.py.
Only the first call is handeled by the code generating agent. successive calls are directly routed to the generated code.
def test_emulate_math():
"""
Test the emulate function with a math operation.
The interesting part of this test is to check if the type detection works.
"""
def get_math_result(number: float) -> float:
"""
Returns the result of the following math operation:
number + 2.
Arguments:
- number (float): A number to add to 2.
Returns:
- float: The result of the addition.
"""
return emulate(pipeline=ScikitLearnGeneratorPipeline)
This answer the comment from INRIA about the usage of deep nural nets when not necessary.
INRIA Comment:
La fonction predict encapsule la création et l’entraînement de modèles de réseaux de neurones avec
PyTorch. Un utilisateur peut demander à générer un modèle de régression ou de classification, soit en
fournissant un jeu de données, soit en demandant à OpenHosta de générer un jeu de données
synthétiques via un LLM. La bibliothèque construit alors un modèle simple, l'entraîne et l'utilise pour
effectuer des prédictions. Cette fonctionnalité nous semble présenter un intérêt limité étant donné que
pour des tâches de régression ou de classification, des modèles statistiques non « deep » suffisent, et le
fait de « wrapper » ces fonctionnalités nous semble superflu (librairies python bien documentées et
relativement simples à utiliser). Un wrapper peut présenter l’intérêt de réduire le nombre de paramètres
à devoir régler, mais sans doute au détriment de la performance et de la maîtrise du modèle.
Predict shall be replaced by an agentic pipeline that select the best scikit learn tools regarding function prototype and sample data.
Generated code will be stored in a file with the same name as the original python file except that .py is replaced by .oh.py.
Only the first call is handeled by the code generating agent. successive calls are directly routed to the generated code.
This answer the comment from INRIA about the usage of deep nural nets when not necessary.
INRIA Comment: