Skip to main content

Takeoff SDK - Internal

Table of Contents

About

The Takeoff SDK library facilitates launching Takeoff within Python. It provides a Pythonic interface, simplifying the process of initiating Takeoff using the docker run command. Essentially, it wraps the dev.sh script, which manages Docker with all necessary environment variables, volume mounting, network configuration, and device settings. This library is specifically designed for an internal team of developers who need to integrate Python applications with the Takeoff Server, offering a quick and straightforward way to start Takeoff in a Python runtime. It also enables running benchmarks and integration tests.

Getting Started

Installing

To get started with the Takeoff SDK Library, you can install it directly using pip:

pip install takeoff_sdk

Alternatively, if you are working on developing the library, you can install it in editable mode. This allows you to make changes to the library and test them in real-time. Navigate to the takeoff-sdk folder and run the following command:

pip install -e . 

Usage

Launch Takeoff

To quickly launch the Takeoff server with default configurations, use the following script:

from takeoff_sdk import Takeoff

takeoff = Takeoff(model_name="test_model", device="cuda")
takeoff.start() # this will start a docker with takeoff server in the background

For a more customized setup:

from takeoff_sdk import Takeoff, TakeoffEnvSetting
config = TakeoffEnvSetting(model_name="test_model", device="cpu", max_batch_size=16)
takeoff = Takeoff.from_config(config)
takeoff.start() # this will start a docker with takeoff server in the background

Refer to the TakeoffEnvSetting Data Object or Takeoff Environment Variables Settings for additional configuration options.

Launch from a manifest mode:

from takeoff_sdk import Takeoff

takeoff = Takeoff.from_manifest("path_to_your_manifest.yaml")
takeoff.start() # this will takeoff server using manifest.yaml

Add Extra Model

This utilizes the model_management_api functionality, which in python you can do:

# assume you have a takeoff object running
# takeoff.start() running

 # This will add one more model to `embedding` consumer group
takeoff.add_model(model_name="test_model", backend="hf", device="cuda", consumer_group="embedding")

Metadata

Release files for takeoff-sdk 0.3.3

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

Source distribution (sdist)

Source distribution for takeoff-sdk 0.3.3
File Size Uploaded Provenance
takeoff_sdk-0.3.3.tar.gz 18.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for takeoff-sdk 0.3.3
File Interpreter ABI Platform
takeoff_sdk-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 27.3 kB

Release files / takeoff_sdk-0.3.3.tar.gz

Download URL takeoff_sdk-0.3.3.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
923ac4ae314f975894414177446ded026b3ee2b5070b574b3441bf4b0b572b07
BLAKE2b-256 checksum
How to use checksums
3279a773890c928bbf021ad43aab479941ecb499c182a12a92da89f2d9abaa14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / takeoff_sdk-0.3.3-py3-none-any.whl

Download URL takeoff_sdk-0.3.3-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bb316d231eb7373a8cd0c291459350191344f5d0c4df85deaa16faf5e0adb48
BLAKE2b-256 checksum
How to use checksums
1d796fde3505ad81784567d62135ebfec92cc071c7754da1e78c6955865285c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Security for takeoff-sdk 0.3.3

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.

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