BBVA AI Factory | Open-source Library
ES

Open-source Library

We contribute to the open-source community with Mercury, the BBVA Python library for Machine Learning and Data Science. Discover this comprehensive suite of tools designed to streamline the creation of AI models.
Start using Mercury Library
Title
Open-source
Exploring graph analytics with mercury-graph

Accelerate ML workflows

Mercury offers a range of tools and utilities that simplify and accelerate the creation of Machine Learning models, allowing experts to focus on the key aspects of their work.

Use it and contribute!

This library was originally an Inner Source project at BBVA, but now some assets are open-source! We welcome everyone to use and contribute to the library: together, we can improve it and make it more useful.

Powered by ML experts

We work to ensure that Mercury continues to grow and release new assets. The Mercury core team maintains the library updated and proactively develops new functionalities.

Mercury’s Micro-repositories

Mercury is structured with multiple micro-repositories in a highly modular design. These packages are available on Github, where you will also find installation instructions, documentation, and examples of how to use the library. Each repository is independent, but some have interdependencies. For example, mercury-robust uses mercury-dataschema and mercury-monitoring underneath.

01

mercury-dataschema →

Utility package that automatically infers feature types and calculates different statistics based on those types, given a Pandas DataFrame. It is very useful for validating whether different datasets match the same schema, or for using their statistics to calculate drift.

02

mercury-explainability →

Offers a collection of methods and techniques to interpret and inspect ML models. This package focuses on providing explanations for classification and regression models, both locally and globally, to gain a better understanding of how an ML model works and the factors that contribute to its predictions.

03

mercury-monitoring →

Package dedicated to model monitoring. It’s crucial to continuously monitor the performance of ML models in production. This involves detecting changes in the incoming data distribution or data drift and estimating the model accuracy at inference time.

04

mercury-reels →

A library to analyze sequences of events extracted from transactional data. These events can be automatically discovered or manually defined.

05

mercury-robust →

A lightweight framework for performing robust testing on ML models and datasets. It ensures that data workflows and models are robust against certain conditions, such as data drift, label leaking, or input data schema issues, by raising an exception when they fail.

06

mercury-settrie →

A Python library for creating, updating, and querying SetTrie objects efficiently. To ensure high performance, it uses an underlying C++ implementation, which optimizes subset and superset search operations.

07

mercury-graph →

This library offers graph analytics capabilities with a technology-agnostic API, enabling users to apply a curated range of performant and scalable algorithms and utilities regardless of the underlying data framework.

Mercury strengths

Each Mercury component brings something new or offers clear advantages over other available analytical solutions. The modules are functional and production-ready, and they are designed as pieces of code that are not tied to specific business cases, so anyone can use them.

From small utilities to complete frameworks

Some packages are designed to solve specific Data Science tasks, while others offer a diverse collection of Machine Learning functionalities through a unified API.

High-quality components

Every function or class in Mercury has been thoroughly tested and documented by a dedicated core team from BBVA.

The library is production-ready, meaning that it has been designed for deploying ML models in real-world environments.

Additionally, tutorials are provided to facilitate the adoption of the library.

Domain-specific

In Mercury, you may find a representative sample of relevant ML domains for financial services such as explainability, monitoring, or sequence modeling.

Collaborate with Mercury

If you want to discuss specific functionality within the scope of Mercury, please open an issue on GitHub. This approach enables focused, organized and visible discussions that may be useful for someone else. You can also contact us at mercury.team@bbva.com.
BBVA’s GITHUB

Our journey to open-source

The Mercury Python library was born as an Inner-Source project within BBVA. At the time, our primary objective was to streamline the use of code components among the bank’s technology teams, dispersed across different departments and countries. This initiative not only improved code quality –as more people could review, comment and document it–, but also strengthened a culture of community and knowledge sharing.

Now, going open-source, Mercury invites global software developers to use its components, share feedback, and contribute to its growth. We believe that making some of the work we do available to everyone makes us more transparent and demonstrates how we approach working with data. Mercury is our way of contributing back to the open-source community that has been pivotal in our success.

MORE ARTICLES ON OPEN-SOURCE