Skip to main content
titus2 logo

PyPI - Python Version PyPI version Maintenance GitHub

Project Documentation - Link

Data Scientist: Why is my cutting edge model still not in production?

Scenario 1:

IT Team: We are still implementing the scoring engine in Go/Java/C++.

Scenario 2:

IT Team: We are still figuring out how to read the model.pkl file you provided.

. .

and the push to production pang continues ..

New Features!

Changes in titus2 v1.2.1

View the complete changelog here.

Titus 2 - Portable Format for Analytics (PFA) implementation for Python 3.4-3.9

Titus 2 is a fork of the original Titus python library which resides in the (now defunct) Hadrian repository. Titus is not actively maintained by the Open Data Group and only supports Python 2, so this fork was created to actively support its development for Python 3.

Titus 2 is a complete, independent implementation of Portable Format for Analytics (PFA) in pure Python. PFA is a specification for scoring/inference engines: event-based processors that perform predictive or analytic calculations. It is a model interchange format which helps smoothen the transition from statistical model development to large-scale and/or online production. titus2 also focuses on model development, so it includes model producers and PFA manipulation tools in addition to runtime execution (scoring) engine.

Requirements

Titus 2 uses a number of open source projects to work properly:

  • avro-python3 >= 1.8.2
  • numpy == 1.14.0 (python 3.4 & 3.5) or numpy >=1.15.0, <1.20 (python 3.6+)
  • pytz >= 2019.1
  • pyyaml >= 5.1.2
  • ply >= 3.11

The above packages are available via pip and are automatically installed during setup.

Installation

Titus requires Python 3.4+ to run. It can be installed via pip/pip3 as follows:

$ pip install titus2

or you can directly install the latest build from github repository via

$ pip install git+https://github.com/animator/titus2.git

After installation please run the following elementary example in python

from titus.genpy import PFAEngine

pfa = {"input": "double",
 "output": "double",
 "action": [
   {"+": ["input", 100]}
 ]}
engine, = PFAEngine.fromJson(pfa)

l = [1.0, 2.0, 3.0, 4.0, 5.0]

for num in l:
    print(num, engine.action(num))

User Guide and Tutorials

See the Project Documentation for user guide and tutorials.

Current Testing Framework

To run the tests, you can execute

python3 setup.py test

To generate the coverage report, you can execute

pip3 install coverage
coverage run setup.py test
coverage report

Testing Status:

  • Unit testing status available here Build Status
  • Conformance testing status available here Build Status

Issues, Questions and Feature Requests

Please raise an issue/question/request here.

Development

Want to contribute? Great!

Please raise an issue to discuss your ideas and send a pull request.

Todos

  • Write MORE Tests for scripts/*.
  • Add scikit-learn model export to PFA tutorials.

Metadata

Release files for titus2 1.2.1

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

Source distribution (sdist)

Source distribution for titus2 1.2.1
File Size Uploaded Provenance Actions
titus2-1.2.1.tar.gz 231.4 kB Without provenance Details for titus2-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for titus2 1.2.1
File Interpreter ABI Platform Actions
titus2-1.2.1-py3-none-any.whl Python 3 none any Details for titus2-1.2.1-py3-none-any.whl

Total release size: 485.6 kB

Release files / titus2-1.2.1.tar.gz

Download URL titus2-1.2.1.tar.gz
Size 231.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dd7ca43e2a7cde530e0ae440cb65d87aac9eedd8cdba9c47cff5d1882e88c297
BLAKE2b-256 checksum
How to use checksums
daf184f0135b424c1bf7fdeab3b6bab9e7861a35c82800126da736a1120a034e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / titus2-1.2.1-py3-none-any.whl

Download URL titus2-1.2.1-py3-none-any.whl
Size 254.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cfb0ada251b7cce0a22b7ff9e5cbacba5da1bc1043dd81960136f1bb449f982
BLAKE2b-256 checksum
How to use checksums
2926c0e1237b090986b1f11277b6827905d20b1ddaaea5eb203e70abb42a9a10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Security for titus2 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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