Skip to main content

Inference utilities for keynet - Triton Inference Server integration

Project description

keynet-inference

Triton Inference Server 통합과 보안 함수 실행을 위한 추론 유틸리티

설치

pip install keynet-inference

주요 기능

🔌 MLflow-Triton 통합

  • MLflow 모델을 Triton Inference Server로 자동 배포
  • Python 함수를 Triton 모델로 변환
  • S3/MinIO 기반 모델 저장소 지원

🛡️ 보안 함수 실행

  • 격리된 가상환경에서 안전한 실행
  • 메모리 및 CPU 사용량 제한
  • 타임아웃 기반 실행 제어

🛠️ Keynet CLI

  • 함수 검증 및 테스트
  • 배포 자동화
  • 인증 관리
  • Python 3.9~3.12 지원

사용 예제

Python 함수 작성

from keynet_inference.function import keynet_function

@keynet_function(
    python_version="3.11",
    requirements=["numpy", "pandas"],
    timeout=30
)
def process_data(args):
    """데이터 처리 함수"""
    data = args.get("data", [])
    result = sum(data) / len(data) if data else 0

    return {
        "result": result,
        "count": len(data)
    }

CLI 사용

# 함수 검증
keynet validate my_function.py

# 테스트 실행
keynet test my_function.py --params '{"data": [1, 2, 3, 4, 5]}'

# 배포
keynet deploy my_function.py --name my_model

# 인증 관리
keynet login https://api.example.com
keynet logout --all

MLflow 플러그인 사용

import mlflow
from keynet_inference import TritonPlugin

# Triton으로 모델 배포
mlflow.deployments.create_deployment(
    name="my-deployment",
    model_uri="models:/my_model/1",
    flavor="triton",
    config={
        "triton_url": "localhost:8001",
        "model_repository": "s3://models"
    }
)

API 문서

자세한 API 문서는 GitHub Wiki 참조

라이선스

MIT License

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

keynet_inference-0.0.1.dev5.tar.gz (48.7 kB view details)

Uploaded Source

Built Distribution

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

keynet_inference-0.0.1.dev5-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file keynet_inference-0.0.1.dev5.tar.gz.

File metadata

  • Download URL: keynet_inference-0.0.1.dev5.tar.gz
  • Upload date:
  • Size: 48.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for keynet_inference-0.0.1.dev5.tar.gz
Algorithm Hash digest
SHA256 aff9060dcfdaab0c745a2bc4812bc7e8efa627c6ddc83aa45a5d89d92ca815bd
MD5 f4aa6a683e39b98f0f8915fd88ddfa53
BLAKE2b-256 c7f332b75fc8ecfc636a7ab40db570bcb41ebc629a7b61f0d1f06fe895fbddac

See more details on using hashes here.

File details

Details for the file keynet_inference-0.0.1.dev5-py3-none-any.whl.

File metadata

File hashes

Hashes for keynet_inference-0.0.1.dev5-py3-none-any.whl
Algorithm Hash digest
SHA256 0e005a9ca5625c7c93f1eabb7497e8a3b045e8e3bae9d62b5df7e0e210aa6d3e
MD5 292de1bedc95d18bd1de350c4249a115
BLAKE2b-256 0127fc6217234b53b8b74f47628d01eddacd2cdd77a7a9414d5ee81e95a3c5c9

See more details on using hashes here.

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