Skip to main content

Library of common types, protocols (a.k.a. structural subtypes), and utilities to support AI test and evaluation

Project description

MAITE (Modular AI Trustworthy Engineering)

Python version support Code Coverage Type-Completeness Score Tested with Hypothesis

A toolbox of common types, protocols, and tooling to support AI test and evaluation workflows.

Check out the documentation and examples for more information.

MAITE is a library of common types, protocols (a.k.a. structural subtypes), and utilities for the test and evaluation (T&E) of supervised machine learning models. It is being developed under the Joint AI T&E Infrastructure Capability (JATIC) program. Its goal is to streamline the development of JATIC Python projects by ensuring seamless, synergistic workflows when working with MAITE-conforming Python packages for different T&E tasks. To this end, MAITE seeks to eliminate redundancies that would otherwise be shared across – and burden – separate efforts in machine learning test and evaluation. MAITE is designed to be a low-dependency, frequently-improved Python package that is installed by JATIC projects. The following is a brief overview of the current state of its submodules.

Installation

From Python Package Index (PyPI)

To install from the Python Package Index (PyPI), run:

pip install maite

:information_source: You can install MAITE for a given release tag, e.g. v0.6.1, by running:

$ pip install git+ssh://git@github.com/mit-ll-ai-technology/maite.git@v0.6.1

From Source

To clone this repository and install from source, run:

$ git clone https://github.com/mit-ll-ai-technology/maite
$ cd maite
$ pip install .

maite.protocols

Common types for machine learning test and evaluation

The protocols subpackage defines common types – such as an inference-mode object detector – to be leveraged across JATIC projects. These are specifically designed to be Python protocol classes, which support structural subtyping. As a result, developers and users can satisfy MAITE-typed interfaces without having to explicitly subclass. This ability helps to promote common interfaces across JATIC projects without introducing explicit inter-dependencies between them.

Pyright Static Type Checking in Code

>>> def f(x: str):
...     return 1 + x
>>> pyright_analyze(f)
{'version': '1.1.281',
  'time': '1669686515154',
  'generalDiagnostics': [{'file': 'source.py',
    'severity': 'error',
    'message': 'Operator "+" not supported for types "Literal[1]" and "str"\n\xa0\xa0Operator "+" not supported for types "Literal[1]" and "str"',
    'range': {'start': {'line': 1, 'character': 11},
    'end': {'line': 1, 'character': 16}},
    'rule': 'reportGeneralTypeIssues'}],
  'summary': {'filesAnalyzed': 20,
  'errorCount': 1,
  'warningCount': 0,
  'informationCount': 0,
  'timeInSec': 0.319}}

maite.utils

General utilities

  • Functions for validating the types and values of user arguments, with explicit and consistent user-error messages, that raise MAITE-customized exceptions.
  • Specialized PyTorch utilities to help facilitate safe and ergonomic code patterns for manipulating stateful torch objects
  • Other quality assurance and convenience functions that may be widely useful across projects

Disclaimer

DISTRIBUTION STATEMENT A. Approved for public release. Distribution is unlimited.

© 2024 MASSACHUSETTS INSTITUTE OF TECHNOLOGY

  • Subject to FAR 52.227-11 – Patent Rights – Ownership by the Contractor (May 2014)
  • SPDX-License-Identifier: MIT

This material is based upon work supported by the Under Secretary of Defense for Research and Engineering under Air Force Contract No. FA8702-15-D-0001. Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Under Secretary of Defense for Research and Engineering.

The software/firmware is provided to you on an As-Is basis

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

maite-0.9.1.tar.gz (84.8 kB view details)

Uploaded Source

Built Distribution

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

maite-0.9.1-py3-none-any.whl (79.2 kB view details)

Uploaded Python 3

File details

Details for the file maite-0.9.1.tar.gz.

File metadata

  • Download URL: maite-0.9.1.tar.gz
  • Upload date:
  • Size: 84.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for maite-0.9.1.tar.gz
Algorithm Hash digest
SHA256 1b98c729459ff854878ff8c1f76636e359414b0699ff64800c88e4c516a1174f
MD5 8768cd6785b4df89df34c6229f689758
BLAKE2b-256 9edac1494044ab40262deb2a6ecf6408272daca7374c77470a77ffc5bb4dfff6

See more details on using hashes here.

Provenance

The following attestation bundles were made for maite-0.9.1.tar.gz:

Publisher: pypi_publish.yml on mit-ll-ai-technology/maite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maite-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: maite-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 79.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for maite-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb485d1357c10e7ebc78965c1025cf3be7c1d655aa1100b84336c38ca31e91d5
MD5 840a9f29dc901e341974b138bcfe9d6e
BLAKE2b-256 1ef122a783d9bcd926da89fa4d738ee99d05068e911fe13891a263f23cd330c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for maite-0.9.1-py3-none-any.whl:

Publisher: pypi_publish.yml on mit-ll-ai-technology/maite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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