Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Deploy, evaluate, and manage AI agents end-to-end on Microsoft Azure AI Foundry
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
finetuning/references/large-file-uploads.md
1# Large File Uploads23The standard `client.files.create()` silently fails on JSONL files >~150MB (Azure returns 500 during job execution). Use the chunked Uploads API:45```python6upload = client.uploads.create(filename="data.jsonl", purpose="fine-tune", bytes=file_size, mime_type="application/jsonl")7part_ids = []8with open(filepath, "rb") as f:9while chunk := f.read(64 * 1024 * 1024): # 64MB chunks10part = client.uploads.parts.create(upload_id=upload.id, data=chunk)11part_ids.append(part.id)12completed = client.uploads.complete(upload_id=upload.id, part_ids=part_ids)13file_id = completed.file.id14```1516**Important:** Requires `openai.AzureOpenAI()` client, NOT `openai.OpenAI()` with `/v1/` URL. The project endpoint returns 404 for upload operations.1718| File Size | Method |19|-----------|--------|20| < 100MB | Standard `files.create()` |21| 100MB–5GB | Chunked Uploads API |22| > 5GB | Split dataset |23