Skip to main content

Service Difficult Report (SDR) hazards classification package

:rocket: This is the source code for the SDR Classifier package that classifies potential aviation safety hazards from textual data. The work is a collaboration between FAA and Boeing data scientist teams, and these models aim to assist analysts in Continued Operational Safety (COS) processes.

SDRs are submitted via the service difficulty reporting system operators or certified repair stations as a means to document and share information with the aviation community about failures, malfunctions, or defects of aeronautical products. The free-form text description field often contains valuable COS-related information, however it lacks predictable grammatical structure and is not in any way standardized. Additionally, it can contain typographical errors, part numbers, abbreviations, and references to specific sections of maintenance manuals or operating procedures, making it difficult to reliably extract this information with regular expressions or language models designed to take in clean, full sentences as input.

Each of these COS classification models was trained to pick up on all of the variation described above for a specific COS criterion. Subject matter experts (SMEs) annotated hundreds of SDR records for training and testing of each model, and those datasets are available here alongside the code to train, test, and invoke the models.

Version 0.1.1 out now! Check out the release notes here.

tests Current Release Version pypi Version Python wheels PyPi downloads Boeing on Twitter

Demo

Virtual Environment

It is highly recommended to use venv, virtualenv or conda python environments. Read more about creating virtual environments via venv https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments

Build and pip install the whl file locally

Run the command in the root folder to create the whl file in the dist folder

git clone https://github.com/Boeing/sdr-hazards-classification
python setup.py bdist_wheel
pip install ./distr/sdr_hazards_classification-0.1.0-py3-none-any.whl

Install sdr_hazards_classification from Pypi with pip

pip install sdr_hazards_classification

Contributing

🛩️ Please follow the contribution guideline

Example

:airplane: Follow the code snippet below to test and call the prediction method from the Depressurization model

from sdr_hazards_classification.sdr_api import SdrInferenceAPI, CORROSION_LIMIT, DEGRADED_CONTROLLABILITY
import pandas as pd

depressurization_model = SdrInferenceAPI()

#test the prediction method
depressurization_model.test_sdr_depressurization_predictions()

event_text = """Lost cabin pressurization at flight level 30000, cabin altitude warning horn sounded at 10000 feet. Unabel to control
                cabin pressure with outflow valve closed"""
pred, probs = depressurization_model.get_predictions([event_text])

degraded_controllability_model = SdrInferenceAPI(DEGRADED_CONTROLLABILITY)
degraded_controllability_model.test_sdr_degraded_controllability()

df = pd.read_csv('./src/sdr_classifier/data/SDR_Example.csv')
records = df["Text"]
#pass in a record list for prediction
pred, probs = depressurization_model.get_predictions(records)

df['Prediction'] = pred
df['Prob'] = probs

print(df.head(2))

print("Done")

References

Open Access Data via the FAA's Service Difficulty Reporting System

FAA Deployment Demo on YouTube

SKYbrary Summary

Full Academic Paper on IEEE Xplore

Metadata

Release files for sdr-hazards-classification 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sdr-hazards-classification 1.0.0
File Size Uploaded
sdr_hazards_classification-1.0.0.tar.gz 13.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for sdr-hazards-classification 1.0.0
File Interpreter ABI Platform
sdr_hazards_classification-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.6 MB

Release files / sdr_hazards_classification-1.0.0.tar.gz

Download URL sdr_hazards_classification-1.0.0.tar.gz
Size 13.3 MB
Tags Source
SHA-256 checksum
How to use checksums
78fe25930a67406c01df153ef014a246c310a57ae75a0e5eec7f18301f16e474
BLAKE2b-256 checksum
How to use checksums
87ba0386796df46e81230305894d45ddf5301ebdf7002125e8ea1d46a7b94b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / sdr_hazards_classification-1.0.0-py3-none-any.whl

Download URL sdr_hazards_classification-1.0.0-py3-none-any.whl
Size 13.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9eb14710b48f5c59dd0e18ccec115ae7bbe41e7f7e9f4009142d3a2d1e930b0f
BLAKE2b-256 checksum
How to use checksums
7b09c409d768e9f32a1ea099b4ad9a77877d7b38bdbe8209b46ff95dc9254751
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page