An ML classifier model to make predictions from semi-structured data.
Project description
ORiGAMi - Object Representation through Generative Autoregressive Modelling
Disclaimer
Please note: This tool is not officially supported or endorsed by MongoDB, Inc. The code is released for use "AS IS" without any warranties of any kind, including, but not limited to its installation, use, or performance. Do not run this tool against critical production systems.
Overview
ORiGAMi is a transformer-based Machine Learning model to directly process semi-structured data such as MongoDB documents or JSON files and make predictions from this data.
Typically, when working with semi-structured data in a Machine Learning context, the data needs to be flattened into a tabular form first. This flattening can be lossy, especially in the presence of arrays and nested objects, and often requires domain expertise to extract meaningful higher-order features from the raw data. This feature extraction step is manual, slow and expensive and doesn't scale well.
ORiGAMi is a transformer model and follows the trend of many other deep learning models by operating directly on the raw data and discovering meaningful features itself. Preprocessing is fully automated (apart from some hyper-parameters that can improve the model performance).
Installation
ORiGAMi requires Python version 3.10 or higher. We recommend using a virtual environment, such as
Python's native venv.
To install ORiGAMi with pip, use
pip install origami-ml
You can also clone the repository to your local machine and install the dependencies manually:
git clone https://github.com/mongodb-labs/origami.git
cd origami
pip install -r requirements.txt
pip install -e .
Usage
ORiGAMi comes with a command line interface (CLI) and a Python SDK.
Usage from the Command Line
The CLI allows to train a model and make predictions from a trained model. After installation, run origami from your shell to see an overview of available commands.
Help for specific commands is available with origami <command> --help, where <command> is currently one of train or predict.
Detailed documentation for the CLI and available options can be found in CLI.md.
Usage with Python
To see an example on how to use ORiGAMi from Python, take a look at the provided ./notebooks folder, e.g. the example_origami_dungeons.ipynb notebook.
Experiment Reproduction
This code is released alongside our paper, which can be found on Arxiv: ORIGAMI: A generative transformer architecture for predictions from semi-structured data. To reproduce the experiments in the paper, see the instructions in the ./experiments/ directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file origami_ml-0.1.0.tar.gz.
File metadata
- Download URL: origami_ml-0.1.0.tar.gz
- Upload date:
- Size: 45.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed90de657aa64fa470e91bf53b106ec6a31f2e0bccd522d48b8f7d00a45ec6b0
|
|
| MD5 |
33a8ab2a73e06750e014653c70da696c
|
|
| BLAKE2b-256 |
aed0d8d062648915bf4daf65cd87c6fc18c9c6fb18c23837df88c5d4e4120d9a
|
File details
Details for the file origami_ml-0.1.0-py3-none-any.whl.
File metadata
- Download URL: origami_ml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 53.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be11e232b6f8570cbd15a39345e4d0b28a8f3674f5121acb771df9c891b7ccbf
|
|
| MD5 |
5ff8e5ff0c04dd18492ffeac71be41d1
|
|
| BLAKE2b-256 |
aaa0fa92118f7b8e414a46e8bc21ed029f35505cd9e6f4d47c85f5e342decdea
|