EuroSciPy 2024

Janos Gabler

Author of optimagic / estimagic | Senior AI Researcher at appliedAI | Expert in numerical optimization | Building Bandsaws, Pizza Ovens and Furniture


Institute / Company

appliedAI Institute for Europe gGmbH

Homepage

janosg.com

Twitter handle

@JanosGabler

Git*hub|lab

https://github.com/janosg


Sessions

08-28
10:30
30min
From stringly typed to strongly typed: Insights from re-designing a library to get the most out of type hints
Janos Gabler

Many scientific Python packages are "stringly typed," i.e., using strings to select algorithms or methods and dictionaries for configuration. While easy for beginners and convenient for authors, these libraries miss out on static typing benefits like error detection before runtime and autocomplete. This talk shares insights from redesigning the optimagic library from the ground up with static typing in mind. Without compromising on simplicity, we achieve better static analysis, autocomplete, and fewer runtime errors. The insights are not specific to numerical optimization and apply to a wide range of scientific Python packages.

Community, Education, and Outreach
Room 6
08-29
10:30
30min
Optimagic: Can we unify Python's numerical optimization ecosystem?
Janos Gabler

Python has many high quality optimization algorithms but they are scattered across many different packages. Switching between packages is cumbersome and time consuming. Other languages are ahead of Python in this respect. For example, Optimization.jl provides a unified interface to more than 100 optimization algorithms and is widely accepted as a standard interface for optimization in Julia.

In this talk, we take stock of the existing optimization ecosystem in Python and analyze pain points and reasons why no single package has emerged as a standard so far. We use these findings to derive desirable features a Python optimization package would need to unify the ecosystem.

We then present optimagic, a NumFocus affiliated Project with the goal of unifying the Python optimization ecosystem. Optimagic provides a common interface to optimization algorithms from scipy, NlOpt, pygmo, and many other libraries. The minimize function feels familiar to users of scipy.optimize who are looking for a more extensive set of
supported optimizers. Advanced users can use optional arguments to configure every aspect of the optimization, create a persistent log file, turn local optimizers global with a multistart framework, and more.

Finally, we discuss an ambitious roadmap for improvements, new features, and planned community activities for optimagic.

Community, Education, and Outreach
Room 7