Skip to main content

A modular and open-source AI toolkit for time-series processing, aimed at fault detection and classification in oil well operation

Project description

Apache 2.0 Code style Versioning Coverage Status

3W Toolkit

Table of Contents
  1. About
  2. Architecture Overview
  3. 3W Dataset
  4. Installation & Setup
  5. Jupyter Notebooks & Examples
  6. Contributing

📘 About

The evolution of machine learning has been catalyzed by the rapid advancement in data acquisition systems, scalable storage, high-performance processing, and increasingly efficient model training through matrix-centric hardware (e.g., GPUs). These advances have enabled the deployment of highly parameterized AI models in real-world applications such as health care, finance, and industrial operations.

In the oil & gas sector, the widespread availability of low-cost sensors has driven a paradigm shift from reactive maintenance to condition-based monitoring (CBM), where faults are detected and classified during ongoing operation. This approach minimizes downtime and improves operational safety. The synergy between AI and big data analysis has thus enabled the development of generalizable classifiers that require minimal domain knowledge and can be effectively adapted to a wide range of operational scenarios.

In this context, we present 3WToolkit+, a modular and open-source AI toolkit for time-series processing, aimed at fault detection and classification in oil well operation. Building upon the experience with the original 3WToolkit system and leveraging the Petrobras 3W Dataset, 3WToolkit introduces enhanced functionalities, such as advanced data imputation, deep feature extraction, synthetic data augmentation, and high-performance computing capabilities for model training.

The development of the 3WToolkit+ is the result of a collaborative partnership between Petrobras, with a focus on the CENPES research center, and the COPPE/Universidade Federal do Rio de Janeiro (UFRJ). This joint effort brings together complementary strengths: COPPE/UFRJ contributes decades of proven expertise in signal processing and machine learning model development, while CENPES offers access to highly specialized technical knowledge and real-world operational challenges in the oil and gas sector. This synergy ensures that 3WToolkit+ is both scientifically rigorous and practically relevant, addressing complex scenarios with robust and scalable AI-based solutions for time-series analysis and fault detection in oil well operations.

🧩 Architecture Overview

The following image illustrates the high-level architecture of the 3W Toolkit, designed to support the full pipeline of machine learning applications using the 3W dataset. From raw data ingestion to model evaluation and delivery to end users.

The schema below illustrates the main classes of the toolkit.

To better understand how the system is organized, we can divide all classes into two main abstraction layers: Application and Core.

  • The Core layer contains all configuration (Config) classes. These classes define the parameters required by each functional module. In other words, they describe how each component should behave, specifying its inputs and parameters.

  • The Application layer contains the operational classes, which implement the actual logic for interacting with datasets, preprocessing tools, feature extraction, models, evaluation, visualization, and pipelines. These are the classes that you will uses in workflows.

📊 3W Dataset

The 3W dataset serves as a reference dataset for this project and is hosted on Figshare. However, the toolkit is not limited to the 3W dataset and can be adapted for other datasets as well.

Further details on the 3W dataset’s structure, preprocessing, and usage are available in the 3W_DATASET_STRUCTURE.md file.

⚙️ Installation & Setup

It is possible to perform the installation in different ways.

1. Fork or clone the repository
Option A: Fork

  1. Go to https://github.com/petrobras/3W
  2. Click “Fork” in the top-right corner to create a copy under your GitHub account.
  3. Clone your forked repository:
git clone git@github.com:<your-username>/3W.git

Option B: Clone

git clone git@github.com:petrobras/3W.git

2. Install the package
Option A: Using pip

pip install -e .

Option B: Using uv

uv venv .venv
source venv/bin/activate
uv pip install -e .

Option C: Using conda

conda env create -f environment.yml
conda activate 3W

🪐 Jupyter Notebooks & Examples

A curated set of ready-to-use jupyter notebooks that demonstrate how to use the toolkit to common fault detection tasks using the 3W dataset. These examples accelerate onboarding and reproducibility.

The set of notebooks can be found in the notebooks folder

🤝 Contributing

We welcome contributions to help us improve and expand the functionality of the 3W toolkit. To ensure a smooth collaboration process, please follow our contrubuting guidelines here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

threewtoolkit-3.2.0.tar.gz (98.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

threewtoolkit-3.2.0-py3-none-any.whl (130.8 kB view details)

Uploaded Python 3

File details

Details for the file threewtoolkit-3.2.0.tar.gz.

File metadata

  • Download URL: threewtoolkit-3.2.0.tar.gz
  • Upload date:
  • Size: 98.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for threewtoolkit-3.2.0.tar.gz
Algorithm Hash digest
SHA256 d639b5cb1682ba3907925522394dd4bae6b8db42bdeece2f4eb5ba53d30310bc
MD5 4673f4f46f8cebafbdbd597e8a5eb555
BLAKE2b-256 983bcd854d6141ede6e97ef6c1e53d465b5c977db57f54d3c1511e9c11ff62c3

See more details on using hashes here.

File details

Details for the file threewtoolkit-3.2.0-py3-none-any.whl.

File metadata

  • Download URL: threewtoolkit-3.2.0-py3-none-any.whl
  • Upload date:
  • Size: 130.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for threewtoolkit-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d77376e4b2ff66ad90dbd4a77b9a0ad1623d3cded0ad2e84e6730efe7788d6af
MD5 79a6c0095b2694493c297e8f7feaa33b
BLAKE2b-256 92e2b9d737065b7ec0afb3549d3048b10d1fecde2c3de21771c9894ef2d82d10

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page