इंटीग्रेशन और ऑटोमेशन

APIs, webhooks, और cloud storage integration के साथ Batch Processing को ऑटोमेट करें।

Batch Processing कार्य स्वचालन के लिए बहुत उपयुक्त है, खासकर जब प्रक्रियाओं को बार-बार चलाने की आवश्यकता होती है। यह पेज बताता है कि APIs और webhooks का उपयोग करके Roboflow Batch Processing को बाहरी सिस्टम्स के साथ कैसे इंटीग्रेट करें।

अवलोकन

एक सामान्य Batch Processing pipeline में निम्न शामिल होते हैं:

  1. Data Ingestion — डेटा को Data Staging में अपलोड करें (इनपुट और आउटपुट डेटा के लिए ephemeral storage)।

  2. प्रसंस्करण — ingested data के विरुद्ध एक Workflow चलाएँ, जिससे CSV/JSONL परिणाम उत्पन्न हों। इसके बाद आमतौर पर एक export चरण होता है जो आसान extraction के लिए compressed archives बनाता है।

  3. Data Export — download links के माध्यम से output batch से results डाउनलोड करें।

API Reference

सभी CLI commands के समकक्ष REST API endpoints होते हैं। नीचे मुख्य API interactions दिए गए हैं।

Video Ingestion

curl -X POST "https://api.roboflow.com/data-staging/v1/external/{workspace}/batches/{batch_id}/upload/video" \
  -G \
  --data-urlencode "api_key=YOUR_API_KEY" \
  --data-urlencode "fileName=your_video.mp4"

Response में शामिल होता है "signedURLDetails" साथ में:

  • "uploadURL" — वीडियो को PUT करने के लिए URL

  • "extensionHeaders" — शामिल करने के लिए अतिरिक्त headers

वीडियो अपलोड करें:

से सभी headers शामिल करें "extensionHeaders" response field।

Image Ingestion

Single Image Upload

5000 images तक के batches के लिए सबसे अच्छा। उसी batch के लिए bulk upload के साथ मिलाया नहीं जा सकता।

Bulk Upload

5000 से अधिक images वाले batches के लिए अनुशंसित। प्रति *.tar archive में 500 images तक bundle करें।

  1. एक upload URL का अनुरोध करें:

  1. images को एक *.tar archive में, API द्वारा लौटाई गई size और file-count सीमाओं के अनुसार pack करें।

  2. Response से signed URL और extension headers का उपयोग करके archive अपलोड करें।

circle-exclamation
circle-info

Bulk ingestion करते समय, data background में indexed होता है। सभी data उपलब्ध होने से पहले थोड़ी देरी हो सकती है।

Batch Status जांचें

Job शुरू करने से पहले, सत्यापित करें कि सभी data ingest हो चुके हैं:

Shard upload details (paginated) जांचने के लिए:

Job शुरू करें

circle-info

Job ID constraints: केवल lowercase letters, digits, hyphens, और underscores। अधिकतम 20 characters।

Job Status की निगरानी करें

सामान्य job status:

Job stages सूचीबद्ध करें:

किसी stage के लिए tasks सूचीबद्ध करें (paginated):

Results Export करें

Output batch के parts सूचीबद्ध करें:

किसी part के लिए download URLs सूचीबद्ध करें (paginated):

एक file डाउनलोड करें:

Data Staging Batch Types

  • Simple batches (type: simple-batch) — data को एक-एक item करके ingest करते समय बनाए जाते हैं। 5000–10000 items तक के लिए सबसे अच्छे।

  • Sharded batches (type: sharded-batch) — bulk ingestion (केवल images) के माध्यम से बनाए जाते हैं। automatic sharding के साथ लाखों data points के लिए डिज़ाइन किए गए हैं।

  • Multipart batches (type: multipart-batch) — सिस्टम द्वारा आंतरिक रूप से बनाए जाते हैं। sub-batches का एक logical grouping जिसे एक entity के रूप में managed किया जाता है।

Webhook Automation

स्थिति के लिए polling करने के बजाय, आप webhooks का उपयोग करके सूचना प्राप्त कर सकते हैं जब ingestion या processing पूर्ण हो जाए।

Data Ingestion Webhooks

CLI commands create-batch-of-images और create-batch-of-videos समर्थन करते हैं:

  • --notifications-url <webhook_url> — notifications के लिए webhook endpoint।

  • --notification-category <value> — notifications फ़िल्टर करें:

    • ingest-status (default) — समग्र ingestion process status।

    • files-status — individual file processing status।

Notifications HTTP POST के माध्यम से भेजी जाती हैं, साथ में एक Authorization header जिसमें आपकी Roboflow Publishable Key होती है।

Ingest Status Notification

File Status Notification

Job Completion Webhooks

जोड़ें --notifications-url जब job शुरू कर रहे हों:

Job Completion Notification

Signed URL Ingestion

उन्नत automation के लिए, आप local files के बजाय signed URLs के माध्यम से data ingest कर सकते हैं:

  • --data-source references-file — signed URLs के माध्यम से संदर्भित files को process करें।

  • --references <path_or_url> — file URLs वाली JSONL file का path, या ऐसी file की ओर point करने वाला signed URL।

Reference File Format (JSONL)

circle-info

Signed URL ingestion Growth Plan और Enterprise ग्राहकों के लिए उपलब्ध है।

Cloud Storage Authentication

AWS S3 और S3-Compatible Storage

Credentials स्वतः detect किए जाते हैं:

  1. Environment variables:

  1. AWS credential files (~/.aws/credentials, ~/.aws/config)

  2. IAM roles (EC2, ECS, Lambda)

Named profiles:

S3-compatible services (Cloudflare R2, MinIO, etc.):

Google Cloud Storage

Credentials यहां से detect किए जाते हैं:

  1. Service account key file (automation के लिए अनुशंसित):

  1. User credentials gcloud CLI से (gcloud auth login)

  2. GCP metadata service (जब Google Cloud Platform पर चल रहा हो)

Azure Blob Storage

SAS Token (अनुशंसित):

Account Key:

Azure CLI के माध्यम से SAS token जनरेट करें:

Custom Scripts

उन्नत use cases के लिए, signed URL files जनरेट करने हेतु scripts का संदर्भ लें:

Last updated

Was this helpful?