[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-huggingface-vision-trainer":3,"mdc--cal010-key":36,"related-repo-openai-huggingface-vision-trainer":4987,"related-org-openai-huggingface-vision-trainer":5109},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":34,"mdContent":35},"huggingface-vision-trainer","train and fine-tune vision models","Trains and fine-tunes vision models for object detection (D-FINE, RT-DETR v2, DETR, YOLOS), image classification (timm models — MobileNetV3, MobileViT, ResNet, ViT\u002FDINOv3 — plus any Transformers classifier), and SAM\u002FSAM2 segmentation using Hugging Face Transformers on Hugging Face Jobs cloud GPUs. Covers COCO-format dataset preparation, Albumentations augmentation, mAP\u002FmAR evaluation, accuracy metrics, SAM segmentation with bbox\u002Fpoint prompts, DiceCE loss, hardware selection, cost estimation, Trackio monitoring, and Hub persistence. Use when users mention training object detection, image classification, SAM, SAM2, segmentation, image matting, DETR, D-FINE, RT-DETR, ViT, timm, MobileNet, ResNet, bounding box models, or fine-tuning vision models on Hugging Face Jobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Hugging Face","hugging-face","tag",{"name":17,"slug":18,"type":15},"Deep Learning","deep-learning",{"name":20,"slug":21,"type":15},"AI Infrastructure","ai-infrastructure",{"name":23,"slug":24,"type":15},"Computer Vision","computer-vision",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-06T18:41:45.446602",null,465,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":33},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fhugging-face\u002Fskills\u002Fvision-trainer","---\nname: huggingface-vision-trainer\ndescription: Trains and fine-tunes vision models for object detection (D-FINE, RT-DETR v2, DETR, YOLOS), image classification (timm models — MobileNetV3, MobileViT, ResNet, ViT\u002FDINOv3 — plus any Transformers classifier), and SAM\u002FSAM2 segmentation using Hugging Face Transformers on Hugging Face Jobs cloud GPUs. Covers COCO-format dataset preparation, Albumentations augmentation, mAP\u002FmAR evaluation, accuracy metrics, SAM segmentation with bbox\u002Fpoint prompts, DiceCE loss, hardware selection, cost estimation, Trackio monitoring, and Hub persistence. Use when users mention training object detection, image classification, SAM, SAM2, segmentation, image matting, DETR, D-FINE, RT-DETR, ViT, timm, MobileNet, ResNet, bounding box models, or fine-tuning vision models on Hugging Face Jobs.\n---\n\n# Vision Model Training on Hugging Face Jobs\n\nTrain object detection, image classification, and SAM\u002FSAM2 segmentation models on managed cloud GPUs. No local GPU setup required—results are automatically saved to the Hugging Face Hub.\n\n## When to Use This Skill\n\nUse this skill when users want to:\n- Fine-tune object detection models (D-FINE, RT-DETR v2, DETR, YOLOS) on cloud GPUs or local\n- Fine-tune image classification models (timm: MobileNetV3, MobileViT, ResNet, ViT\u002FDINOv3, or any Transformers classifier) on cloud GPUs or local\n- Fine-tune SAM or SAM2 models for segmentation \u002F image matting using bbox or point prompts\n- Train bounding-box detectors on custom datasets\n- Train image classifiers on custom datasets\n- Train segmentation models on custom mask datasets with prompts\n- Run vision training jobs on Hugging Face Jobs infrastructure\n- Ensure trained vision models are permanently saved to the Hub\n\n## Related Skills\n\n- **`hugging-face-jobs`** — General HF Jobs infrastructure: token authentication, hardware flavors, timeout management, cost estimation, secrets, environment variables, scheduled jobs, and result persistence. **Refer to the Jobs skill for any non-training-specific Jobs questions** (e.g., \"how do secrets work?\", \"what hardware is available?\", \"how do I pass tokens?\").\n- **`hugging-face-model-trainer`** — TRL-based language model training (SFT, DPO, GRPO). Use that skill for text\u002Flanguage model fine-tuning.\n\n## Local Script Execution\n\nHelper scripts use PEP 723 inline dependencies. Run them with `uv run`:\n```bash\nuv run scripts\u002Fdataset_inspector.py --dataset username\u002Fdataset-name --split train\nuv run scripts\u002Festimate_cost.py --help\n```\n\n## Prerequisites Checklist\n\nBefore starting any training job, verify:\n\n### Account & Authentication\n- Hugging Face Account with [Pro](https:\u002F\u002Fhf.co\u002Fpro), [Team](https:\u002F\u002Fhf.co\u002Fenterprise), or [Enterprise](https:\u002F\u002Fhf.co\u002Fenterprise) plan (Jobs require paid plan)\n- Authenticated login: Check with `hf_whoami()` (tool) or `hf auth whoami` (terminal)\n- Token has **write** permissions\n- **MUST pass token in job secrets** — see directive #3 below for syntax (MCP tool vs Python API)\n\n### Dataset Requirements — Object Detection\n- Dataset must exist on Hub\n- Annotations must use the `objects` column with `bbox`, `category` (and optionally `area`) sub-fields\n- Bboxes can be in **xywh (COCO)** or **xyxy (Pascal VOC)** format — auto-detected and converted\n- Categories can be **integers or strings** — strings are auto-remapped to integer IDs\n- `image_id` column is **optional** — generated automatically if missing\n- **ALWAYS validate unknown datasets** before GPU training (see Dataset Validation section)\n\n### Dataset Requirements — Image Classification\n- Dataset must exist on Hub\n- Must have an **`image` column** (PIL images) and a **`label` column** (integer class IDs or strings)\n- The label column can be `ClassLabel` type (with names) or plain integers\u002Fstrings — strings are auto-remapped\n- Common column names auto-detected: `label`, `labels`, `class`, `fine_label`\n- **ALWAYS validate unknown datasets** before GPU training (see Dataset Validation section)\n\n### Dataset Requirements — SAM\u002FSAM2 Segmentation\n- Dataset must exist on Hub\n- Must have an **`image` column** (PIL images) and a **`mask` column** (binary ground-truth segmentation mask)\n- Must have a **prompt** — either:\n  - A **`prompt` column** with JSON containing `{\"bbox\": [x0,y0,x1,y1]}` or `{\"point\": [x,y]}`\n  - OR a dedicated **`bbox`** column with `[x0,y0,x1,y1]` values\n  - OR a dedicated **`point`** column with `[x,y]` or `[[x,y],...]` values\n- Bboxes should be in **xyxy** format (absolute pixel coordinates)\n- Example dataset: `merve\u002FMicroMat-mini` (image matting with bbox prompts)\n- **ALWAYS validate unknown datasets** before GPU training (see Dataset Validation section)\n\n### Critical Settings\n- **Timeout must exceed expected training time** — Default 30min is TOO SHORT. See directive #6 for recommended values.\n- **Hub push must be enabled** — `push_to_hub=True`, `hub_model_id=\"username\u002Fmodel-name\"`, token in `secrets`\n\n## Dataset Validation\n\n**Validate dataset format BEFORE launching GPU training to prevent the #1 cause of training failures: format mismatches.**\n\n**ALWAYS validate for** unknown\u002Fcustom datasets or any dataset you haven't trained with before. **Skip for** `cppe-5` (the default in the training script).\n\n### Running the Inspector\n\n**Option 1: Via HF Jobs (recommended — avoids local SSL\u002Fdependency issues):**\n```python\nhf_jobs(\"uv\", {\n    \"script\": \"path\u002Fto\u002Fdataset_inspector.py\",\n    \"script_args\": [\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"]\n})\n```\n\n**Option 2: Locally:**\n```bash\nuv run scripts\u002Fdataset_inspector.py --dataset username\u002Fdataset-name --split train\n```\n\n**Option 3: Via `HfApi().run_uv_job()` (if hf_jobs MCP unavailable):**\n```python\nfrom huggingface_hub import HfApi\napi = HfApi()\napi.run_uv_job(\n    script=\"scripts\u002Fdataset_inspector.py\",\n    script_args=[\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"],\n    flavor=\"cpu-basic\",\n    timeout=300,\n)\n```\n\n### Reading Results\n\n- **`✓ READY`** — Dataset is compatible, use directly\n- **`✗ NEEDS FORMATTING`** — Needs preprocessing (mapping code provided in output)\n\n## Automatic Bbox Preprocessing\n\nThe object detection training script (`scripts\u002Fobject_detection_training.py`) automatically handles bbox format detection (xyxy→xywh conversion), bbox sanitization, `image_id` generation, string category→integer remapping, and dataset truncation. **No manual preprocessing needed** — just ensure the dataset has `objects.bbox` and `objects.category` columns.\n\n## Training workflow\n\nCopy this checklist and track progress:\n\n```\nTraining Progress:\n- [ ] Step 1: Verify prerequisites (account, token, dataset)\n- [ ] Step 2: Validate dataset format (run dataset_inspector.py)\n- [ ] Step 3: Ask user about dataset size and validation split\n- [ ] Step 4: Prepare training script (OD: scripts\u002Fobject_detection_training.py, IC: scripts\u002Fimage_classification_training.py, SAM: scripts\u002Fsam_segmentation_training.py)\n- [ ] Step 5: Save script locally, submit job, and report details\n```\n\n**Step 1: Verify prerequisites**\n\nFollow the Prerequisites Checklist above.\n\n**Step 2: Validate dataset**\n\nRun the dataset inspector BEFORE spending GPU time. See \"Dataset Validation\" section above.\n\n**Step 3: Ask user preferences**\n\nALWAYS use the AskUserQuestion tool with option-style format:\n\n```python\nAskUserQuestion({\n    \"questions\": [\n        {\n            \"question\": \"Do you want to run a quick test with a subset of the data first?\",\n            \"header\": \"Dataset Size\",\n            \"options\": [\n                {\"label\": \"Quick test run (10% of data)\", \"description\": \"Faster, cheaper (~30-60 min, ~$2-5) to validate setup\"},\n                {\"label\": \"Full dataset (Recommended)\", \"description\": \"Complete training for best model quality\"}\n            ],\n            \"multiSelect\": false\n        },\n        {\n            \"question\": \"Do you want to create a validation split from the training data?\",\n            \"header\": \"Split data\",\n            \"options\": [\n                {\"label\": \"Yes (Recommended)\", \"description\": \"Automatically split 15% of training data for validation\"},\n                {\"label\": \"No\", \"description\": \"Use existing validation split from dataset\"}\n            ],\n            \"multiSelect\": false\n        },\n        {\n            \"question\": \"Which GPU hardware do you want to use?\",\n            \"header\": \"Hardware Flavor\",\n            \"options\": [\n                {\"label\": \"t4-small ($0.40\u002Fhr)\", \"description\": \"1x T4, 16 GB VRAM — sufficient for all OD models under 100M params\"},\n                {\"label\": \"l4x1 ($0.80\u002Fhr)\", \"description\": \"1x L4, 24 GB VRAM — more headroom for large images or batch sizes\"},\n                {\"label\": \"a10g-large ($1.50\u002Fhr)\", \"description\": \"1x A10G, 24 GB VRAM — faster training, more CPU\u002FRAM\"},\n                {\"label\": \"a100-large ($2.50\u002Fhr)\", \"description\": \"1x A100, 80 GB VRAM — fastest, for very large datasets or image sizes\"}\n            ],\n            \"multiSelect\": false\n        }\n    ]\n})\n```\n\n**Step 4: Prepare training script**\n\nFor object detection, use [scripts\u002Fobject_detection_training.py](scripts\u002Fobject_detection_training.py) as the production-ready template. For image classification, use [scripts\u002Fimage_classification_training.py](scripts\u002Fimage_classification_training.py). For SAM\u002FSAM2 segmentation, use [scripts\u002Fsam_segmentation_training.py](scripts\u002Fsam_segmentation_training.py). All scripts use `HfArgumentParser` — all configuration is passed via CLI arguments in `script_args`, NOT by editing Python variables. For timm model details, see [references\u002Ftimm_trainer.md](references\u002Ftimm_trainer.md). For SAM2 training details, see [references\u002Ffinetune_sam2_trainer.md](references\u002Ffinetune_sam2_trainer.md).\n\n**Step 5: Save script, submit job, and report**\n\n1. **Save the script locally** to `submitted_jobs\u002F` in the workspace root (create if needed) with a descriptive name like `training_\u003Cdataset>_\u003CYYYYMMDD_HHMMSS>.py`. Tell the user the path.\n2. **Submit** using `hf_jobs` MCP tool (preferred) or `HfApi().run_uv_job()` — see directive #1 for both methods. Pass all config via `script_args`.\n3. **Report** the job ID (from `.id` attribute), monitoring URL, Trackio dashboard (`https:\u002F\u002Fhuggingface.co\u002Fspaces\u002F{username}\u002Ftrackio`), expected time, and estimated cost.\n4. **Wait for user** to request status checks — don't poll automatically. Training jobs run asynchronously and can take hours.\n\n## Critical directives\n\nThese rules prevent common failures. Follow them exactly.\n\n### 1. Job submission: `hf_jobs` MCP tool vs Python API\n\n**`hf_jobs()` is an MCP tool, NOT a Python function.** Do NOT try to import it from `huggingface_hub`. Call it as a tool:\n\n```\nhf_jobs(\"uv\", {\"script\": training_script_content, \"flavor\": \"a10g-large\", \"timeout\": \"4h\", \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}})\n```\n\n**If `hf_jobs` MCP tool is unavailable**, use the Python API directly:\n\n```python\nfrom huggingface_hub import HfApi, get_token\napi = HfApi()\njob_info = api.run_uv_job(\n    script=\"path\u002Fto\u002Ftraining_script.py\",  # file PATH, NOT content\n    script_args=[\"--dataset_name\", \"cppe-5\", ...],\n    flavor=\"a10g-large\",\n    timeout=14400,  # seconds (4 hours)\n    env={\"PYTHONUNBUFFERED\": \"1\"},\n    secrets={\"HF_TOKEN\": get_token()},  # MUST use get_token(), NOT \"$HF_TOKEN\"\n)\nprint(f\"Job ID: {job_info.id}\")\n```\n\n**Critical differences between the two methods:**\n\n| | `hf_jobs` MCP tool | `HfApi().run_uv_job()` |\n|---|---|---|\n| `script` param | Python code string or URL (NOT local paths) | File path to `.py` file (NOT content) |\n| Token in secrets | `\"$HF_TOKEN\"` (auto-replaced) | `get_token()` (actual token value) |\n| Timeout format | String (`\"4h\"`) | Seconds (`14400`) |\n\n**Rules for both methods:**\n- The training script MUST include PEP 723 inline metadata with dependencies\n- Do NOT use `image` or `command` parameters (those belong to `run_job()`, not `run_uv_job()`)\n\n### 2. Authentication via job secrets + explicit hub_token injection\n\n**Job config** MUST include the token in secrets — syntax depends on submission method (see table above).\n\n**Training script requirement:** The Transformers `Trainer` calls `create_repo(token=self.args.hub_token)` during `__init__()` when `push_to_hub=True`. The training script MUST inject `HF_TOKEN` into `training_args.hub_token` AFTER parsing args but BEFORE creating the `Trainer`. The template `scripts\u002Fobject_detection_training.py` already includes this:\n\n```python\nhf_token = os.environ.get(\"HF_TOKEN\")\nif training_args.push_to_hub and not training_args.hub_token:\n    if hf_token:\n        training_args.hub_token = hf_token\n```\n\nIf you write a custom script, you MUST include this token injection before the `Trainer(...)` call.\n\n- Do NOT call `login()` in custom scripts unless replicating the full pattern from `scripts\u002Fobject_detection_training.py`\n- Do NOT rely on implicit token resolution (`hub_token=None`) — unreliable in Jobs\n- See the `hugging-face-jobs` skill → *Token Usage Guide* for full details\n\n### 3. JobInfo attribute\n\nAccess the job identifier using `.id` (NOT `.job_id` or `.name` — these don't exist):\n\n```python\njob_info = api.run_uv_job(...)  # or hf_jobs(\"uv\", {...})\njob_id = job_info.id  # Correct -- returns string like \"687fb701029421ae5549d998\"\n```\n\n### 4. Required training flags and HfArgumentParser boolean syntax\n\n`scripts\u002Fobject_detection_training.py` uses `HfArgumentParser` — all config is passed via `script_args`. Boolean arguments have two syntaxes:\n\n- **`bool` fields** (e.g., `push_to_hub`, `do_train`): Use as bare flags (`--push_to_hub`) or negate with `--no_` prefix (`--no_remove_unused_columns`)\n- **`Optional[bool]` fields** (e.g., `greater_is_better`): MUST pass explicit value (`--greater_is_better True`). Bare `--greater_is_better` causes `error: expected one argument`\n\nRequired flags for object detection:\n\n```\n--no_remove_unused_columns          # MUST: preserves image column for pixel_values\n--no_eval_do_concat_batches         # MUST: images have different numbers of target boxes\n--push_to_hub                       # MUST: environment is ephemeral\n--hub_model_id username\u002Fmodel-name\n--metric_for_best_model eval_map\n--greater_is_better True            # MUST pass \"True\" explicitly (Optional[bool])\n--do_train\n--do_eval\n```\n\nRequired flags for image classification:\n\n```\n--no_remove_unused_columns          # MUST: preserves image column for pixel_values\n--push_to_hub                       # MUST: environment is ephemeral\n--hub_model_id username\u002Fmodel-name\n--metric_for_best_model eval_accuracy\n--greater_is_better True            # MUST pass \"True\" explicitly (Optional[bool])\n--do_train\n--do_eval\n```\n\nRequired flags for SAM\u002FSAM2 segmentation:\n\n```\n--remove_unused_columns False       # MUST: preserves input_boxes\u002Finput_points\n--push_to_hub                       # MUST: environment is ephemeral\n--hub_model_id username\u002Fmodel-name\n--do_train\n--prompt_type bbox                  # or \"point\"\n--dataloader_pin_memory False       # MUST: avoids pin_memory issues with custom collator\n```\n\n### 5. Timeout management\n\nDefault 30 min is TOO SHORT for object detection. Set minimum 2-4 hours. Add 30% buffer for model loading, preprocessing, and Hub push.\n\n| Scenario | Timeout |\n|----------|---------|\n| Quick test (100-200 images, 5-10 epochs) | 1h |\n| Development (500-1K images, 15-20 epochs) | 2-3h |\n| Production (1K-5K images, 30 epochs) | 4-6h |\n| Large dataset (5K+ images) | 6-12h |\n\n### 6. Trackio monitoring\n\nTrackio is **always enabled** in the object detection training script — it calls `trackio.init()` and `trackio.finish()` automatically. No need to pass `--report_to trackio`. The project name is taken from `--output_dir` and the run name from `--run_name`. For image classification, pass `--report_to trackio` in `TrainingArguments`.\n\nDashboard at: `https:\u002F\u002Fhuggingface.co\u002Fspaces\u002F{username}\u002Ftrackio`\n\n## Model & hardware selection\n\n### Recommended object detection models\n\n| Model | Params | Use case |\n|-------|--------|----------|\n| `ustc-community\u002Fdfine-small-coco` | 10.4M | Best starting point — fast, cheap, SOTA quality |\n| `PekingU\u002Frtdetr_v2_r18vd` | 20.2M | Lightweight real-time detector |\n| `ustc-community\u002Fdfine-large-coco` | 31.4M | Higher accuracy, still efficient |\n| `PekingU\u002Frtdetr_v2_r50vd` | 43M | Strong real-time baseline |\n| `ustc-community\u002Fdfine-xlarge-obj365` | 63.5M | Best accuracy (pretrained on Objects365) |\n| `PekingU\u002Frtdetr_v2_r101vd` | 76M | Largest RT-DETR v2 variant |\n\nStart with `ustc-community\u002Fdfine-small-coco` for fast iteration. Move to D-FINE Large or RT-DETR v2 R50 for better accuracy.\n\n### Recommended image classification models\n\nAll `timm\u002F` models work out of the box via `AutoModelForImageClassification` (loaded as `TimmWrapperForImageClassification`). See [references\u002Ftimm_trainer.md](references\u002Ftimm_trainer.md) for details.\n\n| Model | Params | Use case |\n|-------|--------|----------|\n| `timm\u002Fmobilenetv3_small_100.lamb_in1k` | 2.5M | Ultra-lightweight — mobile\u002Fedge, fastest training |\n| `timm\u002Fmobilevit_s.cvnets_in1k` | 5.6M | Mobile transformer — good accuracy\u002Fspeed trade-off |\n| `timm\u002Fresnet50.a1_in1k` | 25.6M | Strong CNN baseline — reliable, well-studied |\n| `timm\u002Fvit_base_patch16_dinov3.lvd1689m` | 86.6M | Best accuracy — DINOv3 self-supervised ViT |\n\nStart with `timm\u002Fmobilenetv3_small_100.lamb_in1k` for fast iteration. Move to `timm\u002Fresnet50.a1_in1k` or `timm\u002Fvit_base_patch16_dinov3.lvd1689m` for better accuracy.\n\n### Recommended SAM\u002FSAM2 segmentation models\n\n| Model | Params | Use case |\n|-------|--------|----------|\n| `facebook\u002Fsam2.1-hiera-tiny` | 38.9M | Fastest SAM2 — good for quick experiments |\n| `facebook\u002Fsam2.1-hiera-small` | 46.0M | Best starting point — good quality\u002Fspeed balance |\n| `facebook\u002Fsam2.1-hiera-base-plus` | 80.8M | Higher capacity for complex segmentation |\n| `facebook\u002Fsam2.1-hiera-large` | 224.4M | Best SAM2 accuracy — requires more VRAM |\n| `facebook\u002Fsam-vit-base` | 93.7M | Original SAM — ViT-B backbone |\n| `facebook\u002Fsam-vit-large` | 312.3M | Original SAM — ViT-L backbone |\n| `facebook\u002Fsam-vit-huge` | 641.1M | Original SAM — ViT-H, best SAM v1 accuracy |\n\nStart with `facebook\u002Fsam2.1-hiera-small` for fast iteration. SAM2 models are generally more efficient than SAM v1 at similar quality. Only the mask decoder is trained by default (vision and prompt encoders are frozen).\n\n### Hardware recommendation\n\nAll recommended OD and IC models are under 100M params — **`t4-small` (16 GB VRAM, $0.40\u002Fhr) is sufficient for all of them.** Image classification models are generally smaller and faster than object detection models — `t4-small` handles even ViT-Base comfortably. For SAM2 models up to `hiera-base-plus`, `t4-small` is sufficient since only the mask decoder is trained. For `sam2.1-hiera-large` or SAM v1 models, use `l4x1` or `a10g-large`. Only upgrade if you hit OOM from large batch sizes — reduce batch size first before switching hardware. Common upgrade path: `t4-small` → `l4x1` ($0.80\u002Fhr, 24 GB) → `a10g-large` ($1.50\u002Fhr, 24 GB).\n\nFor full hardware flavor list: refer to the `hugging-face-jobs` skill. For cost estimation: run `scripts\u002Festimate_cost.py`.\n\n## Quick start — Object Detection\n\nThe `script_args` below are the same for both submission methods. See directive #1 for the critical differences between them.\n\n```python\nOD_SCRIPT_ARGS = [\n    \"--model_name_or_path\", \"ustc-community\u002Fdfine-small-coco\",\n    \"--dataset_name\", \"cppe-5\",\n    \"--image_square_size\", \"640\",\n    \"--output_dir\", \"dfine_finetuned\",\n    \"--num_train_epochs\", \"30\",\n    \"--per_device_train_batch_size\", \"8\",\n    \"--learning_rate\", \"5e-5\",\n    \"--eval_strategy\", \"epoch\",\n    \"--save_strategy\", \"epoch\",\n    \"--save_total_limit\", \"2\",\n    \"--load_best_model_at_end\",\n    \"--metric_for_best_model\", \"eval_map\",\n    \"--greater_is_better\", \"True\",\n    \"--no_remove_unused_columns\",\n    \"--no_eval_do_concat_batches\",\n    \"--push_to_hub\",\n    \"--hub_model_id\", \"username\u002Fmodel-name\",\n    \"--do_train\",\n    \"--do_eval\",\n]\n```\n\n```python\nfrom huggingface_hub import HfApi, get_token\napi = HfApi()\njob_info = api.run_uv_job(\n    script=\"scripts\u002Fobject_detection_training.py\",\n    script_args=OD_SCRIPT_ARGS,\n    flavor=\"t4-small\",\n    timeout=14400,\n    env={\"PYTHONUNBUFFERED\": \"1\"},\n    secrets={\"HF_TOKEN\": get_token()},\n)\nprint(f\"Job ID: {job_info.id}\")\n```\n\n### Key OD `script_args`\n\n- `--model_name_or_path` — recommended: `\"ustc-community\u002Fdfine-small-coco\"` (see model table above)\n- `--dataset_name` — the Hub dataset ID\n- `--image_square_size` — 480 (fast iteration) or 800 (better accuracy)\n- `--hub_model_id` — `\"username\u002Fmodel-name\"` for Hub persistence\n- `--num_train_epochs` — 30 typical for convergence\n- `--train_val_split` — fraction to split for validation (default 0.15), set if dataset lacks a validation split\n- `--max_train_samples` — truncate training set (useful for quick test runs, e.g. `\"785\"` for ~10% of a 7.8K dataset)\n- `--max_eval_samples` — truncate evaluation set\n\n## Quick start — Image Classification\n\n```python\nIC_SCRIPT_ARGS = [\n    \"--model_name_or_path\", \"timm\u002Fmobilenetv3_small_100.lamb_in1k\",\n    \"--dataset_name\", \"ethz\u002Ffood101\",\n    \"--output_dir\", \"food101_classifier\",\n    \"--num_train_epochs\", \"5\",\n    \"--per_device_train_batch_size\", \"32\",\n    \"--per_device_eval_batch_size\", \"32\",\n    \"--learning_rate\", \"5e-5\",\n    \"--eval_strategy\", \"epoch\",\n    \"--save_strategy\", \"epoch\",\n    \"--save_total_limit\", \"2\",\n    \"--load_best_model_at_end\",\n    \"--metric_for_best_model\", \"eval_accuracy\",\n    \"--greater_is_better\", \"True\",\n    \"--no_remove_unused_columns\",\n    \"--push_to_hub\",\n    \"--hub_model_id\", \"username\u002Ffood101-classifier\",\n    \"--do_train\",\n    \"--do_eval\",\n]\n```\n\n```python\nfrom huggingface_hub import HfApi, get_token\napi = HfApi()\njob_info = api.run_uv_job(\n    script=\"scripts\u002Fimage_classification_training.py\",\n    script_args=IC_SCRIPT_ARGS,\n    flavor=\"t4-small\",\n    timeout=7200,\n    env={\"PYTHONUNBUFFERED\": \"1\"},\n    secrets={\"HF_TOKEN\": get_token()},\n)\nprint(f\"Job ID: {job_info.id}\")\n```\n\n### Key IC `script_args`\n\n- `--model_name_or_path` — any `timm\u002F` model or Transformers classification model (see model table above)\n- `--dataset_name` — the Hub dataset ID\n- `--image_column_name` — column containing PIL images (default: `\"image\"`)\n- `--label_column_name` — column containing class labels (default: `\"label\"`)\n- `--hub_model_id` — `\"username\u002Fmodel-name\"` for Hub persistence\n- `--num_train_epochs` — 3-5 typical for classification (fewer than OD)\n- `--per_device_train_batch_size` — 16-64 (classification models use less memory than OD)\n- `--train_val_split` — fraction to split for validation (default 0.15), set if dataset lacks a validation split\n- `--max_train_samples` \u002F `--max_eval_samples` — truncate for quick tests\n\n## Quick start — SAM\u002FSAM2 Segmentation\n\n```python\nSAM_SCRIPT_ARGS = [\n    \"--model_name_or_path\", \"facebook\u002Fsam2.1-hiera-small\",\n    \"--dataset_name\", \"merve\u002FMicroMat-mini\",\n    \"--prompt_type\", \"bbox\",\n    \"--prompt_column_name\", \"prompt\",\n    \"--output_dir\", \"sam2-finetuned\",\n    \"--num_train_epochs\", \"30\",\n    \"--per_device_train_batch_size\", \"4\",\n    \"--learning_rate\", \"1e-5\",\n    \"--logging_steps\", \"1\",\n    \"--save_strategy\", \"epoch\",\n    \"--save_total_limit\", \"2\",\n    \"--remove_unused_columns\", \"False\",\n    \"--dataloader_pin_memory\", \"False\",\n    \"--push_to_hub\",\n    \"--hub_model_id\", \"username\u002Fsam2-finetuned\",\n    \"--do_train\",\n    \"--report_to\", \"trackio\",\n]\n```\n\n```python\nfrom huggingface_hub import HfApi, get_token\napi = HfApi()\njob_info = api.run_uv_job(\n    script=\"scripts\u002Fsam_segmentation_training.py\",\n    script_args=SAM_SCRIPT_ARGS,\n    flavor=\"t4-small\",\n    timeout=7200,\n    env={\"PYTHONUNBUFFERED\": \"1\"},\n    secrets={\"HF_TOKEN\": get_token()},\n)\nprint(f\"Job ID: {job_info.id}\")\n```\n\n### Key SAM `script_args`\n\n- `--model_name_or_path` — SAM or SAM2 model (see model table above); auto-detects SAM vs SAM2\n- `--dataset_name` — the Hub dataset ID (e.g., `\"merve\u002FMicroMat-mini\"`)\n- `--prompt_type` — `\"bbox\"` or `\"point\"` — type of prompt in the dataset\n- `--prompt_column_name` — column with JSON-encoded prompts (default: `\"prompt\"`)\n- `--bbox_column_name` — dedicated bbox column (alternative to JSON prompt column)\n- `--point_column_name` — dedicated point column (alternative to JSON prompt column)\n- `--mask_column_name` — column with ground-truth masks (default: `\"mask\"`)\n- `--hub_model_id` — `\"username\u002Fmodel-name\"` for Hub persistence\n- `--num_train_epochs` — 20-30 typical for SAM fine-tuning\n- `--per_device_train_batch_size` — 2-4 (SAM models use significant memory)\n- `--freeze_vision_encoder` \u002F `--freeze_prompt_encoder` — freeze encoder weights (default: both frozen, only mask decoder trains)\n- `--train_val_split` — fraction to split for validation (default 0.1)\n\n## Checking job status\n\n**MCP tool (if available):**\n```\nhf_jobs(\"ps\")                                   # List all jobs\nhf_jobs(\"logs\", {\"job_id\": \"your-job-id\"})      # View logs\nhf_jobs(\"inspect\", {\"job_id\": \"your-job-id\"})   # Job details\n```\n\n**Python API fallback:**\n```python\nfrom huggingface_hub import HfApi\napi = HfApi()\napi.list_jobs()                                  # List all jobs\napi.get_job_logs(job_id=\"your-job-id\")           # View logs\napi.get_job(job_id=\"your-job-id\")                # Job details\n```\n\n## Common failure modes\n\n### OOM (CUDA out of memory)\nReduce `per_device_train_batch_size` (try 4, then 2), reduce `IMAGE_SIZE`, or upgrade hardware.\n\n### Dataset format errors\nRun `scripts\u002Fdataset_inspector.py` first. The training script auto-detects xyxy vs xywh, converts string categories to integer IDs, and adds `image_id` if missing. Ensure `objects.bbox` contains 4-value coordinate lists in absolute pixels and `objects.category` contains either integer IDs or string labels.\n\n### Hub push failures (401)\nVerify: (1) job secrets include token (see directive #2), (2) script sets `training_args.hub_token` BEFORE creating the `Trainer`, (3) `push_to_hub=True` is set, (4) correct `hub_model_id`, (5) token has write permissions.\n\n### Job timeout\nIncrease timeout (see directive #5 table), reduce epochs\u002Fdataset, or use checkpoint strategy with `hub_strategy=\"every_save\"`.\n\n### KeyError: 'test' (missing test split)\nThe object detection training script handles this gracefully — it falls back to the `validation` split. Ensure you're using the latest `scripts\u002Fobject_detection_training.py`.\n\n### Single-class dataset: \"iteration over a 0-d tensor\"\n`torchmetrics.MeanAveragePrecision` returns scalar (0-d) tensors for per-class metrics when there's only one class. The template `scripts\u002Fobject_detection_training.py` handles this by calling `.unsqueeze(0)` on these tensors. Ensure you're using the latest template.\n\n### Poor detection performance (mAP \u003C 0.15)\nIncrease epochs (30-50), ensure 500+ images, check per-class mAP for imbalanced classes, try different learning rates (1e-5 to 1e-4), increase image size.\n\nFor comprehensive troubleshooting: see [references\u002Freliability_principles.md](references\u002Freliability_principles.md)\n\n## Reference files\n\n- [scripts\u002Fobject_detection_training.py](scripts\u002Fobject_detection_training.py) — Production-ready object detection training script\n- [scripts\u002Fimage_classification_training.py](scripts\u002Fimage_classification_training.py) — Production-ready image classification training script (supports timm models)\n- [scripts\u002Fsam_segmentation_training.py](scripts\u002Fsam_segmentation_training.py) — Production-ready SAM\u002FSAM2 segmentation training script (bbox & point prompts)\n- [scripts\u002Fdataset_inspector.py](scripts\u002Fdataset_inspector.py) — Validate dataset format for OD, classification, and SAM segmentation\n- [scripts\u002Festimate_cost.py](scripts\u002Festimate_cost.py) — Estimate training costs for any vision model (includes SAM\u002FSAM2)\n- [references\u002Fobject_detection_training_notebook.md](references\u002Fobject_detection_training_notebook.md) — Object detection training workflow, augmentation strategies, and training patterns\n- [references\u002Fimage_classification_training_notebook.md](references\u002Fimage_classification_training_notebook.md) — Image classification training workflow with ViT, preprocessing, and evaluation\n- [references\u002Ffinetune_sam2_trainer.md](references\u002Ffinetune_sam2_trainer.md) — SAM2 fine-tuning walkthrough with MicroMat dataset, DiceCE loss, and Trainer integration\n- [references\u002Ftimm_trainer.md](references\u002Ftimm_trainer.md) — Using timm models with HF Trainer (TimmWrapper, transforms, full example)\n- [references\u002Fhub_saving.md](references\u002Fhub_saving.md) — Detailed Hub persistence guide and verification checklist\n- [references\u002Freliability_principles.md](references\u002Freliability_principles.md) — Failure prevention principles from production experience\n\n## External links\n\n- [Transformers Object Detection Guide](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Ftasks\u002Fobject_detection)\n- [Transformers Image Classification Guide](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Ftasks\u002Fimage_classification)\n- [DETR Model Documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fdetr)\n- [ViT Model Documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fvit)\n- [HF Jobs Guide](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fguides\u002Fjobs) — Main Jobs documentation\n- [HF Jobs Configuration](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fen\u002Fjobs-configuration) — Hardware, secrets, timeouts, namespaces\n- [HF Jobs CLI Reference](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fguides\u002Fcli#hf-jobs) — Command line interface\n- [Object Detection Models](https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=object-detection)\n- [Image Classification Models](https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-classification)\n- [SAM2 Model Documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fsam2)\n- [SAM Model Documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fsam)\n- [Object Detection Datasets](https:\u002F\u002Fhuggingface.co\u002Fdatasets?task_categories=task_categories:object-detection)\n- [Image Classification Datasets](https:\u002F\u002Fhuggingface.co\u002Fdatasets?task_categories=task_categories:image-classification)\n",{"data":37,"body":38},{"name":4,"description":6},{"type":39,"children":40},"root",[41,50,56,63,68,113,119,159,165,178,254,260,265,272,351,357,460,466,555,561,721,727,771,777,785,810,816,824,867,875,913,929,1004,1010,1041,1047,1090,1096,1101,1111,1119,1124,1132,1137,1145,1150,1436,1444,1499,1507,1604,1610,1615,1628,1652,1661,1678,1771,1779,1913,1921,1963,1969,1979,2050,2089,2102,2156,2162,2189,2212,2218,2242,2343,2348,2357,2362,2371,2376,2385,2391,2396,2470,2476,2541,2551,2557,2563,2722,2734,2740,2775,2887,2911,2917,3095,3106,3112,3195,3214,3220,3232,3407,3496,3507,3621,3627,3783,3870,3881,4008,4014,4167,4253,4264,4440,4446,4454,4463,4471,4516,4522,4528,4549,4555,4589,4595,4629,4635,4647,4653,4672,4678,4704,4710,4715,4725,4731,4836,4842,4981],{"type":42,"tag":43,"props":44,"children":46},"element","h1",{"id":45},"vision-model-training-on-hugging-face-jobs",[47],{"type":48,"value":49},"text","Vision Model Training on Hugging Face Jobs",{"type":42,"tag":51,"props":52,"children":53},"p",{},[54],{"type":48,"value":55},"Train object detection, image classification, and SAM\u002FSAM2 segmentation models on managed cloud GPUs. No local GPU setup required—results are automatically saved to the Hugging Face Hub.",{"type":42,"tag":57,"props":58,"children":60},"h2",{"id":59},"when-to-use-this-skill",[61],{"type":48,"value":62},"When to Use This Skill",{"type":42,"tag":51,"props":64,"children":65},{},[66],{"type":48,"value":67},"Use this skill when users want to:",{"type":42,"tag":69,"props":70,"children":71},"ul",{},[72,78,83,88,93,98,103,108],{"type":42,"tag":73,"props":74,"children":75},"li",{},[76],{"type":48,"value":77},"Fine-tune object detection models (D-FINE, RT-DETR v2, DETR, YOLOS) on cloud GPUs or local",{"type":42,"tag":73,"props":79,"children":80},{},[81],{"type":48,"value":82},"Fine-tune image classification models (timm: MobileNetV3, MobileViT, ResNet, ViT\u002FDINOv3, or any Transformers classifier) on cloud GPUs or local",{"type":42,"tag":73,"props":84,"children":85},{},[86],{"type":48,"value":87},"Fine-tune SAM or SAM2 models for segmentation \u002F image matting using bbox or point prompts",{"type":42,"tag":73,"props":89,"children":90},{},[91],{"type":48,"value":92},"Train bounding-box detectors on custom datasets",{"type":42,"tag":73,"props":94,"children":95},{},[96],{"type":48,"value":97},"Train image classifiers on custom datasets",{"type":42,"tag":73,"props":99,"children":100},{},[101],{"type":48,"value":102},"Train segmentation models on custom mask datasets with prompts",{"type":42,"tag":73,"props":104,"children":105},{},[106],{"type":48,"value":107},"Run vision training jobs on Hugging Face Jobs infrastructure",{"type":42,"tag":73,"props":109,"children":110},{},[111],{"type":48,"value":112},"Ensure trained vision models are permanently saved to the Hub",{"type":42,"tag":57,"props":114,"children":116},{"id":115},"related-skills",[117],{"type":48,"value":118},"Related Skills",{"type":42,"tag":69,"props":120,"children":121},{},[122,145],{"type":42,"tag":73,"props":123,"children":124},{},[125,136,138,143],{"type":42,"tag":126,"props":127,"children":128},"strong",{},[129],{"type":42,"tag":130,"props":131,"children":133},"code",{"className":132},[],[134],{"type":48,"value":135},"hugging-face-jobs",{"type":48,"value":137}," — General HF Jobs infrastructure: token authentication, hardware flavors, timeout management, cost estimation, secrets, environment variables, scheduled jobs, and result persistence. ",{"type":42,"tag":126,"props":139,"children":140},{},[141],{"type":48,"value":142},"Refer to the Jobs skill for any non-training-specific Jobs questions",{"type":48,"value":144}," (e.g., \"how do secrets work?\", \"what hardware is available?\", \"how do I pass tokens?\").",{"type":42,"tag":73,"props":146,"children":147},{},[148,157],{"type":42,"tag":126,"props":149,"children":150},{},[151],{"type":42,"tag":130,"props":152,"children":154},{"className":153},[],[155],{"type":48,"value":156},"hugging-face-model-trainer",{"type":48,"value":158}," — TRL-based language model training (SFT, DPO, GRPO). Use that skill for text\u002Flanguage model fine-tuning.",{"type":42,"tag":57,"props":160,"children":162},{"id":161},"local-script-execution",[163],{"type":48,"value":164},"Local Script Execution",{"type":42,"tag":51,"props":166,"children":167},{},[168,170,176],{"type":48,"value":169},"Helper scripts use PEP 723 inline dependencies. Run them with ",{"type":42,"tag":130,"props":171,"children":173},{"className":172},[],[174],{"type":48,"value":175},"uv run",{"type":48,"value":177},":",{"type":42,"tag":179,"props":180,"children":185},"pre",{"className":181,"code":182,"language":183,"meta":184,"style":184},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","uv run scripts\u002Fdataset_inspector.py --dataset username\u002Fdataset-name --split train\nuv run scripts\u002Festimate_cost.py --help\n","bash","",[186],{"type":42,"tag":130,"props":187,"children":188},{"__ignoreMap":184},[189,232],{"type":42,"tag":190,"props":191,"children":194},"span",{"class":192,"line":193},"line",1,[195,201,207,212,217,222,227],{"type":42,"tag":190,"props":196,"children":198},{"style":197},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[199],{"type":48,"value":200},"uv",{"type":42,"tag":190,"props":202,"children":204},{"style":203},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[205],{"type":48,"value":206}," run",{"type":42,"tag":190,"props":208,"children":209},{"style":203},[210],{"type":48,"value":211}," scripts\u002Fdataset_inspector.py",{"type":42,"tag":190,"props":213,"children":214},{"style":203},[215],{"type":48,"value":216}," --dataset",{"type":42,"tag":190,"props":218,"children":219},{"style":203},[220],{"type":48,"value":221}," username\u002Fdataset-name",{"type":42,"tag":190,"props":223,"children":224},{"style":203},[225],{"type":48,"value":226}," --split",{"type":42,"tag":190,"props":228,"children":229},{"style":203},[230],{"type":48,"value":231}," train\n",{"type":42,"tag":190,"props":233,"children":235},{"class":192,"line":234},2,[236,240,244,249],{"type":42,"tag":190,"props":237,"children":238},{"style":197},[239],{"type":48,"value":200},{"type":42,"tag":190,"props":241,"children":242},{"style":203},[243],{"type":48,"value":206},{"type":42,"tag":190,"props":245,"children":246},{"style":203},[247],{"type":48,"value":248}," scripts\u002Festimate_cost.py",{"type":42,"tag":190,"props":250,"children":251},{"style":203},[252],{"type":48,"value":253}," --help\n",{"type":42,"tag":57,"props":255,"children":257},{"id":256},"prerequisites-checklist",[258],{"type":48,"value":259},"Prerequisites Checklist",{"type":42,"tag":51,"props":261,"children":262},{},[263],{"type":48,"value":264},"Before starting any training job, verify:",{"type":42,"tag":266,"props":267,"children":269},"h3",{"id":268},"account-authentication",[270],{"type":48,"value":271},"Account & Authentication",{"type":42,"tag":69,"props":273,"children":274},{},[275,308,329,341],{"type":42,"tag":73,"props":276,"children":277},{},[278,280,289,291,298,300,306],{"type":48,"value":279},"Hugging Face Account with ",{"type":42,"tag":281,"props":282,"children":286},"a",{"href":283,"rel":284},"https:\u002F\u002Fhf.co\u002Fpro",[285],"nofollow",[287],{"type":48,"value":288},"Pro",{"type":48,"value":290},", ",{"type":42,"tag":281,"props":292,"children":295},{"href":293,"rel":294},"https:\u002F\u002Fhf.co\u002Fenterprise",[285],[296],{"type":48,"value":297},"Team",{"type":48,"value":299},", or ",{"type":42,"tag":281,"props":301,"children":303},{"href":293,"rel":302},[285],[304],{"type":48,"value":305},"Enterprise",{"type":48,"value":307}," plan (Jobs require paid plan)",{"type":42,"tag":73,"props":309,"children":310},{},[311,313,319,321,327],{"type":48,"value":312},"Authenticated login: Check with ",{"type":42,"tag":130,"props":314,"children":316},{"className":315},[],[317],{"type":48,"value":318},"hf_whoami()",{"type":48,"value":320}," (tool) or ",{"type":42,"tag":130,"props":322,"children":324},{"className":323},[],[325],{"type":48,"value":326},"hf auth whoami",{"type":48,"value":328}," (terminal)",{"type":42,"tag":73,"props":330,"children":331},{},[332,334,339],{"type":48,"value":333},"Token has ",{"type":42,"tag":126,"props":335,"children":336},{},[337],{"type":48,"value":338},"write",{"type":48,"value":340}," permissions",{"type":42,"tag":73,"props":342,"children":343},{},[344,349],{"type":42,"tag":126,"props":345,"children":346},{},[347],{"type":48,"value":348},"MUST pass token in job secrets",{"type":48,"value":350}," — see directive #3 below for syntax (MCP tool vs Python API)",{"type":42,"tag":266,"props":352,"children":354},{"id":353},"dataset-requirements-object-detection",[355],{"type":48,"value":356},"Dataset Requirements — Object Detection",{"type":42,"tag":69,"props":358,"children":359},{},[360,365,401,420,432,450],{"type":42,"tag":73,"props":361,"children":362},{},[363],{"type":48,"value":364},"Dataset must exist on Hub",{"type":42,"tag":73,"props":366,"children":367},{},[368,370,376,378,384,385,391,393,399],{"type":48,"value":369},"Annotations must use the ",{"type":42,"tag":130,"props":371,"children":373},{"className":372},[],[374],{"type":48,"value":375},"objects",{"type":48,"value":377}," column with ",{"type":42,"tag":130,"props":379,"children":381},{"className":380},[],[382],{"type":48,"value":383},"bbox",{"type":48,"value":290},{"type":42,"tag":130,"props":386,"children":388},{"className":387},[],[389],{"type":48,"value":390},"category",{"type":48,"value":392}," (and optionally ",{"type":42,"tag":130,"props":394,"children":396},{"className":395},[],[397],{"type":48,"value":398},"area",{"type":48,"value":400},") sub-fields",{"type":42,"tag":73,"props":402,"children":403},{},[404,406,411,413,418],{"type":48,"value":405},"Bboxes can be in ",{"type":42,"tag":126,"props":407,"children":408},{},[409],{"type":48,"value":410},"xywh (COCO)",{"type":48,"value":412}," or ",{"type":42,"tag":126,"props":414,"children":415},{},[416],{"type":48,"value":417},"xyxy (Pascal VOC)",{"type":48,"value":419}," format — auto-detected and converted",{"type":42,"tag":73,"props":421,"children":422},{},[423,425,430],{"type":48,"value":424},"Categories can be ",{"type":42,"tag":126,"props":426,"children":427},{},[428],{"type":48,"value":429},"integers or strings",{"type":48,"value":431}," — strings are auto-remapped to integer IDs",{"type":42,"tag":73,"props":433,"children":434},{},[435,441,443,448],{"type":42,"tag":130,"props":436,"children":438},{"className":437},[],[439],{"type":48,"value":440},"image_id",{"type":48,"value":442}," column is ",{"type":42,"tag":126,"props":444,"children":445},{},[446],{"type":48,"value":447},"optional",{"type":48,"value":449}," — generated automatically if missing",{"type":42,"tag":73,"props":451,"children":452},{},[453,458],{"type":42,"tag":126,"props":454,"children":455},{},[456],{"type":48,"value":457},"ALWAYS validate unknown datasets",{"type":48,"value":459}," before GPU training (see Dataset Validation section)",{"type":42,"tag":266,"props":461,"children":463},{"id":462},"dataset-requirements-image-classification",[464],{"type":48,"value":465},"Dataset Requirements — Image Classification",{"type":42,"tag":69,"props":467,"children":468},{},[469,473,503,516,547],{"type":42,"tag":73,"props":470,"children":471},{},[472],{"type":48,"value":364},{"type":42,"tag":73,"props":474,"children":475},{},[476,478,489,491,501],{"type":48,"value":477},"Must have an ",{"type":42,"tag":126,"props":479,"children":480},{},[481,487],{"type":42,"tag":130,"props":482,"children":484},{"className":483},[],[485],{"type":48,"value":486},"image",{"type":48,"value":488}," column",{"type":48,"value":490}," (PIL images) and a ",{"type":42,"tag":126,"props":492,"children":493},{},[494,500],{"type":42,"tag":130,"props":495,"children":497},{"className":496},[],[498],{"type":48,"value":499},"label",{"type":48,"value":488},{"type":48,"value":502}," (integer class IDs or strings)",{"type":42,"tag":73,"props":504,"children":505},{},[506,508,514],{"type":48,"value":507},"The label column can be ",{"type":42,"tag":130,"props":509,"children":511},{"className":510},[],[512],{"type":48,"value":513},"ClassLabel",{"type":48,"value":515}," type (with names) or plain integers\u002Fstrings — strings are auto-remapped",{"type":42,"tag":73,"props":517,"children":518},{},[519,521,526,527,533,534,540,541],{"type":48,"value":520},"Common column names auto-detected: ",{"type":42,"tag":130,"props":522,"children":524},{"className":523},[],[525],{"type":48,"value":499},{"type":48,"value":290},{"type":42,"tag":130,"props":528,"children":530},{"className":529},[],[531],{"type":48,"value":532},"labels",{"type":48,"value":290},{"type":42,"tag":130,"props":535,"children":537},{"className":536},[],[538],{"type":48,"value":539},"class",{"type":48,"value":290},{"type":42,"tag":130,"props":542,"children":544},{"className":543},[],[545],{"type":48,"value":546},"fine_label",{"type":42,"tag":73,"props":548,"children":549},{},[550,554],{"type":42,"tag":126,"props":551,"children":552},{},[553],{"type":48,"value":457},{"type":48,"value":459},{"type":42,"tag":266,"props":556,"children":558},{"id":557},"dataset-requirements-samsam2-segmentation",[559],{"type":48,"value":560},"Dataset Requirements — SAM\u002FSAM2 Segmentation",{"type":42,"tag":69,"props":562,"children":563},{},[564,568,594,688,700,713],{"type":42,"tag":73,"props":565,"children":566},{},[567],{"type":48,"value":364},{"type":42,"tag":73,"props":569,"children":570},{},[571,572,581,582,592],{"type":48,"value":477},{"type":42,"tag":126,"props":573,"children":574},{},[575,580],{"type":42,"tag":130,"props":576,"children":578},{"className":577},[],[579],{"type":48,"value":486},{"type":48,"value":488},{"type":48,"value":490},{"type":42,"tag":126,"props":583,"children":584},{},[585,591],{"type":42,"tag":130,"props":586,"children":588},{"className":587},[],[589],{"type":48,"value":590},"mask",{"type":48,"value":488},{"type":48,"value":593}," (binary ground-truth segmentation mask)",{"type":42,"tag":73,"props":595,"children":596},{},[597,599,604,606],{"type":48,"value":598},"Must have a ",{"type":42,"tag":126,"props":600,"children":601},{},[602],{"type":48,"value":603},"prompt",{"type":48,"value":605}," — either:\n",{"type":42,"tag":69,"props":607,"children":608},{},[609,638,660],{"type":42,"tag":73,"props":610,"children":611},{},[612,614,623,625,631,632],{"type":48,"value":613},"A ",{"type":42,"tag":126,"props":615,"children":616},{},[617,622],{"type":42,"tag":130,"props":618,"children":620},{"className":619},[],[621],{"type":48,"value":603},{"type":48,"value":488},{"type":48,"value":624}," with JSON containing ",{"type":42,"tag":130,"props":626,"children":628},{"className":627},[],[629],{"type":48,"value":630},"{\"bbox\": [x0,y0,x1,y1]}",{"type":48,"value":412},{"type":42,"tag":130,"props":633,"children":635},{"className":634},[],[636],{"type":48,"value":637},"{\"point\": [x,y]}",{"type":42,"tag":73,"props":639,"children":640},{},[641,643,651,652,658],{"type":48,"value":642},"OR a dedicated ",{"type":42,"tag":126,"props":644,"children":645},{},[646],{"type":42,"tag":130,"props":647,"children":649},{"className":648},[],[650],{"type":48,"value":383},{"type":48,"value":377},{"type":42,"tag":130,"props":653,"children":655},{"className":654},[],[656],{"type":48,"value":657},"[x0,y0,x1,y1]",{"type":48,"value":659}," values",{"type":42,"tag":73,"props":661,"children":662},{},[663,664,673,674,680,681,687],{"type":48,"value":642},{"type":42,"tag":126,"props":665,"children":666},{},[667],{"type":42,"tag":130,"props":668,"children":670},{"className":669},[],[671],{"type":48,"value":672},"point",{"type":48,"value":377},{"type":42,"tag":130,"props":675,"children":677},{"className":676},[],[678],{"type":48,"value":679},"[x,y]",{"type":48,"value":412},{"type":42,"tag":130,"props":682,"children":684},{"className":683},[],[685],{"type":48,"value":686},"[[x,y],...]",{"type":48,"value":659},{"type":42,"tag":73,"props":689,"children":690},{},[691,693,698],{"type":48,"value":692},"Bboxes should be in ",{"type":42,"tag":126,"props":694,"children":695},{},[696],{"type":48,"value":697},"xyxy",{"type":48,"value":699}," format (absolute pixel coordinates)",{"type":42,"tag":73,"props":701,"children":702},{},[703,705,711],{"type":48,"value":704},"Example dataset: ",{"type":42,"tag":130,"props":706,"children":708},{"className":707},[],[709],{"type":48,"value":710},"merve\u002FMicroMat-mini",{"type":48,"value":712}," (image matting with bbox prompts)",{"type":42,"tag":73,"props":714,"children":715},{},[716,720],{"type":42,"tag":126,"props":717,"children":718},{},[719],{"type":48,"value":457},{"type":48,"value":459},{"type":42,"tag":266,"props":722,"children":724},{"id":723},"critical-settings",[725],{"type":48,"value":726},"Critical Settings",{"type":42,"tag":69,"props":728,"children":729},{},[730,740],{"type":42,"tag":73,"props":731,"children":732},{},[733,738],{"type":42,"tag":126,"props":734,"children":735},{},[736],{"type":48,"value":737},"Timeout must exceed expected training time",{"type":48,"value":739}," — Default 30min is TOO SHORT. See directive #6 for recommended values.",{"type":42,"tag":73,"props":741,"children":742},{},[743,748,750,756,757,763,765],{"type":42,"tag":126,"props":744,"children":745},{},[746],{"type":48,"value":747},"Hub push must be enabled",{"type":48,"value":749}," — ",{"type":42,"tag":130,"props":751,"children":753},{"className":752},[],[754],{"type":48,"value":755},"push_to_hub=True",{"type":48,"value":290},{"type":42,"tag":130,"props":758,"children":760},{"className":759},[],[761],{"type":48,"value":762},"hub_model_id=\"username\u002Fmodel-name\"",{"type":48,"value":764},", token in ",{"type":42,"tag":130,"props":766,"children":768},{"className":767},[],[769],{"type":48,"value":770},"secrets",{"type":42,"tag":57,"props":772,"children":774},{"id":773},"dataset-validation",[775],{"type":48,"value":776},"Dataset Validation",{"type":42,"tag":51,"props":778,"children":779},{},[780],{"type":42,"tag":126,"props":781,"children":782},{},[783],{"type":48,"value":784},"Validate dataset format BEFORE launching GPU training to prevent the #1 cause of training failures: format mismatches.",{"type":42,"tag":51,"props":786,"children":787},{},[788,793,795,800,802,808],{"type":42,"tag":126,"props":789,"children":790},{},[791],{"type":48,"value":792},"ALWAYS validate for",{"type":48,"value":794}," unknown\u002Fcustom datasets or any dataset you haven't trained with before. ",{"type":42,"tag":126,"props":796,"children":797},{},[798],{"type":48,"value":799},"Skip for",{"type":48,"value":801}," ",{"type":42,"tag":130,"props":803,"children":805},{"className":804},[],[806],{"type":48,"value":807},"cppe-5",{"type":48,"value":809}," (the default in the training script).",{"type":42,"tag":266,"props":811,"children":813},{"id":812},"running-the-inspector",[814],{"type":48,"value":815},"Running the Inspector",{"type":42,"tag":51,"props":817,"children":818},{},[819],{"type":42,"tag":126,"props":820,"children":821},{},[822],{"type":48,"value":823},"Option 1: Via HF Jobs (recommended — avoids local SSL\u002Fdependency issues):",{"type":42,"tag":179,"props":825,"children":829},{"className":826,"code":827,"language":828,"meta":184,"style":184},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","hf_jobs(\"uv\", {\n    \"script\": \"path\u002Fto\u002Fdataset_inspector.py\",\n    \"script_args\": [\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"]\n})\n","python",[830],{"type":42,"tag":130,"props":831,"children":832},{"__ignoreMap":184},[833,841,849,858],{"type":42,"tag":190,"props":834,"children":835},{"class":192,"line":193},[836],{"type":42,"tag":190,"props":837,"children":838},{},[839],{"type":48,"value":840},"hf_jobs(\"uv\", {\n",{"type":42,"tag":190,"props":842,"children":843},{"class":192,"line":234},[844],{"type":42,"tag":190,"props":845,"children":846},{},[847],{"type":48,"value":848},"    \"script\": \"path\u002Fto\u002Fdataset_inspector.py\",\n",{"type":42,"tag":190,"props":850,"children":852},{"class":192,"line":851},3,[853],{"type":42,"tag":190,"props":854,"children":855},{},[856],{"type":48,"value":857},"    \"script_args\": [\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"]\n",{"type":42,"tag":190,"props":859,"children":861},{"class":192,"line":860},4,[862],{"type":42,"tag":190,"props":863,"children":864},{},[865],{"type":48,"value":866},"})\n",{"type":42,"tag":51,"props":868,"children":869},{},[870],{"type":42,"tag":126,"props":871,"children":872},{},[873],{"type":48,"value":874},"Option 2: Locally:",{"type":42,"tag":179,"props":876,"children":878},{"className":181,"code":877,"language":183,"meta":184,"style":184},"uv run scripts\u002Fdataset_inspector.py --dataset username\u002Fdataset-name --split train\n",[879],{"type":42,"tag":130,"props":880,"children":881},{"__ignoreMap":184},[882],{"type":42,"tag":190,"props":883,"children":884},{"class":192,"line":193},[885,889,893,897,901,905,909],{"type":42,"tag":190,"props":886,"children":887},{"style":197},[888],{"type":48,"value":200},{"type":42,"tag":190,"props":890,"children":891},{"style":203},[892],{"type":48,"value":206},{"type":42,"tag":190,"props":894,"children":895},{"style":203},[896],{"type":48,"value":211},{"type":42,"tag":190,"props":898,"children":899},{"style":203},[900],{"type":48,"value":216},{"type":42,"tag":190,"props":902,"children":903},{"style":203},[904],{"type":48,"value":221},{"type":42,"tag":190,"props":906,"children":907},{"style":203},[908],{"type":48,"value":226},{"type":42,"tag":190,"props":910,"children":911},{"style":203},[912],{"type":48,"value":231},{"type":42,"tag":51,"props":914,"children":915},{},[916],{"type":42,"tag":126,"props":917,"children":918},{},[919,921,927],{"type":48,"value":920},"Option 3: Via ",{"type":42,"tag":130,"props":922,"children":924},{"className":923},[],[925],{"type":48,"value":926},"HfApi().run_uv_job()",{"type":48,"value":928}," (if hf_jobs MCP unavailable):",{"type":42,"tag":179,"props":930,"children":932},{"className":826,"code":931,"language":828,"meta":184,"style":184},"from huggingface_hub import HfApi\napi = HfApi()\napi.run_uv_job(\n    script=\"scripts\u002Fdataset_inspector.py\",\n    script_args=[\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"],\n    flavor=\"cpu-basic\",\n    timeout=300,\n)\n",[933],{"type":42,"tag":130,"props":934,"children":935},{"__ignoreMap":184},[936,944,952,960,968,977,986,995],{"type":42,"tag":190,"props":937,"children":938},{"class":192,"line":193},[939],{"type":42,"tag":190,"props":940,"children":941},{},[942],{"type":48,"value":943},"from huggingface_hub import HfApi\n",{"type":42,"tag":190,"props":945,"children":946},{"class":192,"line":234},[947],{"type":42,"tag":190,"props":948,"children":949},{},[950],{"type":48,"value":951},"api = HfApi()\n",{"type":42,"tag":190,"props":953,"children":954},{"class":192,"line":851},[955],{"type":42,"tag":190,"props":956,"children":957},{},[958],{"type":48,"value":959},"api.run_uv_job(\n",{"type":42,"tag":190,"props":961,"children":962},{"class":192,"line":860},[963],{"type":42,"tag":190,"props":964,"children":965},{},[966],{"type":48,"value":967},"    script=\"scripts\u002Fdataset_inspector.py\",\n",{"type":42,"tag":190,"props":969,"children":971},{"class":192,"line":970},5,[972],{"type":42,"tag":190,"props":973,"children":974},{},[975],{"type":48,"value":976},"    script_args=[\"--dataset\", \"username\u002Fdataset-name\", \"--split\", \"train\"],\n",{"type":42,"tag":190,"props":978,"children":980},{"class":192,"line":979},6,[981],{"type":42,"tag":190,"props":982,"children":983},{},[984],{"type":48,"value":985},"    flavor=\"cpu-basic\",\n",{"type":42,"tag":190,"props":987,"children":989},{"class":192,"line":988},7,[990],{"type":42,"tag":190,"props":991,"children":992},{},[993],{"type":48,"value":994},"    timeout=300,\n",{"type":42,"tag":190,"props":996,"children":998},{"class":192,"line":997},8,[999],{"type":42,"tag":190,"props":1000,"children":1001},{},[1002],{"type":48,"value":1003},")\n",{"type":42,"tag":266,"props":1005,"children":1007},{"id":1006},"reading-results",[1008],{"type":48,"value":1009},"Reading Results",{"type":42,"tag":69,"props":1011,"children":1012},{},[1013,1027],{"type":42,"tag":73,"props":1014,"children":1015},{},[1016,1025],{"type":42,"tag":126,"props":1017,"children":1018},{},[1019],{"type":42,"tag":130,"props":1020,"children":1022},{"className":1021},[],[1023],{"type":48,"value":1024},"✓ READY",{"type":48,"value":1026}," — Dataset is compatible, use directly",{"type":42,"tag":73,"props":1028,"children":1029},{},[1030,1039],{"type":42,"tag":126,"props":1031,"children":1032},{},[1033],{"type":42,"tag":130,"props":1034,"children":1036},{"className":1035},[],[1037],{"type":48,"value":1038},"✗ NEEDS FORMATTING",{"type":48,"value":1040}," — Needs preprocessing (mapping code provided in output)",{"type":42,"tag":57,"props":1042,"children":1044},{"id":1043},"automatic-bbox-preprocessing",[1045],{"type":48,"value":1046},"Automatic Bbox Preprocessing",{"type":42,"tag":51,"props":1048,"children":1049},{},[1050,1052,1058,1060,1065,1067,1072,1074,1080,1082,1088],{"type":48,"value":1051},"The object detection training script (",{"type":42,"tag":130,"props":1053,"children":1055},{"className":1054},[],[1056],{"type":48,"value":1057},"scripts\u002Fobject_detection_training.py",{"type":48,"value":1059},") automatically handles bbox format detection (xyxy→xywh conversion), bbox sanitization, ",{"type":42,"tag":130,"props":1061,"children":1063},{"className":1062},[],[1064],{"type":48,"value":440},{"type":48,"value":1066}," generation, string category→integer remapping, and dataset truncation. ",{"type":42,"tag":126,"props":1068,"children":1069},{},[1070],{"type":48,"value":1071},"No manual preprocessing needed",{"type":48,"value":1073}," — just ensure the dataset has ",{"type":42,"tag":130,"props":1075,"children":1077},{"className":1076},[],[1078],{"type":48,"value":1079},"objects.bbox",{"type":48,"value":1081}," and ",{"type":42,"tag":130,"props":1083,"children":1085},{"className":1084},[],[1086],{"type":48,"value":1087},"objects.category",{"type":48,"value":1089}," columns.",{"type":42,"tag":57,"props":1091,"children":1093},{"id":1092},"training-workflow",[1094],{"type":48,"value":1095},"Training workflow",{"type":42,"tag":51,"props":1097,"children":1098},{},[1099],{"type":48,"value":1100},"Copy this checklist and track progress:",{"type":42,"tag":179,"props":1102,"children":1106},{"className":1103,"code":1105,"language":48},[1104],"language-text","Training Progress:\n- [ ] Step 1: Verify prerequisites (account, token, dataset)\n- [ ] Step 2: Validate dataset format (run dataset_inspector.py)\n- [ ] Step 3: Ask user about dataset size and validation split\n- [ ] Step 4: Prepare training script (OD: scripts\u002Fobject_detection_training.py, IC: scripts\u002Fimage_classification_training.py, SAM: scripts\u002Fsam_segmentation_training.py)\n- [ ] Step 5: Save script locally, submit job, and report details\n",[1107],{"type":42,"tag":130,"props":1108,"children":1109},{"__ignoreMap":184},[1110],{"type":48,"value":1105},{"type":42,"tag":51,"props":1112,"children":1113},{},[1114],{"type":42,"tag":126,"props":1115,"children":1116},{},[1117],{"type":48,"value":1118},"Step 1: Verify prerequisites",{"type":42,"tag":51,"props":1120,"children":1121},{},[1122],{"type":48,"value":1123},"Follow the Prerequisites Checklist above.",{"type":42,"tag":51,"props":1125,"children":1126},{},[1127],{"type":42,"tag":126,"props":1128,"children":1129},{},[1130],{"type":48,"value":1131},"Step 2: Validate dataset",{"type":42,"tag":51,"props":1133,"children":1134},{},[1135],{"type":48,"value":1136},"Run the dataset inspector BEFORE spending GPU time. See \"Dataset Validation\" section above.",{"type":42,"tag":51,"props":1138,"children":1139},{},[1140],{"type":42,"tag":126,"props":1141,"children":1142},{},[1143],{"type":48,"value":1144},"Step 3: Ask user preferences",{"type":42,"tag":51,"props":1146,"children":1147},{},[1148],{"type":48,"value":1149},"ALWAYS use the AskUserQuestion tool with option-style format:",{"type":42,"tag":179,"props":1151,"children":1153},{"className":826,"code":1152,"language":828,"meta":184,"style":184},"AskUserQuestion({\n    \"questions\": [\n        {\n            \"question\": \"Do you want to run a quick test with a subset of the data first?\",\n            \"header\": \"Dataset Size\",\n            \"options\": [\n                {\"label\": \"Quick test run (10% of data)\", \"description\": \"Faster, cheaper (~30-60 min, ~$2-5) to validate setup\"},\n                {\"label\": \"Full dataset (Recommended)\", \"description\": \"Complete training for best model quality\"}\n            ],\n            \"multiSelect\": false\n        },\n        {\n            \"question\": \"Do you want to create a validation split from the training data?\",\n            \"header\": \"Split data\",\n            \"options\": [\n                {\"label\": \"Yes (Recommended)\", \"description\": \"Automatically split 15% of training data for validation\"},\n                {\"label\": \"No\", \"description\": \"Use existing validation split from dataset\"}\n            ],\n            \"multiSelect\": false\n        },\n        {\n            \"question\": \"Which GPU hardware do you want to use?\",\n            \"header\": \"Hardware Flavor\",\n            \"options\": [\n                {\"label\": \"t4-small ($0.40\u002Fhr)\", \"description\": \"1x T4, 16 GB VRAM — sufficient for all OD models under 100M params\"},\n                {\"label\": \"l4x1 ($0.80\u002Fhr)\", \"description\": \"1x L4, 24 GB VRAM — more headroom for large images or batch sizes\"},\n                {\"label\": \"a10g-large ($1.50\u002Fhr)\", \"description\": \"1x A10G, 24 GB VRAM — faster training, more CPU\u002FRAM\"},\n                {\"label\": \"a100-large ($2.50\u002Fhr)\", \"description\": \"1x A100, 80 GB VRAM — fastest, for very large datasets or image sizes\"}\n            ],\n            \"multiSelect\": false\n        }\n    ]\n})\n",[1154],{"type":42,"tag":130,"props":1155,"children":1156},{"__ignoreMap":184},[1157,1165,1173,1181,1189,1197,1205,1213,1221,1230,1239,1248,1256,1265,1274,1282,1291,1300,1308,1316,1324,1332,1341,1350,1358,1367,1376,1385,1394,1402,1410,1419,1428],{"type":42,"tag":190,"props":1158,"children":1159},{"class":192,"line":193},[1160],{"type":42,"tag":190,"props":1161,"children":1162},{},[1163],{"type":48,"value":1164},"AskUserQuestion({\n",{"type":42,"tag":190,"props":1166,"children":1167},{"class":192,"line":234},[1168],{"type":42,"tag":190,"props":1169,"children":1170},{},[1171],{"type":48,"value":1172},"    \"questions\": [\n",{"type":42,"tag":190,"props":1174,"children":1175},{"class":192,"line":851},[1176],{"type":42,"tag":190,"props":1177,"children":1178},{},[1179],{"type":48,"value":1180},"        {\n",{"type":42,"tag":190,"props":1182,"children":1183},{"class":192,"line":860},[1184],{"type":42,"tag":190,"props":1185,"children":1186},{},[1187],{"type":48,"value":1188},"            \"question\": \"Do you want to run a quick test with a subset of the data first?\",\n",{"type":42,"tag":190,"props":1190,"children":1191},{"class":192,"line":970},[1192],{"type":42,"tag":190,"props":1193,"children":1194},{},[1195],{"type":48,"value":1196},"            \"header\": \"Dataset Size\",\n",{"type":42,"tag":190,"props":1198,"children":1199},{"class":192,"line":979},[1200],{"type":42,"tag":190,"props":1201,"children":1202},{},[1203],{"type":48,"value":1204},"            \"options\": [\n",{"type":42,"tag":190,"props":1206,"children":1207},{"class":192,"line":988},[1208],{"type":42,"tag":190,"props":1209,"children":1210},{},[1211],{"type":48,"value":1212},"                {\"label\": \"Quick test run (10% of data)\", \"description\": \"Faster, cheaper (~30-60 min, ~$2-5) to validate setup\"},\n",{"type":42,"tag":190,"props":1214,"children":1215},{"class":192,"line":997},[1216],{"type":42,"tag":190,"props":1217,"children":1218},{},[1219],{"type":48,"value":1220},"                {\"label\": \"Full dataset (Recommended)\", \"description\": \"Complete training for best model quality\"}\n",{"type":42,"tag":190,"props":1222,"children":1224},{"class":192,"line":1223},9,[1225],{"type":42,"tag":190,"props":1226,"children":1227},{},[1228],{"type":48,"value":1229},"            ],\n",{"type":42,"tag":190,"props":1231,"children":1233},{"class":192,"line":1232},10,[1234],{"type":42,"tag":190,"props":1235,"children":1236},{},[1237],{"type":48,"value":1238},"            \"multiSelect\": false\n",{"type":42,"tag":190,"props":1240,"children":1242},{"class":192,"line":1241},11,[1243],{"type":42,"tag":190,"props":1244,"children":1245},{},[1246],{"type":48,"value":1247},"        },\n",{"type":42,"tag":190,"props":1249,"children":1251},{"class":192,"line":1250},12,[1252],{"type":42,"tag":190,"props":1253,"children":1254},{},[1255],{"type":48,"value":1180},{"type":42,"tag":190,"props":1257,"children":1259},{"class":192,"line":1258},13,[1260],{"type":42,"tag":190,"props":1261,"children":1262},{},[1263],{"type":48,"value":1264},"            \"question\": \"Do you want to create a validation split from the training data?\",\n",{"type":42,"tag":190,"props":1266,"children":1268},{"class":192,"line":1267},14,[1269],{"type":42,"tag":190,"props":1270,"children":1271},{},[1272],{"type":48,"value":1273},"            \"header\": \"Split data\",\n",{"type":42,"tag":190,"props":1275,"children":1277},{"class":192,"line":1276},15,[1278],{"type":42,"tag":190,"props":1279,"children":1280},{},[1281],{"type":48,"value":1204},{"type":42,"tag":190,"props":1283,"children":1285},{"class":192,"line":1284},16,[1286],{"type":42,"tag":190,"props":1287,"children":1288},{},[1289],{"type":48,"value":1290},"                {\"label\": \"Yes (Recommended)\", \"description\": \"Automatically split 15% of training data for validation\"},\n",{"type":42,"tag":190,"props":1292,"children":1294},{"class":192,"line":1293},17,[1295],{"type":42,"tag":190,"props":1296,"children":1297},{},[1298],{"type":48,"value":1299},"                {\"label\": \"No\", \"description\": \"Use existing validation split from dataset\"}\n",{"type":42,"tag":190,"props":1301,"children":1303},{"class":192,"line":1302},18,[1304],{"type":42,"tag":190,"props":1305,"children":1306},{},[1307],{"type":48,"value":1229},{"type":42,"tag":190,"props":1309,"children":1311},{"class":192,"line":1310},19,[1312],{"type":42,"tag":190,"props":1313,"children":1314},{},[1315],{"type":48,"value":1238},{"type":42,"tag":190,"props":1317,"children":1319},{"class":192,"line":1318},20,[1320],{"type":42,"tag":190,"props":1321,"children":1322},{},[1323],{"type":48,"value":1247},{"type":42,"tag":190,"props":1325,"children":1327},{"class":192,"line":1326},21,[1328],{"type":42,"tag":190,"props":1329,"children":1330},{},[1331],{"type":48,"value":1180},{"type":42,"tag":190,"props":1333,"children":1335},{"class":192,"line":1334},22,[1336],{"type":42,"tag":190,"props":1337,"children":1338},{},[1339],{"type":48,"value":1340},"            \"question\": \"Which GPU hardware do you want to use?\",\n",{"type":42,"tag":190,"props":1342,"children":1344},{"class":192,"line":1343},23,[1345],{"type":42,"tag":190,"props":1346,"children":1347},{},[1348],{"type":48,"value":1349},"            \"header\": \"Hardware Flavor\",\n",{"type":42,"tag":190,"props":1351,"children":1353},{"class":192,"line":1352},24,[1354],{"type":42,"tag":190,"props":1355,"children":1356},{},[1357],{"type":48,"value":1204},{"type":42,"tag":190,"props":1359,"children":1361},{"class":192,"line":1360},25,[1362],{"type":42,"tag":190,"props":1363,"children":1364},{},[1365],{"type":48,"value":1366},"                {\"label\": \"t4-small ($0.40\u002Fhr)\", \"description\": \"1x T4, 16 GB VRAM — sufficient for all OD models under 100M params\"},\n",{"type":42,"tag":190,"props":1368,"children":1370},{"class":192,"line":1369},26,[1371],{"type":42,"tag":190,"props":1372,"children":1373},{},[1374],{"type":48,"value":1375},"                {\"label\": \"l4x1 ($0.80\u002Fhr)\", \"description\": \"1x L4, 24 GB VRAM — more headroom for large images or batch sizes\"},\n",{"type":42,"tag":190,"props":1377,"children":1379},{"class":192,"line":1378},27,[1380],{"type":42,"tag":190,"props":1381,"children":1382},{},[1383],{"type":48,"value":1384},"                {\"label\": \"a10g-large ($1.50\u002Fhr)\", \"description\": \"1x A10G, 24 GB VRAM — faster training, more CPU\u002FRAM\"},\n",{"type":42,"tag":190,"props":1386,"children":1388},{"class":192,"line":1387},28,[1389],{"type":42,"tag":190,"props":1390,"children":1391},{},[1392],{"type":48,"value":1393},"                {\"label\": \"a100-large ($2.50\u002Fhr)\", \"description\": \"1x A100, 80 GB VRAM — fastest, for very large datasets or image sizes\"}\n",{"type":42,"tag":190,"props":1395,"children":1397},{"class":192,"line":1396},29,[1398],{"type":42,"tag":190,"props":1399,"children":1400},{},[1401],{"type":48,"value":1229},{"type":42,"tag":190,"props":1403,"children":1405},{"class":192,"line":1404},30,[1406],{"type":42,"tag":190,"props":1407,"children":1408},{},[1409],{"type":48,"value":1238},{"type":42,"tag":190,"props":1411,"children":1413},{"class":192,"line":1412},31,[1414],{"type":42,"tag":190,"props":1415,"children":1416},{},[1417],{"type":48,"value":1418},"        }\n",{"type":42,"tag":190,"props":1420,"children":1422},{"class":192,"line":1421},32,[1423],{"type":42,"tag":190,"props":1424,"children":1425},{},[1426],{"type":48,"value":1427},"    ]\n",{"type":42,"tag":190,"props":1429,"children":1431},{"class":192,"line":1430},33,[1432],{"type":42,"tag":190,"props":1433,"children":1434},{},[1435],{"type":48,"value":866},{"type":42,"tag":51,"props":1437,"children":1438},{},[1439],{"type":42,"tag":126,"props":1440,"children":1441},{},[1442],{"type":48,"value":1443},"Step 4: Prepare training script",{"type":42,"tag":51,"props":1445,"children":1446},{},[1447,1449,1453,1455,1460,1462,1467,1469,1475,1477,1483,1485,1490,1492,1497],{"type":48,"value":1448},"For object detection, use ",{"type":42,"tag":281,"props":1450,"children":1451},{"href":1057},[1452],{"type":48,"value":1057},{"type":48,"value":1454}," as the production-ready template. For image classification, use ",{"type":42,"tag":281,"props":1456,"children":1458},{"href":1457},"scripts\u002Fimage_classification_training.py",[1459],{"type":48,"value":1457},{"type":48,"value":1461},". For SAM\u002FSAM2 segmentation, use ",{"type":42,"tag":281,"props":1463,"children":1465},{"href":1464},"scripts\u002Fsam_segmentation_training.py",[1466],{"type":48,"value":1464},{"type":48,"value":1468},". All scripts use ",{"type":42,"tag":130,"props":1470,"children":1472},{"className":1471},[],[1473],{"type":48,"value":1474},"HfArgumentParser",{"type":48,"value":1476}," — all configuration is passed via CLI arguments in ",{"type":42,"tag":130,"props":1478,"children":1480},{"className":1479},[],[1481],{"type":48,"value":1482},"script_args",{"type":48,"value":1484},", NOT by editing Python variables. For timm model details, see ",{"type":42,"tag":281,"props":1486,"children":1488},{"href":1487},"references\u002Ftimm_trainer.md",[1489],{"type":48,"value":1487},{"type":48,"value":1491},". For SAM2 training details, see ",{"type":42,"tag":281,"props":1493,"children":1495},{"href":1494},"references\u002Ffinetune_sam2_trainer.md",[1496],{"type":48,"value":1494},{"type":48,"value":1498},".",{"type":42,"tag":51,"props":1500,"children":1501},{},[1502],{"type":42,"tag":126,"props":1503,"children":1504},{},[1505],{"type":48,"value":1506},"Step 5: Save script, submit job, and report",{"type":42,"tag":1508,"props":1509,"children":1510},"ol",{},[1511,1537,1568,1594],{"type":42,"tag":73,"props":1512,"children":1513},{},[1514,1519,1521,1527,1529,1535],{"type":42,"tag":126,"props":1515,"children":1516},{},[1517],{"type":48,"value":1518},"Save the script locally",{"type":48,"value":1520}," to ",{"type":42,"tag":130,"props":1522,"children":1524},{"className":1523},[],[1525],{"type":48,"value":1526},"submitted_jobs\u002F",{"type":48,"value":1528}," in the workspace root (create if needed) with a descriptive name like ",{"type":42,"tag":130,"props":1530,"children":1532},{"className":1531},[],[1533],{"type":48,"value":1534},"training_\u003Cdataset>_\u003CYYYYMMDD_HHMMSS>.py",{"type":48,"value":1536},". Tell the user the path.",{"type":42,"tag":73,"props":1538,"children":1539},{},[1540,1545,1547,1553,1555,1560,1562,1567],{"type":42,"tag":126,"props":1541,"children":1542},{},[1543],{"type":48,"value":1544},"Submit",{"type":48,"value":1546}," using ",{"type":42,"tag":130,"props":1548,"children":1550},{"className":1549},[],[1551],{"type":48,"value":1552},"hf_jobs",{"type":48,"value":1554}," MCP tool (preferred) or ",{"type":42,"tag":130,"props":1556,"children":1558},{"className":1557},[],[1559],{"type":48,"value":926},{"type":48,"value":1561}," — see directive #1 for both methods. Pass all config via ",{"type":42,"tag":130,"props":1563,"children":1565},{"className":1564},[],[1566],{"type":48,"value":1482},{"type":48,"value":1498},{"type":42,"tag":73,"props":1569,"children":1570},{},[1571,1576,1578,1584,1586,1592],{"type":42,"tag":126,"props":1572,"children":1573},{},[1574],{"type":48,"value":1575},"Report",{"type":48,"value":1577}," the job ID (from ",{"type":42,"tag":130,"props":1579,"children":1581},{"className":1580},[],[1582],{"type":48,"value":1583},".id",{"type":48,"value":1585}," attribute), monitoring URL, Trackio dashboard (",{"type":42,"tag":130,"props":1587,"children":1589},{"className":1588},[],[1590],{"type":48,"value":1591},"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002F{username}\u002Ftrackio",{"type":48,"value":1593},"), expected time, and estimated cost.",{"type":42,"tag":73,"props":1595,"children":1596},{},[1597,1602],{"type":42,"tag":126,"props":1598,"children":1599},{},[1600],{"type":48,"value":1601},"Wait for user",{"type":48,"value":1603}," to request status checks — don't poll automatically. Training jobs run asynchronously and can take hours.",{"type":42,"tag":57,"props":1605,"children":1607},{"id":1606},"critical-directives",[1608],{"type":48,"value":1609},"Critical directives",{"type":42,"tag":51,"props":1611,"children":1612},{},[1613],{"type":48,"value":1614},"These rules prevent common failures. Follow them exactly.",{"type":42,"tag":266,"props":1616,"children":1618},{"id":1617},"_1-job-submission-hf_jobs-mcp-tool-vs-python-api",[1619,1621,1626],{"type":48,"value":1620},"1. Job submission: ",{"type":42,"tag":130,"props":1622,"children":1624},{"className":1623},[],[1625],{"type":48,"value":1552},{"type":48,"value":1627}," MCP tool vs Python API",{"type":42,"tag":51,"props":1629,"children":1630},{},[1631,1642,1644,1650],{"type":42,"tag":126,"props":1632,"children":1633},{},[1634,1640],{"type":42,"tag":130,"props":1635,"children":1637},{"className":1636},[],[1638],{"type":48,"value":1639},"hf_jobs()",{"type":48,"value":1641}," is an MCP tool, NOT a Python function.",{"type":48,"value":1643}," Do NOT try to import it from ",{"type":42,"tag":130,"props":1645,"children":1647},{"className":1646},[],[1648],{"type":48,"value":1649},"huggingface_hub",{"type":48,"value":1651},". Call it as a tool:",{"type":42,"tag":179,"props":1653,"children":1656},{"className":1654,"code":1655,"language":48},[1104],"hf_jobs(\"uv\", {\"script\": training_script_content, \"flavor\": \"a10g-large\", \"timeout\": \"4h\", \"secrets\": {\"HF_TOKEN\": \"$HF_TOKEN\"}})\n",[1657],{"type":42,"tag":130,"props":1658,"children":1659},{"__ignoreMap":184},[1660],{"type":48,"value":1655},{"type":42,"tag":51,"props":1662,"children":1663},{},[1664,1676],{"type":42,"tag":126,"props":1665,"children":1666},{},[1667,1669,1674],{"type":48,"value":1668},"If ",{"type":42,"tag":130,"props":1670,"children":1672},{"className":1671},[],[1673],{"type":48,"value":1552},{"type":48,"value":1675}," MCP tool is unavailable",{"type":48,"value":1677},", use the Python API directly:",{"type":42,"tag":179,"props":1679,"children":1681},{"className":826,"code":1680,"language":828,"meta":184,"style":184},"from huggingface_hub import HfApi, get_token\napi = HfApi()\njob_info = api.run_uv_job(\n    script=\"path\u002Fto\u002Ftraining_script.py\",  # file PATH, NOT content\n    script_args=[\"--dataset_name\", \"cppe-5\", ...],\n    flavor=\"a10g-large\",\n    timeout=14400,  # seconds (4 hours)\n    env={\"PYTHONUNBUFFERED\": \"1\"},\n    secrets={\"HF_TOKEN\": get_token()},  # MUST use get_token(), NOT \"$HF_TOKEN\"\n)\nprint(f\"Job ID: {job_info.id}\")\n",[1682],{"type":42,"tag":130,"props":1683,"children":1684},{"__ignoreMap":184},[1685,1693,1700,1708,1716,1724,1732,1740,1748,1756,1763],{"type":42,"tag":190,"props":1686,"children":1687},{"class":192,"line":193},[1688],{"type":42,"tag":190,"props":1689,"children":1690},{},[1691],{"type":48,"value":1692},"from huggingface_hub import HfApi, get_token\n",{"type":42,"tag":190,"props":1694,"children":1695},{"class":192,"line":234},[1696],{"type":42,"tag":190,"props":1697,"children":1698},{},[1699],{"type":48,"value":951},{"type":42,"tag":190,"props":1701,"children":1702},{"class":192,"line":851},[1703],{"type":42,"tag":190,"props":1704,"children":1705},{},[1706],{"type":48,"value":1707},"job_info = api.run_uv_job(\n",{"type":42,"tag":190,"props":1709,"children":1710},{"class":192,"line":860},[1711],{"type":42,"tag":190,"props":1712,"children":1713},{},[1714],{"type":48,"value":1715},"    script=\"path\u002Fto\u002Ftraining_script.py\",  # file PATH, NOT content\n",{"type":42,"tag":190,"props":1717,"children":1718},{"class":192,"line":970},[1719],{"type":42,"tag":190,"props":1720,"children":1721},{},[1722],{"type":48,"value":1723},"    script_args=[\"--dataset_name\", \"cppe-5\", ...],\n",{"type":42,"tag":190,"props":1725,"children":1726},{"class":192,"line":979},[1727],{"type":42,"tag":190,"props":1728,"children":1729},{},[1730],{"type":48,"value":1731},"    flavor=\"a10g-large\",\n",{"type":42,"tag":190,"props":1733,"children":1734},{"class":192,"line":988},[1735],{"type":42,"tag":190,"props":1736,"children":1737},{},[1738],{"type":48,"value":1739},"    timeout=14400,  # seconds (4 hours)\n",{"type":42,"tag":190,"props":1741,"children":1742},{"class":192,"line":997},[1743],{"type":42,"tag":190,"props":1744,"children":1745},{},[1746],{"type":48,"value":1747},"    env={\"PYTHONUNBUFFERED\": \"1\"},\n",{"type":42,"tag":190,"props":1749,"children":1750},{"class":192,"line":1223},[1751],{"type":42,"tag":190,"props":1752,"children":1753},{},[1754],{"type":48,"value":1755},"    secrets={\"HF_TOKEN\": get_token()},  # MUST use get_token(), NOT \"$HF_TOKEN\"\n",{"type":42,"tag":190,"props":1757,"children":1758},{"class":192,"line":1232},[1759],{"type":42,"tag":190,"props":1760,"children":1761},{},[1762],{"type":48,"value":1003},{"type":42,"tag":190,"props":1764,"children":1765},{"class":192,"line":1241},[1766],{"type":42,"tag":190,"props":1767,"children":1768},{},[1769],{"type":48,"value":1770},"print(f\"Job ID: {job_info.id}\")\n",{"type":42,"tag":51,"props":1772,"children":1773},{},[1774],{"type":42,"tag":126,"props":1775,"children":1776},{},[1777],{"type":48,"value":1778},"Critical differences between the two methods:",{"type":42,"tag":1780,"props":1781,"children":1782},"table",{},[1783,1813],{"type":42,"tag":1784,"props":1785,"children":1786},"thead",{},[1787],{"type":42,"tag":1788,"props":1789,"children":1790},"tr",{},[1791,1795,1805],{"type":42,"tag":1792,"props":1793,"children":1794},"th",{},[],{"type":42,"tag":1792,"props":1796,"children":1797},{},[1798,1803],{"type":42,"tag":130,"props":1799,"children":1801},{"className":1800},[],[1802],{"type":48,"value":1552},{"type":48,"value":1804}," MCP tool",{"type":42,"tag":1792,"props":1806,"children":1807},{},[1808],{"type":42,"tag":130,"props":1809,"children":1811},{"className":1810},[],[1812],{"type":48,"value":926},{"type":42,"tag":1814,"props":1815,"children":1816},"tbody",{},[1817,1850,1880],{"type":42,"tag":1788,"props":1818,"children":1819},{},[1820,1832,1837],{"type":42,"tag":1821,"props":1822,"children":1823},"td",{},[1824,1830],{"type":42,"tag":130,"props":1825,"children":1827},{"className":1826},[],[1828],{"type":48,"value":1829},"script",{"type":48,"value":1831}," param",{"type":42,"tag":1821,"props":1833,"children":1834},{},[1835],{"type":48,"value":1836},"Python code string or URL (NOT local paths)",{"type":42,"tag":1821,"props":1838,"children":1839},{},[1840,1842,1848],{"type":48,"value":1841},"File path to ",{"type":42,"tag":130,"props":1843,"children":1845},{"className":1844},[],[1846],{"type":48,"value":1847},".py",{"type":48,"value":1849}," file (NOT content)",{"type":42,"tag":1788,"props":1851,"children":1852},{},[1853,1858,1869],{"type":42,"tag":1821,"props":1854,"children":1855},{},[1856],{"type":48,"value":1857},"Token in secrets",{"type":42,"tag":1821,"props":1859,"children":1860},{},[1861,1867],{"type":42,"tag":130,"props":1862,"children":1864},{"className":1863},[],[1865],{"type":48,"value":1866},"\"$HF_TOKEN\"",{"type":48,"value":1868}," (auto-replaced)",{"type":42,"tag":1821,"props":1870,"children":1871},{},[1872,1878],{"type":42,"tag":130,"props":1873,"children":1875},{"className":1874},[],[1876],{"type":48,"value":1877},"get_token()",{"type":48,"value":1879}," (actual token value)",{"type":42,"tag":1788,"props":1881,"children":1882},{},[1883,1888,1901],{"type":42,"tag":1821,"props":1884,"children":1885},{},[1886],{"type":48,"value":1887},"Timeout format",{"type":42,"tag":1821,"props":1889,"children":1890},{},[1891,1893,1899],{"type":48,"value":1892},"String (",{"type":42,"tag":130,"props":1894,"children":1896},{"className":1895},[],[1897],{"type":48,"value":1898},"\"4h\"",{"type":48,"value":1900},")",{"type":42,"tag":1821,"props":1902,"children":1903},{},[1904,1906,1912],{"type":48,"value":1905},"Seconds (",{"type":42,"tag":130,"props":1907,"children":1909},{"className":1908},[],[1910],{"type":48,"value":1911},"14400",{"type":48,"value":1900},{"type":42,"tag":51,"props":1914,"children":1915},{},[1916],{"type":42,"tag":126,"props":1917,"children":1918},{},[1919],{"type":48,"value":1920},"Rules for both methods:",{"type":42,"tag":69,"props":1922,"children":1923},{},[1924,1929],{"type":42,"tag":73,"props":1925,"children":1926},{},[1927],{"type":48,"value":1928},"The training script MUST include PEP 723 inline metadata with dependencies",{"type":42,"tag":73,"props":1930,"children":1931},{},[1932,1934,1939,1940,1946,1948,1954,1956,1962],{"type":48,"value":1933},"Do NOT use ",{"type":42,"tag":130,"props":1935,"children":1937},{"className":1936},[],[1938],{"type":48,"value":486},{"type":48,"value":412},{"type":42,"tag":130,"props":1941,"children":1943},{"className":1942},[],[1944],{"type":48,"value":1945},"command",{"type":48,"value":1947}," parameters (those belong to ",{"type":42,"tag":130,"props":1949,"children":1951},{"className":1950},[],[1952],{"type":48,"value":1953},"run_job()",{"type":48,"value":1955},", not ",{"type":42,"tag":130,"props":1957,"children":1959},{"className":1958},[],[1960],{"type":48,"value":1961},"run_uv_job()",{"type":48,"value":1900},{"type":42,"tag":266,"props":1964,"children":1966},{"id":1965},"_2-authentication-via-job-secrets-explicit-hub_token-injection",[1967],{"type":48,"value":1968},"2. Authentication via job secrets + explicit hub_token injection",{"type":42,"tag":51,"props":1970,"children":1971},{},[1972,1977],{"type":42,"tag":126,"props":1973,"children":1974},{},[1975],{"type":48,"value":1976},"Job config",{"type":48,"value":1978}," MUST include the token in secrets — syntax depends on submission method (see table above).",{"type":42,"tag":51,"props":1980,"children":1981},{},[1982,1987,1989,1995,1997,2003,2005,2011,2013,2018,2020,2026,2028,2034,2036,2041,2043,2048],{"type":42,"tag":126,"props":1983,"children":1984},{},[1985],{"type":48,"value":1986},"Training script requirement:",{"type":48,"value":1988}," The Transformers ",{"type":42,"tag":130,"props":1990,"children":1992},{"className":1991},[],[1993],{"type":48,"value":1994},"Trainer",{"type":48,"value":1996}," calls ",{"type":42,"tag":130,"props":1998,"children":2000},{"className":1999},[],[2001],{"type":48,"value":2002},"create_repo(token=self.args.hub_token)",{"type":48,"value":2004}," during ",{"type":42,"tag":130,"props":2006,"children":2008},{"className":2007},[],[2009],{"type":48,"value":2010},"__init__()",{"type":48,"value":2012}," when ",{"type":42,"tag":130,"props":2014,"children":2016},{"className":2015},[],[2017],{"type":48,"value":755},{"type":48,"value":2019},". The training script MUST inject ",{"type":42,"tag":130,"props":2021,"children":2023},{"className":2022},[],[2024],{"type":48,"value":2025},"HF_TOKEN",{"type":48,"value":2027}," into ",{"type":42,"tag":130,"props":2029,"children":2031},{"className":2030},[],[2032],{"type":48,"value":2033},"training_args.hub_token",{"type":48,"value":2035}," AFTER parsing args but BEFORE creating the ",{"type":42,"tag":130,"props":2037,"children":2039},{"className":2038},[],[2040],{"type":48,"value":1994},{"type":48,"value":2042},". The template ",{"type":42,"tag":130,"props":2044,"children":2046},{"className":2045},[],[2047],{"type":48,"value":1057},{"type":48,"value":2049}," already includes this:",{"type":42,"tag":179,"props":2051,"children":2053},{"className":826,"code":2052,"language":828,"meta":184,"style":184},"hf_token = os.environ.get(\"HF_TOKEN\")\nif training_args.push_to_hub and not training_args.hub_token:\n    if hf_token:\n        training_args.hub_token = hf_token\n",[2054],{"type":42,"tag":130,"props":2055,"children":2056},{"__ignoreMap":184},[2057,2065,2073,2081],{"type":42,"tag":190,"props":2058,"children":2059},{"class":192,"line":193},[2060],{"type":42,"tag":190,"props":2061,"children":2062},{},[2063],{"type":48,"value":2064},"hf_token = os.environ.get(\"HF_TOKEN\")\n",{"type":42,"tag":190,"props":2066,"children":2067},{"class":192,"line":234},[2068],{"type":42,"tag":190,"props":2069,"children":2070},{},[2071],{"type":48,"value":2072},"if training_args.push_to_hub and not training_args.hub_token:\n",{"type":42,"tag":190,"props":2074,"children":2075},{"class":192,"line":851},[2076],{"type":42,"tag":190,"props":2077,"children":2078},{},[2079],{"type":48,"value":2080},"    if hf_token:\n",{"type":42,"tag":190,"props":2082,"children":2083},{"class":192,"line":860},[2084],{"type":42,"tag":190,"props":2085,"children":2086},{},[2087],{"type":48,"value":2088},"        training_args.hub_token = hf_token\n",{"type":42,"tag":51,"props":2090,"children":2091},{},[2092,2094,2100],{"type":48,"value":2093},"If you write a custom script, you MUST include this token injection before the ",{"type":42,"tag":130,"props":2095,"children":2097},{"className":2096},[],[2098],{"type":48,"value":2099},"Trainer(...)",{"type":48,"value":2101}," call.",{"type":42,"tag":69,"props":2103,"children":2104},{},[2105,2123,2136],{"type":42,"tag":73,"props":2106,"children":2107},{},[2108,2110,2116,2118],{"type":48,"value":2109},"Do NOT call ",{"type":42,"tag":130,"props":2111,"children":2113},{"className":2112},[],[2114],{"type":48,"value":2115},"login()",{"type":48,"value":2117}," in custom scripts unless replicating the full pattern from ",{"type":42,"tag":130,"props":2119,"children":2121},{"className":2120},[],[2122],{"type":48,"value":1057},{"type":42,"tag":73,"props":2124,"children":2125},{},[2126,2128,2134],{"type":48,"value":2127},"Do NOT rely on implicit token resolution (",{"type":42,"tag":130,"props":2129,"children":2131},{"className":2130},[],[2132],{"type":48,"value":2133},"hub_token=None",{"type":48,"value":2135},") — unreliable in Jobs",{"type":42,"tag":73,"props":2137,"children":2138},{},[2139,2141,2146,2148,2154],{"type":48,"value":2140},"See the ",{"type":42,"tag":130,"props":2142,"children":2144},{"className":2143},[],[2145],{"type":48,"value":135},{"type":48,"value":2147}," skill → ",{"type":42,"tag":2149,"props":2150,"children":2151},"em",{},[2152],{"type":48,"value":2153},"Token Usage Guide",{"type":48,"value":2155}," for full details",{"type":42,"tag":266,"props":2157,"children":2159},{"id":2158},"_3-jobinfo-attribute",[2160],{"type":48,"value":2161},"3. JobInfo attribute",{"type":42,"tag":51,"props":2163,"children":2164},{},[2165,2167,2172,2174,2180,2181,2187],{"type":48,"value":2166},"Access the job identifier using ",{"type":42,"tag":130,"props":2168,"children":2170},{"className":2169},[],[2171],{"type":48,"value":1583},{"type":48,"value":2173}," (NOT ",{"type":42,"tag":130,"props":2175,"children":2177},{"className":2176},[],[2178],{"type":48,"value":2179},".job_id",{"type":48,"value":412},{"type":42,"tag":130,"props":2182,"children":2184},{"className":2183},[],[2185],{"type":48,"value":2186},".name",{"type":48,"value":2188}," — these don't exist):",{"type":42,"tag":179,"props":2190,"children":2192},{"className":826,"code":2191,"language":828,"meta":184,"style":184},"job_info = api.run_uv_job(...)  # or hf_jobs(\"uv\", {...})\njob_id = job_info.id  # Correct -- returns string like \"687fb701029421ae5549d998\"\n",[2193],{"type":42,"tag":130,"props":2194,"children":2195},{"__ignoreMap":184},[2196,2204],{"type":42,"tag":190,"props":2197,"children":2198},{"class":192,"line":193},[2199],{"type":42,"tag":190,"props":2200,"children":2201},{},[2202],{"type":48,"value":2203},"job_info = api.run_uv_job(...)  # or hf_jobs(\"uv\", {...})\n",{"type":42,"tag":190,"props":2205,"children":2206},{"class":192,"line":234},[2207],{"type":42,"tag":190,"props":2208,"children":2209},{},[2210],{"type":48,"value":2211},"job_id = job_info.id  # Correct -- returns string like \"687fb701029421ae5549d998\"\n",{"type":42,"tag":266,"props":2213,"children":2215},{"id":2214},"_4-required-training-flags-and-hfargumentparser-boolean-syntax",[2216],{"type":48,"value":2217},"4. Required training flags and HfArgumentParser boolean syntax",{"type":42,"tag":51,"props":2219,"children":2220},{},[2221,2226,2228,2233,2235,2240],{"type":42,"tag":130,"props":2222,"children":2224},{"className":2223},[],[2225],{"type":48,"value":1057},{"type":48,"value":2227}," uses ",{"type":42,"tag":130,"props":2229,"children":2231},{"className":2230},[],[2232],{"type":48,"value":1474},{"type":48,"value":2234}," — all config is passed via ",{"type":42,"tag":130,"props":2236,"children":2238},{"className":2237},[],[2239],{"type":48,"value":1482},{"type":48,"value":2241},". Boolean arguments have two syntaxes:",{"type":42,"tag":69,"props":2243,"children":2244},{},[2245,2299],{"type":42,"tag":73,"props":2246,"children":2247},{},[2248,2259,2261,2267,2268,2274,2276,2282,2284,2290,2292,2298],{"type":42,"tag":126,"props":2249,"children":2250},{},[2251,2257],{"type":42,"tag":130,"props":2252,"children":2254},{"className":2253},[],[2255],{"type":48,"value":2256},"bool",{"type":48,"value":2258}," fields",{"type":48,"value":2260}," (e.g., ",{"type":42,"tag":130,"props":2262,"children":2264},{"className":2263},[],[2265],{"type":48,"value":2266},"push_to_hub",{"type":48,"value":290},{"type":42,"tag":130,"props":2269,"children":2271},{"className":2270},[],[2272],{"type":48,"value":2273},"do_train",{"type":48,"value":2275},"): Use as bare flags (",{"type":42,"tag":130,"props":2277,"children":2279},{"className":2278},[],[2280],{"type":48,"value":2281},"--push_to_hub",{"type":48,"value":2283},") or negate with ",{"type":42,"tag":130,"props":2285,"children":2287},{"className":2286},[],[2288],{"type":48,"value":2289},"--no_",{"type":48,"value":2291}," prefix (",{"type":42,"tag":130,"props":2293,"children":2295},{"className":2294},[],[2296],{"type":48,"value":2297},"--no_remove_unused_columns",{"type":48,"value":1900},{"type":42,"tag":73,"props":2300,"children":2301},{},[2302,2312,2313,2319,2321,2327,2329,2335,2337],{"type":42,"tag":126,"props":2303,"children":2304},{},[2305,2311],{"type":42,"tag":130,"props":2306,"children":2308},{"className":2307},[],[2309],{"type":48,"value":2310},"Optional[bool]",{"type":48,"value":2258},{"type":48,"value":2260},{"type":42,"tag":130,"props":2314,"children":2316},{"className":2315},[],[2317],{"type":48,"value":2318},"greater_is_better",{"type":48,"value":2320},"): MUST pass explicit value (",{"type":42,"tag":130,"props":2322,"children":2324},{"className":2323},[],[2325],{"type":48,"value":2326},"--greater_is_better True",{"type":48,"value":2328},"). Bare ",{"type":42,"tag":130,"props":2330,"children":2332},{"className":2331},[],[2333],{"type":48,"value":2334},"--greater_is_better",{"type":48,"value":2336}," causes ",{"type":42,"tag":130,"props":2338,"children":2340},{"className":2339},[],[2341],{"type":48,"value":2342},"error: expected one argument",{"type":42,"tag":51,"props":2344,"children":2345},{},[2346],{"type":48,"value":2347},"Required flags for object detection:",{"type":42,"tag":179,"props":2349,"children":2352},{"className":2350,"code":2351,"language":48},[1104],"--no_remove_unused_columns          # MUST: preserves image column for pixel_values\n--no_eval_do_concat_batches         # MUST: images have different numbers of target boxes\n--push_to_hub                       # MUST: environment is ephemeral\n--hub_model_id username\u002Fmodel-name\n--metric_for_best_model eval_map\n--greater_is_better True            # MUST pass \"True\" explicitly (Optional[bool])\n--do_train\n--do_eval\n",[2353],{"type":42,"tag":130,"props":2354,"children":2355},{"__ignoreMap":184},[2356],{"type":48,"value":2351},{"type":42,"tag":51,"props":2358,"children":2359},{},[2360],{"type":48,"value":2361},"Required flags for image classification:",{"type":42,"tag":179,"props":2363,"children":2366},{"className":2364,"code":2365,"language":48},[1104],"--no_remove_unused_columns          # MUST: preserves image column for pixel_values\n--push_to_hub                       # MUST: environment is ephemeral\n--hub_model_id username\u002Fmodel-name\n--metric_for_best_model eval_accuracy\n--greater_is_better True            # MUST pass \"True\" explicitly (Optional[bool])\n--do_train\n--do_eval\n",[2367],{"type":42,"tag":130,"props":2368,"children":2369},{"__ignoreMap":184},[2370],{"type":48,"value":2365},{"type":42,"tag":51,"props":2372,"children":2373},{},[2374],{"type":48,"value":2375},"Required flags for SAM\u002FSAM2 segmentation:",{"type":42,"tag":179,"props":2377,"children":2380},{"className":2378,"code":2379,"language":48},[1104],"--remove_unused_columns False       # MUST: preserves input_boxes\u002Finput_points\n--push_to_hub                       # MUST: environment is ephemeral\n--hub_model_id username\u002Fmodel-name\n--do_train\n--prompt_type bbox                  # or \"point\"\n--dataloader_pin_memory False       # MUST: avoids pin_memory issues with custom collator\n",[2381],{"type":42,"tag":130,"props":2382,"children":2383},{"__ignoreMap":184},[2384],{"type":48,"value":2379},{"type":42,"tag":266,"props":2386,"children":2388},{"id":2387},"_5-timeout-management",[2389],{"type":48,"value":2390},"5. Timeout management",{"type":42,"tag":51,"props":2392,"children":2393},{},[2394],{"type":48,"value":2395},"Default 30 min is TOO SHORT for object detection. Set minimum 2-4 hours. Add 30% buffer for model loading, preprocessing, and Hub push.",{"type":42,"tag":1780,"props":2397,"children":2398},{},[2399,2415],{"type":42,"tag":1784,"props":2400,"children":2401},{},[2402],{"type":42,"tag":1788,"props":2403,"children":2404},{},[2405,2410],{"type":42,"tag":1792,"props":2406,"children":2407},{},[2408],{"type":48,"value":2409},"Scenario",{"type":42,"tag":1792,"props":2411,"children":2412},{},[2413],{"type":48,"value":2414},"Timeout",{"type":42,"tag":1814,"props":2416,"children":2417},{},[2418,2431,2444,2457],{"type":42,"tag":1788,"props":2419,"children":2420},{},[2421,2426],{"type":42,"tag":1821,"props":2422,"children":2423},{},[2424],{"type":48,"value":2425},"Quick test (100-200 images, 5-10 epochs)",{"type":42,"tag":1821,"props":2427,"children":2428},{},[2429],{"type":48,"value":2430},"1h",{"type":42,"tag":1788,"props":2432,"children":2433},{},[2434,2439],{"type":42,"tag":1821,"props":2435,"children":2436},{},[2437],{"type":48,"value":2438},"Development (500-1K images, 15-20 epochs)",{"type":42,"tag":1821,"props":2440,"children":2441},{},[2442],{"type":48,"value":2443},"2-3h",{"type":42,"tag":1788,"props":2445,"children":2446},{},[2447,2452],{"type":42,"tag":1821,"props":2448,"children":2449},{},[2450],{"type":48,"value":2451},"Production (1K-5K images, 30 epochs)",{"type":42,"tag":1821,"props":2453,"children":2454},{},[2455],{"type":48,"value":2456},"4-6h",{"type":42,"tag":1788,"props":2458,"children":2459},{},[2460,2465],{"type":42,"tag":1821,"props":2461,"children":2462},{},[2463],{"type":48,"value":2464},"Large dataset (5K+ images)",{"type":42,"tag":1821,"props":2466,"children":2467},{},[2468],{"type":48,"value":2469},"6-12h",{"type":42,"tag":266,"props":2471,"children":2473},{"id":2472},"_6-trackio-monitoring",[2474],{"type":48,"value":2475},"6. Trackio monitoring",{"type":42,"tag":51,"props":2477,"children":2478},{},[2479,2481,2486,2488,2494,2495,2501,2503,2509,2511,2517,2519,2525,2527,2532,2534,2540],{"type":48,"value":2480},"Trackio is ",{"type":42,"tag":126,"props":2482,"children":2483},{},[2484],{"type":48,"value":2485},"always enabled",{"type":48,"value":2487}," in the object detection training script — it calls ",{"type":42,"tag":130,"props":2489,"children":2491},{"className":2490},[],[2492],{"type":48,"value":2493},"trackio.init()",{"type":48,"value":1081},{"type":42,"tag":130,"props":2496,"children":2498},{"className":2497},[],[2499],{"type":48,"value":2500},"trackio.finish()",{"type":48,"value":2502}," automatically. No need to pass ",{"type":42,"tag":130,"props":2504,"children":2506},{"className":2505},[],[2507],{"type":48,"value":2508},"--report_to trackio",{"type":48,"value":2510},". The project name is taken from ",{"type":42,"tag":130,"props":2512,"children":2514},{"className":2513},[],[2515],{"type":48,"value":2516},"--output_dir",{"type":48,"value":2518}," and the run name from ",{"type":42,"tag":130,"props":2520,"children":2522},{"className":2521},[],[2523],{"type":48,"value":2524},"--run_name",{"type":48,"value":2526},". For image classification, pass ",{"type":42,"tag":130,"props":2528,"children":2530},{"className":2529},[],[2531],{"type":48,"value":2508},{"type":48,"value":2533}," in ",{"type":42,"tag":130,"props":2535,"children":2537},{"className":2536},[],[2538],{"type":48,"value":2539},"TrainingArguments",{"type":48,"value":1498},{"type":42,"tag":51,"props":2542,"children":2543},{},[2544,2546],{"type":48,"value":2545},"Dashboard at: ",{"type":42,"tag":130,"props":2547,"children":2549},{"className":2548},[],[2550],{"type":48,"value":1591},{"type":42,"tag":57,"props":2552,"children":2554},{"id":2553},"model-hardware-selection",[2555],{"type":48,"value":2556},"Model & hardware selection",{"type":42,"tag":266,"props":2558,"children":2560},{"id":2559},"recommended-object-detection-models",[2561],{"type":48,"value":2562},"Recommended object detection models",{"type":42,"tag":1780,"props":2564,"children":2565},{},[2566,2587],{"type":42,"tag":1784,"props":2567,"children":2568},{},[2569],{"type":42,"tag":1788,"props":2570,"children":2571},{},[2572,2577,2582],{"type":42,"tag":1792,"props":2573,"children":2574},{},[2575],{"type":48,"value":2576},"Model",{"type":42,"tag":1792,"props":2578,"children":2579},{},[2580],{"type":48,"value":2581},"Params",{"type":42,"tag":1792,"props":2583,"children":2584},{},[2585],{"type":48,"value":2586},"Use case",{"type":42,"tag":1814,"props":2588,"children":2589},{},[2590,2612,2634,2656,2678,2700],{"type":42,"tag":1788,"props":2591,"children":2592},{},[2593,2602,2607],{"type":42,"tag":1821,"props":2594,"children":2595},{},[2596],{"type":42,"tag":130,"props":2597,"children":2599},{"className":2598},[],[2600],{"type":48,"value":2601},"ustc-community\u002Fdfine-small-coco",{"type":42,"tag":1821,"props":2603,"children":2604},{},[2605],{"type":48,"value":2606},"10.4M",{"type":42,"tag":1821,"props":2608,"children":2609},{},[2610],{"type":48,"value":2611},"Best starting point — fast, cheap, SOTA quality",{"type":42,"tag":1788,"props":2613,"children":2614},{},[2615,2624,2629],{"type":42,"tag":1821,"props":2616,"children":2617},{},[2618],{"type":42,"tag":130,"props":2619,"children":2621},{"className":2620},[],[2622],{"type":48,"value":2623},"PekingU\u002Frtdetr_v2_r18vd",{"type":42,"tag":1821,"props":2625,"children":2626},{},[2627],{"type":48,"value":2628},"20.2M",{"type":42,"tag":1821,"props":2630,"children":2631},{},[2632],{"type":48,"value":2633},"Lightweight real-time detector",{"type":42,"tag":1788,"props":2635,"children":2636},{},[2637,2646,2651],{"type":42,"tag":1821,"props":2638,"children":2639},{},[2640],{"type":42,"tag":130,"props":2641,"children":2643},{"className":2642},[],[2644],{"type":48,"value":2645},"ustc-community\u002Fdfine-large-coco",{"type":42,"tag":1821,"props":2647,"children":2648},{},[2649],{"type":48,"value":2650},"31.4M",{"type":42,"tag":1821,"props":2652,"children":2653},{},[2654],{"type":48,"value":2655},"Higher accuracy, still efficient",{"type":42,"tag":1788,"props":2657,"children":2658},{},[2659,2668,2673],{"type":42,"tag":1821,"props":2660,"children":2661},{},[2662],{"type":42,"tag":130,"props":2663,"children":2665},{"className":2664},[],[2666],{"type":48,"value":2667},"PekingU\u002Frtdetr_v2_r50vd",{"type":42,"tag":1821,"props":2669,"children":2670},{},[2671],{"type":48,"value":2672},"43M",{"type":42,"tag":1821,"props":2674,"children":2675},{},[2676],{"type":48,"value":2677},"Strong real-time baseline",{"type":42,"tag":1788,"props":2679,"children":2680},{},[2681,2690,2695],{"type":42,"tag":1821,"props":2682,"children":2683},{},[2684],{"type":42,"tag":130,"props":2685,"children":2687},{"className":2686},[],[2688],{"type":48,"value":2689},"ustc-community\u002Fdfine-xlarge-obj365",{"type":42,"tag":1821,"props":2691,"children":2692},{},[2693],{"type":48,"value":2694},"63.5M",{"type":42,"tag":1821,"props":2696,"children":2697},{},[2698],{"type":48,"value":2699},"Best accuracy (pretrained on Objects365)",{"type":42,"tag":1788,"props":2701,"children":2702},{},[2703,2712,2717],{"type":42,"tag":1821,"props":2704,"children":2705},{},[2706],{"type":42,"tag":130,"props":2707,"children":2709},{"className":2708},[],[2710],{"type":48,"value":2711},"PekingU\u002Frtdetr_v2_r101vd",{"type":42,"tag":1821,"props":2713,"children":2714},{},[2715],{"type":48,"value":2716},"76M",{"type":42,"tag":1821,"props":2718,"children":2719},{},[2720],{"type":48,"value":2721},"Largest RT-DETR v2 variant",{"type":42,"tag":51,"props":2723,"children":2724},{},[2725,2727,2732],{"type":48,"value":2726},"Start with ",{"type":42,"tag":130,"props":2728,"children":2730},{"className":2729},[],[2731],{"type":48,"value":2601},{"type":48,"value":2733}," for fast iteration. Move to D-FINE Large or RT-DETR v2 R50 for better accuracy.",{"type":42,"tag":266,"props":2735,"children":2737},{"id":2736},"recommended-image-classification-models",[2738],{"type":48,"value":2739},"Recommended image classification models",{"type":42,"tag":51,"props":2741,"children":2742},{},[2743,2745,2751,2753,2759,2761,2767,2769,2773],{"type":48,"value":2744},"All ",{"type":42,"tag":130,"props":2746,"children":2748},{"className":2747},[],[2749],{"type":48,"value":2750},"timm\u002F",{"type":48,"value":2752}," models work out of the box via ",{"type":42,"tag":130,"props":2754,"children":2756},{"className":2755},[],[2757],{"type":48,"value":2758},"AutoModelForImageClassification",{"type":48,"value":2760}," (loaded as ",{"type":42,"tag":130,"props":2762,"children":2764},{"className":2763},[],[2765],{"type":48,"value":2766},"TimmWrapperForImageClassification",{"type":48,"value":2768},"). See ",{"type":42,"tag":281,"props":2770,"children":2771},{"href":1487},[2772],{"type":48,"value":1487},{"type":48,"value":2774}," for details.",{"type":42,"tag":1780,"props":2776,"children":2777},{},[2778,2796],{"type":42,"tag":1784,"props":2779,"children":2780},{},[2781],{"type":42,"tag":1788,"props":2782,"children":2783},{},[2784,2788,2792],{"type":42,"tag":1792,"props":2785,"children":2786},{},[2787],{"type":48,"value":2576},{"type":42,"tag":1792,"props":2789,"children":2790},{},[2791],{"type":48,"value":2581},{"type":42,"tag":1792,"props":2793,"children":2794},{},[2795],{"type":48,"value":2586},{"type":42,"tag":1814,"props":2797,"children":2798},{},[2799,2821,2843,2865],{"type":42,"tag":1788,"props":2800,"children":2801},{},[2802,2811,2816],{"type":42,"tag":1821,"props":2803,"children":2804},{},[2805],{"type":42,"tag":130,"props":2806,"children":2808},{"className":2807},[],[2809],{"type":48,"value":2810},"timm\u002Fmobilenetv3_small_100.lamb_in1k",{"type":42,"tag":1821,"props":2812,"children":2813},{},[2814],{"type":48,"value":2815},"2.5M",{"type":42,"tag":1821,"props":2817,"children":2818},{},[2819],{"type":48,"value":2820},"Ultra-lightweight — mobile\u002Fedge, fastest training",{"type":42,"tag":1788,"props":2822,"children":2823},{},[2824,2833,2838],{"type":42,"tag":1821,"props":2825,"children":2826},{},[2827],{"type":42,"tag":130,"props":2828,"children":2830},{"className":2829},[],[2831],{"type":48,"value":2832},"timm\u002Fmobilevit_s.cvnets_in1k",{"type":42,"tag":1821,"props":2834,"children":2835},{},[2836],{"type":48,"value":2837},"5.6M",{"type":42,"tag":1821,"props":2839,"children":2840},{},[2841],{"type":48,"value":2842},"Mobile transformer — good accuracy\u002Fspeed trade-off",{"type":42,"tag":1788,"props":2844,"children":2845},{},[2846,2855,2860],{"type":42,"tag":1821,"props":2847,"children":2848},{},[2849],{"type":42,"tag":130,"props":2850,"children":2852},{"className":2851},[],[2853],{"type":48,"value":2854},"timm\u002Fresnet50.a1_in1k",{"type":42,"tag":1821,"props":2856,"children":2857},{},[2858],{"type":48,"value":2859},"25.6M",{"type":42,"tag":1821,"props":2861,"children":2862},{},[2863],{"type":48,"value":2864},"Strong CNN baseline — reliable, well-studied",{"type":42,"tag":1788,"props":2866,"children":2867},{},[2868,2877,2882],{"type":42,"tag":1821,"props":2869,"children":2870},{},[2871],{"type":42,"tag":130,"props":2872,"children":2874},{"className":2873},[],[2875],{"type":48,"value":2876},"timm\u002Fvit_base_patch16_dinov3.lvd1689m",{"type":42,"tag":1821,"props":2878,"children":2879},{},[2880],{"type":48,"value":2881},"86.6M",{"type":42,"tag":1821,"props":2883,"children":2884},{},[2885],{"type":48,"value":2886},"Best accuracy — DINOv3 self-supervised ViT",{"type":42,"tag":51,"props":2888,"children":2889},{},[2890,2891,2896,2898,2903,2904,2909],{"type":48,"value":2726},{"type":42,"tag":130,"props":2892,"children":2894},{"className":2893},[],[2895],{"type":48,"value":2810},{"type":48,"value":2897}," for fast iteration. Move to ",{"type":42,"tag":130,"props":2899,"children":2901},{"className":2900},[],[2902],{"type":48,"value":2854},{"type":48,"value":412},{"type":42,"tag":130,"props":2905,"children":2907},{"className":2906},[],[2908],{"type":48,"value":2876},{"type":48,"value":2910}," for better accuracy.",{"type":42,"tag":266,"props":2912,"children":2914},{"id":2913},"recommended-samsam2-segmentation-models",[2915],{"type":48,"value":2916},"Recommended SAM\u002FSAM2 segmentation models",{"type":42,"tag":1780,"props":2918,"children":2919},{},[2920,2938],{"type":42,"tag":1784,"props":2921,"children":2922},{},[2923],{"type":42,"tag":1788,"props":2924,"children":2925},{},[2926,2930,2934],{"type":42,"tag":1792,"props":2927,"children":2928},{},[2929],{"type":48,"value":2576},{"type":42,"tag":1792,"props":2931,"children":2932},{},[2933],{"type":48,"value":2581},{"type":42,"tag":1792,"props":2935,"children":2936},{},[2937],{"type":48,"value":2586},{"type":42,"tag":1814,"props":2939,"children":2940},{},[2941,2963,2985,3007,3029,3051,3073],{"type":42,"tag":1788,"props":2942,"children":2943},{},[2944,2953,2958],{"type":42,"tag":1821,"props":2945,"children":2946},{},[2947],{"type":42,"tag":130,"props":2948,"children":2950},{"className":2949},[],[2951],{"type":48,"value":2952},"facebook\u002Fsam2.1-hiera-tiny",{"type":42,"tag":1821,"props":2954,"children":2955},{},[2956],{"type":48,"value":2957},"38.9M",{"type":42,"tag":1821,"props":2959,"children":2960},{},[2961],{"type":48,"value":2962},"Fastest SAM2 — good for quick experiments",{"type":42,"tag":1788,"props":2964,"children":2965},{},[2966,2975,2980],{"type":42,"tag":1821,"props":2967,"children":2968},{},[2969],{"type":42,"tag":130,"props":2970,"children":2972},{"className":2971},[],[2973],{"type":48,"value":2974},"facebook\u002Fsam2.1-hiera-small",{"type":42,"tag":1821,"props":2976,"children":2977},{},[2978],{"type":48,"value":2979},"46.0M",{"type":42,"tag":1821,"props":2981,"children":2982},{},[2983],{"type":48,"value":2984},"Best starting point — good quality\u002Fspeed balance",{"type":42,"tag":1788,"props":2986,"children":2987},{},[2988,2997,3002],{"type":42,"tag":1821,"props":2989,"children":2990},{},[2991],{"type":42,"tag":130,"props":2992,"children":2994},{"className":2993},[],[2995],{"type":48,"value":2996},"facebook\u002Fsam2.1-hiera-base-plus",{"type":42,"tag":1821,"props":2998,"children":2999},{},[3000],{"type":48,"value":3001},"80.8M",{"type":42,"tag":1821,"props":3003,"children":3004},{},[3005],{"type":48,"value":3006},"Higher capacity for complex segmentation",{"type":42,"tag":1788,"props":3008,"children":3009},{},[3010,3019,3024],{"type":42,"tag":1821,"props":3011,"children":3012},{},[3013],{"type":42,"tag":130,"props":3014,"children":3016},{"className":3015},[],[3017],{"type":48,"value":3018},"facebook\u002Fsam2.1-hiera-large",{"type":42,"tag":1821,"props":3020,"children":3021},{},[3022],{"type":48,"value":3023},"224.4M",{"type":42,"tag":1821,"props":3025,"children":3026},{},[3027],{"type":48,"value":3028},"Best SAM2 accuracy — requires more VRAM",{"type":42,"tag":1788,"props":3030,"children":3031},{},[3032,3041,3046],{"type":42,"tag":1821,"props":3033,"children":3034},{},[3035],{"type":42,"tag":130,"props":3036,"children":3038},{"className":3037},[],[3039],{"type":48,"value":3040},"facebook\u002Fsam-vit-base",{"type":42,"tag":1821,"props":3042,"children":3043},{},[3044],{"type":48,"value":3045},"93.7M",{"type":42,"tag":1821,"props":3047,"children":3048},{},[3049],{"type":48,"value":3050},"Original SAM — ViT-B backbone",{"type":42,"tag":1788,"props":3052,"children":3053},{},[3054,3063,3068],{"type":42,"tag":1821,"props":3055,"children":3056},{},[3057],{"type":42,"tag":130,"props":3058,"children":3060},{"className":3059},[],[3061],{"type":48,"value":3062},"facebook\u002Fsam-vit-large",{"type":42,"tag":1821,"props":3064,"children":3065},{},[3066],{"type":48,"value":3067},"312.3M",{"type":42,"tag":1821,"props":3069,"children":3070},{},[3071],{"type":48,"value":3072},"Original SAM — ViT-L backbone",{"type":42,"tag":1788,"props":3074,"children":3075},{},[3076,3085,3090],{"type":42,"tag":1821,"props":3077,"children":3078},{},[3079],{"type":42,"tag":130,"props":3080,"children":3082},{"className":3081},[],[3083],{"type":48,"value":3084},"facebook\u002Fsam-vit-huge",{"type":42,"tag":1821,"props":3086,"children":3087},{},[3088],{"type":48,"value":3089},"641.1M",{"type":42,"tag":1821,"props":3091,"children":3092},{},[3093],{"type":48,"value":3094},"Original SAM — ViT-H, best SAM v1 accuracy",{"type":42,"tag":51,"props":3096,"children":3097},{},[3098,3099,3104],{"type":48,"value":2726},{"type":42,"tag":130,"props":3100,"children":3102},{"className":3101},[],[3103],{"type":48,"value":2974},{"type":48,"value":3105}," for fast iteration. SAM2 models are generally more efficient than SAM v1 at similar quality. Only the mask decoder is trained by default (vision and prompt encoders are frozen).",{"type":42,"tag":266,"props":3107,"children":3109},{"id":3108},"hardware-recommendation",[3110],{"type":48,"value":3111},"Hardware recommendation",{"type":42,"tag":51,"props":3113,"children":3114},{},[3115,3117,3128,3130,3135,3137,3143,3144,3149,3151,3157,3159,3165,3166,3172,3174,3179,3181,3186,3188,3193],{"type":48,"value":3116},"All recommended OD and IC models are under 100M params — ",{"type":42,"tag":126,"props":3118,"children":3119},{},[3120,3126],{"type":42,"tag":130,"props":3121,"children":3123},{"className":3122},[],[3124],{"type":48,"value":3125},"t4-small",{"type":48,"value":3127}," (16 GB VRAM, $0.40\u002Fhr) is sufficient for all of them.",{"type":48,"value":3129}," Image classification models are generally smaller and faster than object detection models — ",{"type":42,"tag":130,"props":3131,"children":3133},{"className":3132},[],[3134],{"type":48,"value":3125},{"type":48,"value":3136}," handles even ViT-Base comfortably. For SAM2 models up to ",{"type":42,"tag":130,"props":3138,"children":3140},{"className":3139},[],[3141],{"type":48,"value":3142},"hiera-base-plus",{"type":48,"value":290},{"type":42,"tag":130,"props":3145,"children":3147},{"className":3146},[],[3148],{"type":48,"value":3125},{"type":48,"value":3150}," is sufficient since only the mask decoder is trained. For ",{"type":42,"tag":130,"props":3152,"children":3154},{"className":3153},[],[3155],{"type":48,"value":3156},"sam2.1-hiera-large",{"type":48,"value":3158}," or SAM v1 models, use ",{"type":42,"tag":130,"props":3160,"children":3162},{"className":3161},[],[3163],{"type":48,"value":3164},"l4x1",{"type":48,"value":412},{"type":42,"tag":130,"props":3167,"children":3169},{"className":3168},[],[3170],{"type":48,"value":3171},"a10g-large",{"type":48,"value":3173},". Only upgrade if you hit OOM from large batch sizes — reduce batch size first before switching hardware. Common upgrade path: ",{"type":42,"tag":130,"props":3175,"children":3177},{"className":3176},[],[3178],{"type":48,"value":3125},{"type":48,"value":3180}," → ",{"type":42,"tag":130,"props":3182,"children":3184},{"className":3183},[],[3185],{"type":48,"value":3164},{"type":48,"value":3187}," ($0.80\u002Fhr, 24 GB) → ",{"type":42,"tag":130,"props":3189,"children":3191},{"className":3190},[],[3192],{"type":48,"value":3171},{"type":48,"value":3194}," ($1.50\u002Fhr, 24 GB).",{"type":42,"tag":51,"props":3196,"children":3197},{},[3198,3200,3205,3207,3213],{"type":48,"value":3199},"For full hardware flavor list: refer to the ",{"type":42,"tag":130,"props":3201,"children":3203},{"className":3202},[],[3204],{"type":48,"value":135},{"type":48,"value":3206}," skill. For cost estimation: run ",{"type":42,"tag":130,"props":3208,"children":3210},{"className":3209},[],[3211],{"type":48,"value":3212},"scripts\u002Festimate_cost.py",{"type":48,"value":1498},{"type":42,"tag":57,"props":3215,"children":3217},{"id":3216},"quick-start-object-detection",[3218],{"type":48,"value":3219},"Quick start — Object Detection",{"type":42,"tag":51,"props":3221,"children":3222},{},[3223,3225,3230],{"type":48,"value":3224},"The ",{"type":42,"tag":130,"props":3226,"children":3228},{"className":3227},[],[3229],{"type":48,"value":1482},{"type":48,"value":3231}," below are the same for both submission methods. See directive #1 for the critical differences between them.",{"type":42,"tag":179,"props":3233,"children":3235},{"className":826,"code":3234,"language":828,"meta":184,"style":184},"OD_SCRIPT_ARGS = [\n    \"--model_name_or_path\", \"ustc-community\u002Fdfine-small-coco\",\n    \"--dataset_name\", \"cppe-5\",\n    \"--image_square_size\", \"640\",\n    \"--output_dir\", \"dfine_finetuned\",\n    \"--num_train_epochs\", \"30\",\n    \"--per_device_train_batch_size\", \"8\",\n    \"--learning_rate\", \"5e-5\",\n    \"--eval_strategy\", \"epoch\",\n    \"--save_strategy\", \"epoch\",\n    \"--save_total_limit\", \"2\",\n    \"--load_best_model_at_end\",\n    \"--metric_for_best_model\", \"eval_map\",\n    \"--greater_is_better\", \"True\",\n    \"--no_remove_unused_columns\",\n    \"--no_eval_do_concat_batches\",\n    \"--push_to_hub\",\n    \"--hub_model_id\", \"username\u002Fmodel-name\",\n    \"--do_train\",\n    \"--do_eval\",\n]\n",[3236],{"type":42,"tag":130,"props":3237,"children":3238},{"__ignoreMap":184},[3239,3247,3255,3263,3271,3279,3287,3295,3303,3311,3319,3327,3335,3343,3351,3359,3367,3375,3383,3391,3399],{"type":42,"tag":190,"props":3240,"children":3241},{"class":192,"line":193},[3242],{"type":42,"tag":190,"props":3243,"children":3244},{},[3245],{"type":48,"value":3246},"OD_SCRIPT_ARGS = [\n",{"type":42,"tag":190,"props":3248,"children":3249},{"class":192,"line":234},[3250],{"type":42,"tag":190,"props":3251,"children":3252},{},[3253],{"type":48,"value":3254},"    \"--model_name_or_path\", \"ustc-community\u002Fdfine-small-coco\",\n",{"type":42,"tag":190,"props":3256,"children":3257},{"class":192,"line":851},[3258],{"type":42,"tag":190,"props":3259,"children":3260},{},[3261],{"type":48,"value":3262},"    \"--dataset_name\", \"cppe-5\",\n",{"type":42,"tag":190,"props":3264,"children":3265},{"class":192,"line":860},[3266],{"type":42,"tag":190,"props":3267,"children":3268},{},[3269],{"type":48,"value":3270},"    \"--image_square_size\", \"640\",\n",{"type":42,"tag":190,"props":3272,"children":3273},{"class":192,"line":970},[3274],{"type":42,"tag":190,"props":3275,"children":3276},{},[3277],{"type":48,"value":3278},"    \"--output_dir\", \"dfine_finetuned\",\n",{"type":42,"tag":190,"props":3280,"children":3281},{"class":192,"line":979},[3282],{"type":42,"tag":190,"props":3283,"children":3284},{},[3285],{"type":48,"value":3286},"    \"--num_train_epochs\", \"30\",\n",{"type":42,"tag":190,"props":3288,"children":3289},{"class":192,"line":988},[3290],{"type":42,"tag":190,"props":3291,"children":3292},{},[3293],{"type":48,"value":3294},"    \"--per_device_train_batch_size\", \"8\",\n",{"type":42,"tag":190,"props":3296,"children":3297},{"class":192,"line":997},[3298],{"type":42,"tag":190,"props":3299,"children":3300},{},[3301],{"type":48,"value":3302},"    \"--learning_rate\", \"5e-5\",\n",{"type":42,"tag":190,"props":3304,"children":3305},{"class":192,"line":1223},[3306],{"type":42,"tag":190,"props":3307,"children":3308},{},[3309],{"type":48,"value":3310},"    \"--eval_strategy\", \"epoch\",\n",{"type":42,"tag":190,"props":3312,"children":3313},{"class":192,"line":1232},[3314],{"type":42,"tag":190,"props":3315,"children":3316},{},[3317],{"type":48,"value":3318},"    \"--save_strategy\", \"epoch\",\n",{"type":42,"tag":190,"props":3320,"children":3321},{"class":192,"line":1241},[3322],{"type":42,"tag":190,"props":3323,"children":3324},{},[3325],{"type":48,"value":3326},"    \"--save_total_limit\", \"2\",\n",{"type":42,"tag":190,"props":3328,"children":3329},{"class":192,"line":1250},[3330],{"type":42,"tag":190,"props":3331,"children":3332},{},[3333],{"type":48,"value":3334},"    \"--load_best_model_at_end\",\n",{"type":42,"tag":190,"props":3336,"children":3337},{"class":192,"line":1258},[3338],{"type":42,"tag":190,"props":3339,"children":3340},{},[3341],{"type":48,"value":3342},"    \"--metric_for_best_model\", \"eval_map\",\n",{"type":42,"tag":190,"props":3344,"children":3345},{"class":192,"line":1267},[3346],{"type":42,"tag":190,"props":3347,"children":3348},{},[3349],{"type":48,"value":3350},"    \"--greater_is_better\", \"True\",\n",{"type":42,"tag":190,"props":3352,"children":3353},{"class":192,"line":1276},[3354],{"type":42,"tag":190,"props":3355,"children":3356},{},[3357],{"type":48,"value":3358},"    \"--no_remove_unused_columns\",\n",{"type":42,"tag":190,"props":3360,"children":3361},{"class":192,"line":1284},[3362],{"type":42,"tag":190,"props":3363,"children":3364},{},[3365],{"type":48,"value":3366},"    \"--no_eval_do_concat_batches\",\n",{"type":42,"tag":190,"props":3368,"children":3369},{"class":192,"line":1293},[3370],{"type":42,"tag":190,"props":3371,"children":3372},{},[3373],{"type":48,"value":3374},"    \"--push_to_hub\",\n",{"type":42,"tag":190,"props":3376,"children":3377},{"class":192,"line":1302},[3378],{"type":42,"tag":190,"props":3379,"children":3380},{},[3381],{"type":48,"value":3382},"    \"--hub_model_id\", \"username\u002Fmodel-name\",\n",{"type":42,"tag":190,"props":3384,"children":3385},{"class":192,"line":1310},[3386],{"type":42,"tag":190,"props":3387,"children":3388},{},[3389],{"type":48,"value":3390},"    \"--do_train\",\n",{"type":42,"tag":190,"props":3392,"children":3393},{"class":192,"line":1318},[3394],{"type":42,"tag":190,"props":3395,"children":3396},{},[3397],{"type":48,"value":3398},"    \"--do_eval\",\n",{"type":42,"tag":190,"props":3400,"children":3401},{"class":192,"line":1326},[3402],{"type":42,"tag":190,"props":3403,"children":3404},{},[3405],{"type":48,"value":3406},"]\n",{"type":42,"tag":179,"props":3408,"children":3410},{"className":826,"code":3409,"language":828,"meta":184,"style":184},"from huggingface_hub import HfApi, get_token\napi = HfApi()\njob_info = api.run_uv_job(\n    script=\"scripts\u002Fobject_detection_training.py\",\n    script_args=OD_SCRIPT_ARGS,\n    flavor=\"t4-small\",\n    timeout=14400,\n    env={\"PYTHONUNBUFFERED\": \"1\"},\n    secrets={\"HF_TOKEN\": get_token()},\n)\nprint(f\"Job ID: {job_info.id}\")\n",[3411],{"type":42,"tag":130,"props":3412,"children":3413},{"__ignoreMap":184},[3414,3421,3428,3435,3443,3451,3459,3467,3474,3482,3489],{"type":42,"tag":190,"props":3415,"children":3416},{"class":192,"line":193},[3417],{"type":42,"tag":190,"props":3418,"children":3419},{},[3420],{"type":48,"value":1692},{"type":42,"tag":190,"props":3422,"children":3423},{"class":192,"line":234},[3424],{"type":42,"tag":190,"props":3425,"children":3426},{},[3427],{"type":48,"value":951},{"type":42,"tag":190,"props":3429,"children":3430},{"class":192,"line":851},[3431],{"type":42,"tag":190,"props":3432,"children":3433},{},[3434],{"type":48,"value":1707},{"type":42,"tag":190,"props":3436,"children":3437},{"class":192,"line":860},[3438],{"type":42,"tag":190,"props":3439,"children":3440},{},[3441],{"type":48,"value":3442},"    script=\"scripts\u002Fobject_detection_training.py\",\n",{"type":42,"tag":190,"props":3444,"children":3445},{"class":192,"line":970},[3446],{"type":42,"tag":190,"props":3447,"children":3448},{},[3449],{"type":48,"value":3450},"    script_args=OD_SCRIPT_ARGS,\n",{"type":42,"tag":190,"props":3452,"children":3453},{"class":192,"line":979},[3454],{"type":42,"tag":190,"props":3455,"children":3456},{},[3457],{"type":48,"value":3458},"    flavor=\"t4-small\",\n",{"type":42,"tag":190,"props":3460,"children":3461},{"class":192,"line":988},[3462],{"type":42,"tag":190,"props":3463,"children":3464},{},[3465],{"type":48,"value":3466},"    timeout=14400,\n",{"type":42,"tag":190,"props":3468,"children":3469},{"class":192,"line":997},[3470],{"type":42,"tag":190,"props":3471,"children":3472},{},[3473],{"type":48,"value":1747},{"type":42,"tag":190,"props":3475,"children":3476},{"class":192,"line":1223},[3477],{"type":42,"tag":190,"props":3478,"children":3479},{},[3480],{"type":48,"value":3481},"    secrets={\"HF_TOKEN\": get_token()},\n",{"type":42,"tag":190,"props":3483,"children":3484},{"class":192,"line":1232},[3485],{"type":42,"tag":190,"props":3486,"children":3487},{},[3488],{"type":48,"value":1003},{"type":42,"tag":190,"props":3490,"children":3491},{"class":192,"line":1241},[3492],{"type":42,"tag":190,"props":3493,"children":3494},{},[3495],{"type":48,"value":1770},{"type":42,"tag":266,"props":3497,"children":3499},{"id":3498},"key-od-script_args",[3500,3502],{"type":48,"value":3501},"Key OD ",{"type":42,"tag":130,"props":3503,"children":3505},{"className":3504},[],[3506],{"type":48,"value":1482},{"type":42,"tag":69,"props":3508,"children":3509},{},[3510,3529,3540,3551,3569,3580,3591,3610],{"type":42,"tag":73,"props":3511,"children":3512},{},[3513,3519,3521,3527],{"type":42,"tag":130,"props":3514,"children":3516},{"className":3515},[],[3517],{"type":48,"value":3518},"--model_name_or_path",{"type":48,"value":3520}," — recommended: ",{"type":42,"tag":130,"props":3522,"children":3524},{"className":3523},[],[3525],{"type":48,"value":3526},"\"ustc-community\u002Fdfine-small-coco\"",{"type":48,"value":3528}," (see model table above)",{"type":42,"tag":73,"props":3530,"children":3531},{},[3532,3538],{"type":42,"tag":130,"props":3533,"children":3535},{"className":3534},[],[3536],{"type":48,"value":3537},"--dataset_name",{"type":48,"value":3539}," — the Hub dataset ID",{"type":42,"tag":73,"props":3541,"children":3542},{},[3543,3549],{"type":42,"tag":130,"props":3544,"children":3546},{"className":3545},[],[3547],{"type":48,"value":3548},"--image_square_size",{"type":48,"value":3550}," — 480 (fast iteration) or 800 (better accuracy)",{"type":42,"tag":73,"props":3552,"children":3553},{},[3554,3560,3561,3567],{"type":42,"tag":130,"props":3555,"children":3557},{"className":3556},[],[3558],{"type":48,"value":3559},"--hub_model_id",{"type":48,"value":749},{"type":42,"tag":130,"props":3562,"children":3564},{"className":3563},[],[3565],{"type":48,"value":3566},"\"username\u002Fmodel-name\"",{"type":48,"value":3568}," for Hub persistence",{"type":42,"tag":73,"props":3570,"children":3571},{},[3572,3578],{"type":42,"tag":130,"props":3573,"children":3575},{"className":3574},[],[3576],{"type":48,"value":3577},"--num_train_epochs",{"type":48,"value":3579}," — 30 typical for convergence",{"type":42,"tag":73,"props":3581,"children":3582},{},[3583,3589],{"type":42,"tag":130,"props":3584,"children":3586},{"className":3585},[],[3587],{"type":48,"value":3588},"--train_val_split",{"type":48,"value":3590}," — fraction to split for validation (default 0.15), set if dataset lacks a validation split",{"type":42,"tag":73,"props":3592,"children":3593},{},[3594,3600,3602,3608],{"type":42,"tag":130,"props":3595,"children":3597},{"className":3596},[],[3598],{"type":48,"value":3599},"--max_train_samples",{"type":48,"value":3601}," — truncate training set (useful for quick test runs, e.g. ",{"type":42,"tag":130,"props":3603,"children":3605},{"className":3604},[],[3606],{"type":48,"value":3607},"\"785\"",{"type":48,"value":3609}," for ~10% of a 7.8K dataset)",{"type":42,"tag":73,"props":3611,"children":3612},{},[3613,3619],{"type":42,"tag":130,"props":3614,"children":3616},{"className":3615},[],[3617],{"type":48,"value":3618},"--max_eval_samples",{"type":48,"value":3620}," — truncate evaluation set",{"type":42,"tag":57,"props":3622,"children":3624},{"id":3623},"quick-start-image-classification",[3625],{"type":48,"value":3626},"Quick start — Image Classification",{"type":42,"tag":179,"props":3628,"children":3630},{"className":826,"code":3629,"language":828,"meta":184,"style":184},"IC_SCRIPT_ARGS = [\n    \"--model_name_or_path\", \"timm\u002Fmobilenetv3_small_100.lamb_in1k\",\n    \"--dataset_name\", \"ethz\u002Ffood101\",\n    \"--output_dir\", \"food101_classifier\",\n    \"--num_train_epochs\", \"5\",\n    \"--per_device_train_batch_size\", \"32\",\n    \"--per_device_eval_batch_size\", \"32\",\n    \"--learning_rate\", \"5e-5\",\n    \"--eval_strategy\", \"epoch\",\n    \"--save_strategy\", \"epoch\",\n    \"--save_total_limit\", \"2\",\n    \"--load_best_model_at_end\",\n    \"--metric_for_best_model\", \"eval_accuracy\",\n    \"--greater_is_better\", \"True\",\n    \"--no_remove_unused_columns\",\n    \"--push_to_hub\",\n    \"--hub_model_id\", \"username\u002Ffood101-classifier\",\n    \"--do_train\",\n    \"--do_eval\",\n]\n",[3631],{"type":42,"tag":130,"props":3632,"children":3633},{"__ignoreMap":184},[3634,3642,3650,3658,3666,3674,3682,3690,3697,3704,3711,3718,3725,3733,3740,3747,3754,3762,3769,3776],{"type":42,"tag":190,"props":3635,"children":3636},{"class":192,"line":193},[3637],{"type":42,"tag":190,"props":3638,"children":3639},{},[3640],{"type":48,"value":3641},"IC_SCRIPT_ARGS = [\n",{"type":42,"tag":190,"props":3643,"children":3644},{"class":192,"line":234},[3645],{"type":42,"tag":190,"props":3646,"children":3647},{},[3648],{"type":48,"value":3649},"    \"--model_name_or_path\", \"timm\u002Fmobilenetv3_small_100.lamb_in1k\",\n",{"type":42,"tag":190,"props":3651,"children":3652},{"class":192,"line":851},[3653],{"type":42,"tag":190,"props":3654,"children":3655},{},[3656],{"type":48,"value":3657},"    \"--dataset_name\", \"ethz\u002Ffood101\",\n",{"type":42,"tag":190,"props":3659,"children":3660},{"class":192,"line":860},[3661],{"type":42,"tag":190,"props":3662,"children":3663},{},[3664],{"type":48,"value":3665},"    \"--output_dir\", \"food101_classifier\",\n",{"type":42,"tag":190,"props":3667,"children":3668},{"class":192,"line":970},[3669],{"type":42,"tag":190,"props":3670,"children":3671},{},[3672],{"type":48,"value":3673},"    \"--num_train_epochs\", \"5\",\n",{"type":42,"tag":190,"props":3675,"children":3676},{"class":192,"line":979},[3677],{"type":42,"tag":190,"props":3678,"children":3679},{},[3680],{"type":48,"value":3681},"    \"--per_device_train_batch_size\", \"32\",\n",{"type":42,"tag":190,"props":3683,"children":3684},{"class":192,"line":988},[3685],{"type":42,"tag":190,"props":3686,"children":3687},{},[3688],{"type":48,"value":3689},"    \"--per_device_eval_batch_size\", \"32\",\n",{"type":42,"tag":190,"props":3691,"children":3692},{"class":192,"line":997},[3693],{"type":42,"tag":190,"props":3694,"children":3695},{},[3696],{"type":48,"value":3302},{"type":42,"tag":190,"props":3698,"children":3699},{"class":192,"line":1223},[3700],{"type":42,"tag":190,"props":3701,"children":3702},{},[3703],{"type":48,"value":3310},{"type":42,"tag":190,"props":3705,"children":3706},{"class":192,"line":1232},[3707],{"type":42,"tag":190,"props":3708,"children":3709},{},[3710],{"type":48,"value":3318},{"type":42,"tag":190,"props":3712,"children":3713},{"class":192,"line":1241},[3714],{"type":42,"tag":190,"props":3715,"children":3716},{},[3717],{"type":48,"value":3326},{"type":42,"tag":190,"props":3719,"children":3720},{"class":192,"line":1250},[3721],{"type":42,"tag":190,"props":3722,"children":3723},{},[3724],{"type":48,"value":3334},{"type":42,"tag":190,"props":3726,"children":3727},{"class":192,"line":1258},[3728],{"type":42,"tag":190,"props":3729,"children":3730},{},[3731],{"type":48,"value":3732},"    \"--metric_for_best_model\", \"eval_accuracy\",\n",{"type":42,"tag":190,"props":3734,"children":3735},{"class":192,"line":1267},[3736],{"type":42,"tag":190,"props":3737,"children":3738},{},[3739],{"type":48,"value":3350},{"type":42,"tag":190,"props":3741,"children":3742},{"class":192,"line":1276},[3743],{"type":42,"tag":190,"props":3744,"children":3745},{},[3746],{"type":48,"value":3358},{"type":42,"tag":190,"props":3748,"children":3749},{"class":192,"line":1284},[3750],{"type":42,"tag":190,"props":3751,"children":3752},{},[3753],{"type":48,"value":3374},{"type":42,"tag":190,"props":3755,"children":3756},{"class":192,"line":1293},[3757],{"type":42,"tag":190,"props":3758,"children":3759},{},[3760],{"type":48,"value":3761},"    \"--hub_model_id\", \"username\u002Ffood101-classifier\",\n",{"type":42,"tag":190,"props":3763,"children":3764},{"class":192,"line":1302},[3765],{"type":42,"tag":190,"props":3766,"children":3767},{},[3768],{"type":48,"value":3390},{"type":42,"tag":190,"props":3770,"children":3771},{"class":192,"line":1310},[3772],{"type":42,"tag":190,"props":3773,"children":3774},{},[3775],{"type":48,"value":3398},{"type":42,"tag":190,"props":3777,"children":3778},{"class":192,"line":1318},[3779],{"type":42,"tag":190,"props":3780,"children":3781},{},[3782],{"type":48,"value":3406},{"type":42,"tag":179,"props":3784,"children":3786},{"className":826,"code":3785,"language":828,"meta":184,"style":184},"from huggingface_hub import HfApi, get_token\napi = HfApi()\njob_info = api.run_uv_job(\n    script=\"scripts\u002Fimage_classification_training.py\",\n    script_args=IC_SCRIPT_ARGS,\n    flavor=\"t4-small\",\n    timeout=7200,\n    env={\"PYTHONUNBUFFERED\": \"1\"},\n    secrets={\"HF_TOKEN\": get_token()},\n)\nprint(f\"Job ID: {job_info.id}\")\n",[3787],{"type":42,"tag":130,"props":3788,"children":3789},{"__ignoreMap":184},[3790,3797,3804,3811,3819,3827,3834,3842,3849,3856,3863],{"type":42,"tag":190,"props":3791,"children":3792},{"class":192,"line":193},[3793],{"type":42,"tag":190,"props":3794,"children":3795},{},[3796],{"type":48,"value":1692},{"type":42,"tag":190,"props":3798,"children":3799},{"class":192,"line":234},[3800],{"type":42,"tag":190,"props":3801,"children":3802},{},[3803],{"type":48,"value":951},{"type":42,"tag":190,"props":3805,"children":3806},{"class":192,"line":851},[3807],{"type":42,"tag":190,"props":3808,"children":3809},{},[3810],{"type":48,"value":1707},{"type":42,"tag":190,"props":3812,"children":3813},{"class":192,"line":860},[3814],{"type":42,"tag":190,"props":3815,"children":3816},{},[3817],{"type":48,"value":3818},"    script=\"scripts\u002Fimage_classification_training.py\",\n",{"type":42,"tag":190,"props":3820,"children":3821},{"class":192,"line":970},[3822],{"type":42,"tag":190,"props":3823,"children":3824},{},[3825],{"type":48,"value":3826},"    script_args=IC_SCRIPT_ARGS,\n",{"type":42,"tag":190,"props":3828,"children":3829},{"class":192,"line":979},[3830],{"type":42,"tag":190,"props":3831,"children":3832},{},[3833],{"type":48,"value":3458},{"type":42,"tag":190,"props":3835,"children":3836},{"class":192,"line":988},[3837],{"type":42,"tag":190,"props":3838,"children":3839},{},[3840],{"type":48,"value":3841},"    timeout=7200,\n",{"type":42,"tag":190,"props":3843,"children":3844},{"class":192,"line":997},[3845],{"type":42,"tag":190,"props":3846,"children":3847},{},[3848],{"type":48,"value":1747},{"type":42,"tag":190,"props":3850,"children":3851},{"class":192,"line":1223},[3852],{"type":42,"tag":190,"props":3853,"children":3854},{},[3855],{"type":48,"value":3481},{"type":42,"tag":190,"props":3857,"children":3858},{"class":192,"line":1232},[3859],{"type":42,"tag":190,"props":3860,"children":3861},{},[3862],{"type":48,"value":1003},{"type":42,"tag":190,"props":3864,"children":3865},{"class":192,"line":1241},[3866],{"type":42,"tag":190,"props":3867,"children":3868},{},[3869],{"type":48,"value":1770},{"type":42,"tag":266,"props":3871,"children":3873},{"id":3872},"key-ic-script_args",[3874,3876],{"type":48,"value":3875},"Key IC ",{"type":42,"tag":130,"props":3877,"children":3879},{"className":3878},[],[3880],{"type":48,"value":1482},{"type":42,"tag":69,"props":3882,"children":3883},{},[3884,3901,3910,3928,3946,3961,3971,3982,3991],{"type":42,"tag":73,"props":3885,"children":3886},{},[3887,3892,3894,3899],{"type":42,"tag":130,"props":3888,"children":3890},{"className":3889},[],[3891],{"type":48,"value":3518},{"type":48,"value":3893}," — any ",{"type":42,"tag":130,"props":3895,"children":3897},{"className":3896},[],[3898],{"type":48,"value":2750},{"type":48,"value":3900}," model or Transformers classification model (see model table above)",{"type":42,"tag":73,"props":3902,"children":3903},{},[3904,3909],{"type":42,"tag":130,"props":3905,"children":3907},{"className":3906},[],[3908],{"type":48,"value":3537},{"type":48,"value":3539},{"type":42,"tag":73,"props":3911,"children":3912},{},[3913,3919,3921,3927],{"type":42,"tag":130,"props":3914,"children":3916},{"className":3915},[],[3917],{"type":48,"value":3918},"--image_column_name",{"type":48,"value":3920}," — column containing PIL images (default: ",{"type":42,"tag":130,"props":3922,"children":3924},{"className":3923},[],[3925],{"type":48,"value":3926},"\"image\"",{"type":48,"value":1900},{"type":42,"tag":73,"props":3929,"children":3930},{},[3931,3937,3939,3945],{"type":42,"tag":130,"props":3932,"children":3934},{"className":3933},[],[3935],{"type":48,"value":3936},"--label_column_name",{"type":48,"value":3938}," — column containing class labels (default: ",{"type":42,"tag":130,"props":3940,"children":3942},{"className":3941},[],[3943],{"type":48,"value":3944},"\"label\"",{"type":48,"value":1900},{"type":42,"tag":73,"props":3947,"children":3948},{},[3949,3954,3955,3960],{"type":42,"tag":130,"props":3950,"children":3952},{"className":3951},[],[3953],{"type":48,"value":3559},{"type":48,"value":749},{"type":42,"tag":130,"props":3956,"children":3958},{"className":3957},[],[3959],{"type":48,"value":3566},{"type":48,"value":3568},{"type":42,"tag":73,"props":3962,"children":3963},{},[3964,3969],{"type":42,"tag":130,"props":3965,"children":3967},{"className":3966},[],[3968],{"type":48,"value":3577},{"type":48,"value":3970}," — 3-5 typical for classification (fewer than OD)",{"type":42,"tag":73,"props":3972,"children":3973},{},[3974,3980],{"type":42,"tag":130,"props":3975,"children":3977},{"className":3976},[],[3978],{"type":48,"value":3979},"--per_device_train_batch_size",{"type":48,"value":3981}," — 16-64 (classification models use less memory than OD)",{"type":42,"tag":73,"props":3983,"children":3984},{},[3985,3990],{"type":42,"tag":130,"props":3986,"children":3988},{"className":3987},[],[3989],{"type":48,"value":3588},{"type":48,"value":3590},{"type":42,"tag":73,"props":3992,"children":3993},{},[3994,3999,4001,4006],{"type":42,"tag":130,"props":3995,"children":3997},{"className":3996},[],[3998],{"type":48,"value":3599},{"type":48,"value":4000}," \u002F ",{"type":42,"tag":130,"props":4002,"children":4004},{"className":4003},[],[4005],{"type":48,"value":3618},{"type":48,"value":4007}," — truncate for quick tests",{"type":42,"tag":57,"props":4009,"children":4011},{"id":4010},"quick-start-samsam2-segmentation",[4012],{"type":48,"value":4013},"Quick start — SAM\u002FSAM2 Segmentation",{"type":42,"tag":179,"props":4015,"children":4017},{"className":826,"code":4016,"language":828,"meta":184,"style":184},"SAM_SCRIPT_ARGS = [\n    \"--model_name_or_path\", \"facebook\u002Fsam2.1-hiera-small\",\n    \"--dataset_name\", \"merve\u002FMicroMat-mini\",\n    \"--prompt_type\", \"bbox\",\n    \"--prompt_column_name\", \"prompt\",\n    \"--output_dir\", \"sam2-finetuned\",\n    \"--num_train_epochs\", \"30\",\n    \"--per_device_train_batch_size\", \"4\",\n    \"--learning_rate\", \"1e-5\",\n    \"--logging_steps\", \"1\",\n    \"--save_strategy\", \"epoch\",\n    \"--save_total_limit\", \"2\",\n    \"--remove_unused_columns\", \"False\",\n    \"--dataloader_pin_memory\", \"False\",\n    \"--push_to_hub\",\n    \"--hub_model_id\", \"username\u002Fsam2-finetuned\",\n    \"--do_train\",\n    \"--report_to\", \"trackio\",\n]\n",[4018],{"type":42,"tag":130,"props":4019,"children":4020},{"__ignoreMap":184},[4021,4029,4037,4045,4053,4061,4069,4076,4084,4092,4100,4107,4114,4122,4130,4137,4145,4152,4160],{"type":42,"tag":190,"props":4022,"children":4023},{"class":192,"line":193},[4024],{"type":42,"tag":190,"props":4025,"children":4026},{},[4027],{"type":48,"value":4028},"SAM_SCRIPT_ARGS = [\n",{"type":42,"tag":190,"props":4030,"children":4031},{"class":192,"line":234},[4032],{"type":42,"tag":190,"props":4033,"children":4034},{},[4035],{"type":48,"value":4036},"    \"--model_name_or_path\", \"facebook\u002Fsam2.1-hiera-small\",\n",{"type":42,"tag":190,"props":4038,"children":4039},{"class":192,"line":851},[4040],{"type":42,"tag":190,"props":4041,"children":4042},{},[4043],{"type":48,"value":4044},"    \"--dataset_name\", \"merve\u002FMicroMat-mini\",\n",{"type":42,"tag":190,"props":4046,"children":4047},{"class":192,"line":860},[4048],{"type":42,"tag":190,"props":4049,"children":4050},{},[4051],{"type":48,"value":4052},"    \"--prompt_type\", \"bbox\",\n",{"type":42,"tag":190,"props":4054,"children":4055},{"class":192,"line":970},[4056],{"type":42,"tag":190,"props":4057,"children":4058},{},[4059],{"type":48,"value":4060},"    \"--prompt_column_name\", \"prompt\",\n",{"type":42,"tag":190,"props":4062,"children":4063},{"class":192,"line":979},[4064],{"type":42,"tag":190,"props":4065,"children":4066},{},[4067],{"type":48,"value":4068},"    \"--output_dir\", \"sam2-finetuned\",\n",{"type":42,"tag":190,"props":4070,"children":4071},{"class":192,"line":988},[4072],{"type":42,"tag":190,"props":4073,"children":4074},{},[4075],{"type":48,"value":3286},{"type":42,"tag":190,"props":4077,"children":4078},{"class":192,"line":997},[4079],{"type":42,"tag":190,"props":4080,"children":4081},{},[4082],{"type":48,"value":4083},"    \"--per_device_train_batch_size\", \"4\",\n",{"type":42,"tag":190,"props":4085,"children":4086},{"class":192,"line":1223},[4087],{"type":42,"tag":190,"props":4088,"children":4089},{},[4090],{"type":48,"value":4091},"    \"--learning_rate\", \"1e-5\",\n",{"type":42,"tag":190,"props":4093,"children":4094},{"class":192,"line":1232},[4095],{"type":42,"tag":190,"props":4096,"children":4097},{},[4098],{"type":48,"value":4099},"    \"--logging_steps\", \"1\",\n",{"type":42,"tag":190,"props":4101,"children":4102},{"class":192,"line":1241},[4103],{"type":42,"tag":190,"props":4104,"children":4105},{},[4106],{"type":48,"value":3318},{"type":42,"tag":190,"props":4108,"children":4109},{"class":192,"line":1250},[4110],{"type":42,"tag":190,"props":4111,"children":4112},{},[4113],{"type":48,"value":3326},{"type":42,"tag":190,"props":4115,"children":4116},{"class":192,"line":1258},[4117],{"type":42,"tag":190,"props":4118,"children":4119},{},[4120],{"type":48,"value":4121},"    \"--remove_unused_columns\", \"False\",\n",{"type":42,"tag":190,"props":4123,"children":4124},{"class":192,"line":1267},[4125],{"type":42,"tag":190,"props":4126,"children":4127},{},[4128],{"type":48,"value":4129},"    \"--dataloader_pin_memory\", \"False\",\n",{"type":42,"tag":190,"props":4131,"children":4132},{"class":192,"line":1276},[4133],{"type":42,"tag":190,"props":4134,"children":4135},{},[4136],{"type":48,"value":3374},{"type":42,"tag":190,"props":4138,"children":4139},{"class":192,"line":1284},[4140],{"type":42,"tag":190,"props":4141,"children":4142},{},[4143],{"type":48,"value":4144},"    \"--hub_model_id\", \"username\u002Fsam2-finetuned\",\n",{"type":42,"tag":190,"props":4146,"children":4147},{"class":192,"line":1293},[4148],{"type":42,"tag":190,"props":4149,"children":4150},{},[4151],{"type":48,"value":3390},{"type":42,"tag":190,"props":4153,"children":4154},{"class":192,"line":1302},[4155],{"type":42,"tag":190,"props":4156,"children":4157},{},[4158],{"type":48,"value":4159},"    \"--report_to\", \"trackio\",\n",{"type":42,"tag":190,"props":4161,"children":4162},{"class":192,"line":1310},[4163],{"type":42,"tag":190,"props":4164,"children":4165},{},[4166],{"type":48,"value":3406},{"type":42,"tag":179,"props":4168,"children":4170},{"className":826,"code":4169,"language":828,"meta":184,"style":184},"from huggingface_hub import HfApi, get_token\napi = HfApi()\njob_info = api.run_uv_job(\n    script=\"scripts\u002Fsam_segmentation_training.py\",\n    script_args=SAM_SCRIPT_ARGS,\n    flavor=\"t4-small\",\n    timeout=7200,\n    env={\"PYTHONUNBUFFERED\": \"1\"},\n    secrets={\"HF_TOKEN\": get_token()},\n)\nprint(f\"Job ID: {job_info.id}\")\n",[4171],{"type":42,"tag":130,"props":4172,"children":4173},{"__ignoreMap":184},[4174,4181,4188,4195,4203,4211,4218,4225,4232,4239,4246],{"type":42,"tag":190,"props":4175,"children":4176},{"class":192,"line":193},[4177],{"type":42,"tag":190,"props":4178,"children":4179},{},[4180],{"type":48,"value":1692},{"type":42,"tag":190,"props":4182,"children":4183},{"class":192,"line":234},[4184],{"type":42,"tag":190,"props":4185,"children":4186},{},[4187],{"type":48,"value":951},{"type":42,"tag":190,"props":4189,"children":4190},{"class":192,"line":851},[4191],{"type":42,"tag":190,"props":4192,"children":4193},{},[4194],{"type":48,"value":1707},{"type":42,"tag":190,"props":4196,"children":4197},{"class":192,"line":860},[4198],{"type":42,"tag":190,"props":4199,"children":4200},{},[4201],{"type":48,"value":4202},"    script=\"scripts\u002Fsam_segmentation_training.py\",\n",{"type":42,"tag":190,"props":4204,"children":4205},{"class":192,"line":970},[4206],{"type":42,"tag":190,"props":4207,"children":4208},{},[4209],{"type":48,"value":4210},"    script_args=SAM_SCRIPT_ARGS,\n",{"type":42,"tag":190,"props":4212,"children":4213},{"class":192,"line":979},[4214],{"type":42,"tag":190,"props":4215,"children":4216},{},[4217],{"type":48,"value":3458},{"type":42,"tag":190,"props":4219,"children":4220},{"class":192,"line":988},[4221],{"type":42,"tag":190,"props":4222,"children":4223},{},[4224],{"type":48,"value":3841},{"type":42,"tag":190,"props":4226,"children":4227},{"class":192,"line":997},[4228],{"type":42,"tag":190,"props":4229,"children":4230},{},[4231],{"type":48,"value":1747},{"type":42,"tag":190,"props":4233,"children":4234},{"class":192,"line":1223},[4235],{"type":42,"tag":190,"props":4236,"children":4237},{},[4238],{"type":48,"value":3481},{"type":42,"tag":190,"props":4240,"children":4241},{"class":192,"line":1232},[4242],{"type":42,"tag":190,"props":4243,"children":4244},{},[4245],{"type":48,"value":1003},{"type":42,"tag":190,"props":4247,"children":4248},{"class":192,"line":1241},[4249],{"type":42,"tag":190,"props":4250,"children":4251},{},[4252],{"type":48,"value":1770},{"type":42,"tag":266,"props":4254,"children":4256},{"id":4255},"key-sam-script_args",[4257,4259],{"type":48,"value":4258},"Key SAM ",{"type":42,"tag":130,"props":4260,"children":4262},{"className":4261},[],[4263],{"type":48,"value":1482},{"type":42,"tag":69,"props":4265,"children":4266},{},[4267,4277,4294,4319,4337,4348,4359,4377,4392,4402,4412,4430],{"type":42,"tag":73,"props":4268,"children":4269},{},[4270,4275],{"type":42,"tag":130,"props":4271,"children":4273},{"className":4272},[],[4274],{"type":48,"value":3518},{"type":48,"value":4276}," — SAM or SAM2 model (see model table above); auto-detects SAM vs SAM2",{"type":42,"tag":73,"props":4278,"children":4279},{},[4280,4285,4287,4293],{"type":42,"tag":130,"props":4281,"children":4283},{"className":4282},[],[4284],{"type":48,"value":3537},{"type":48,"value":4286}," — the Hub dataset ID (e.g., ",{"type":42,"tag":130,"props":4288,"children":4290},{"className":4289},[],[4291],{"type":48,"value":4292},"\"merve\u002FMicroMat-mini\"",{"type":48,"value":1900},{"type":42,"tag":73,"props":4295,"children":4296},{},[4297,4303,4304,4310,4311,4317],{"type":42,"tag":130,"props":4298,"children":4300},{"className":4299},[],[4301],{"type":48,"value":4302},"--prompt_type",{"type":48,"value":749},{"type":42,"tag":130,"props":4305,"children":4307},{"className":4306},[],[4308],{"type":48,"value":4309},"\"bbox\"",{"type":48,"value":412},{"type":42,"tag":130,"props":4312,"children":4314},{"className":4313},[],[4315],{"type":48,"value":4316},"\"point\"",{"type":48,"value":4318}," — type of prompt in the dataset",{"type":42,"tag":73,"props":4320,"children":4321},{},[4322,4328,4330,4336],{"type":42,"tag":130,"props":4323,"children":4325},{"className":4324},[],[4326],{"type":48,"value":4327},"--prompt_column_name",{"type":48,"value":4329}," — column with JSON-encoded prompts (default: ",{"type":42,"tag":130,"props":4331,"children":4333},{"className":4332},[],[4334],{"type":48,"value":4335},"\"prompt\"",{"type":48,"value":1900},{"type":42,"tag":73,"props":4338,"children":4339},{},[4340,4346],{"type":42,"tag":130,"props":4341,"children":4343},{"className":4342},[],[4344],{"type":48,"value":4345},"--bbox_column_name",{"type":48,"value":4347}," — dedicated bbox column (alternative to JSON prompt column)",{"type":42,"tag":73,"props":4349,"children":4350},{},[4351,4357],{"type":42,"tag":130,"props":4352,"children":4354},{"className":4353},[],[4355],{"type":48,"value":4356},"--point_column_name",{"type":48,"value":4358}," — dedicated point column (alternative to JSON prompt column)",{"type":42,"tag":73,"props":4360,"children":4361},{},[4362,4368,4370,4376],{"type":42,"tag":130,"props":4363,"children":4365},{"className":4364},[],[4366],{"type":48,"value":4367},"--mask_column_name",{"type":48,"value":4369}," — column with ground-truth masks (default: ",{"type":42,"tag":130,"props":4371,"children":4373},{"className":4372},[],[4374],{"type":48,"value":4375},"\"mask\"",{"type":48,"value":1900},{"type":42,"tag":73,"props":4378,"children":4379},{},[4380,4385,4386,4391],{"type":42,"tag":130,"props":4381,"children":4383},{"className":4382},[],[4384],{"type":48,"value":3559},{"type":48,"value":749},{"type":42,"tag":130,"props":4387,"children":4389},{"className":4388},[],[4390],{"type":48,"value":3566},{"type":48,"value":3568},{"type":42,"tag":73,"props":4393,"children":4394},{},[4395,4400],{"type":42,"tag":130,"props":4396,"children":4398},{"className":4397},[],[4399],{"type":48,"value":3577},{"type":48,"value":4401}," — 20-30 typical for SAM fine-tuning",{"type":42,"tag":73,"props":4403,"children":4404},{},[4405,4410],{"type":42,"tag":130,"props":4406,"children":4408},{"className":4407},[],[4409],{"type":48,"value":3979},{"type":48,"value":4411}," — 2-4 (SAM models use significant memory)",{"type":42,"tag":73,"props":4413,"children":4414},{},[4415,4421,4422,4428],{"type":42,"tag":130,"props":4416,"children":4418},{"className":4417},[],[4419],{"type":48,"value":4420},"--freeze_vision_encoder",{"type":48,"value":4000},{"type":42,"tag":130,"props":4423,"children":4425},{"className":4424},[],[4426],{"type":48,"value":4427},"--freeze_prompt_encoder",{"type":48,"value":4429}," — freeze encoder weights (default: both frozen, only mask decoder trains)",{"type":42,"tag":73,"props":4431,"children":4432},{},[4433,4438],{"type":42,"tag":130,"props":4434,"children":4436},{"className":4435},[],[4437],{"type":48,"value":3588},{"type":48,"value":4439}," — fraction to split for validation (default 0.1)",{"type":42,"tag":57,"props":4441,"children":4443},{"id":4442},"checking-job-status",[4444],{"type":48,"value":4445},"Checking job status",{"type":42,"tag":51,"props":4447,"children":4448},{},[4449],{"type":42,"tag":126,"props":4450,"children":4451},{},[4452],{"type":48,"value":4453},"MCP tool (if available):",{"type":42,"tag":179,"props":4455,"children":4458},{"className":4456,"code":4457,"language":48},[1104],"hf_jobs(\"ps\")                                   # List all jobs\nhf_jobs(\"logs\", {\"job_id\": \"your-job-id\"})      # View logs\nhf_jobs(\"inspect\", {\"job_id\": \"your-job-id\"})   # Job details\n",[4459],{"type":42,"tag":130,"props":4460,"children":4461},{"__ignoreMap":184},[4462],{"type":48,"value":4457},{"type":42,"tag":51,"props":4464,"children":4465},{},[4466],{"type":42,"tag":126,"props":4467,"children":4468},{},[4469],{"type":48,"value":4470},"Python API fallback:",{"type":42,"tag":179,"props":4472,"children":4474},{"className":826,"code":4473,"language":828,"meta":184,"style":184},"from huggingface_hub import HfApi\napi = HfApi()\napi.list_jobs()                                  # List all jobs\napi.get_job_logs(job_id=\"your-job-id\")           # View logs\napi.get_job(job_id=\"your-job-id\")                # Job details\n",[4475],{"type":42,"tag":130,"props":4476,"children":4477},{"__ignoreMap":184},[4478,4485,4492,4500,4508],{"type":42,"tag":190,"props":4479,"children":4480},{"class":192,"line":193},[4481],{"type":42,"tag":190,"props":4482,"children":4483},{},[4484],{"type":48,"value":943},{"type":42,"tag":190,"props":4486,"children":4487},{"class":192,"line":234},[4488],{"type":42,"tag":190,"props":4489,"children":4490},{},[4491],{"type":48,"value":951},{"type":42,"tag":190,"props":4493,"children":4494},{"class":192,"line":851},[4495],{"type":42,"tag":190,"props":4496,"children":4497},{},[4498],{"type":48,"value":4499},"api.list_jobs()                                  # List all jobs\n",{"type":42,"tag":190,"props":4501,"children":4502},{"class":192,"line":860},[4503],{"type":42,"tag":190,"props":4504,"children":4505},{},[4506],{"type":48,"value":4507},"api.get_job_logs(job_id=\"your-job-id\")           # View logs\n",{"type":42,"tag":190,"props":4509,"children":4510},{"class":192,"line":970},[4511],{"type":42,"tag":190,"props":4512,"children":4513},{},[4514],{"type":48,"value":4515},"api.get_job(job_id=\"your-job-id\")                # Job details\n",{"type":42,"tag":57,"props":4517,"children":4519},{"id":4518},"common-failure-modes",[4520],{"type":48,"value":4521},"Common failure modes",{"type":42,"tag":266,"props":4523,"children":4525},{"id":4524},"oom-cuda-out-of-memory",[4526],{"type":48,"value":4527},"OOM (CUDA out of memory)",{"type":42,"tag":51,"props":4529,"children":4530},{},[4531,4533,4539,4541,4547],{"type":48,"value":4532},"Reduce ",{"type":42,"tag":130,"props":4534,"children":4536},{"className":4535},[],[4537],{"type":48,"value":4538},"per_device_train_batch_size",{"type":48,"value":4540}," (try 4, then 2), reduce ",{"type":42,"tag":130,"props":4542,"children":4544},{"className":4543},[],[4545],{"type":48,"value":4546},"IMAGE_SIZE",{"type":48,"value":4548},", or upgrade hardware.",{"type":42,"tag":266,"props":4550,"children":4552},{"id":4551},"dataset-format-errors",[4553],{"type":48,"value":4554},"Dataset format errors",{"type":42,"tag":51,"props":4556,"children":4557},{},[4558,4560,4566,4568,4573,4575,4580,4582,4587],{"type":48,"value":4559},"Run ",{"type":42,"tag":130,"props":4561,"children":4563},{"className":4562},[],[4564],{"type":48,"value":4565},"scripts\u002Fdataset_inspector.py",{"type":48,"value":4567}," first. The training script auto-detects xyxy vs xywh, converts string categories to integer IDs, and adds ",{"type":42,"tag":130,"props":4569,"children":4571},{"className":4570},[],[4572],{"type":48,"value":440},{"type":48,"value":4574}," if missing. Ensure ",{"type":42,"tag":130,"props":4576,"children":4578},{"className":4577},[],[4579],{"type":48,"value":1079},{"type":48,"value":4581}," contains 4-value coordinate lists in absolute pixels and ",{"type":42,"tag":130,"props":4583,"children":4585},{"className":4584},[],[4586],{"type":48,"value":1087},{"type":48,"value":4588}," contains either integer IDs or string labels.",{"type":42,"tag":266,"props":4590,"children":4592},{"id":4591},"hub-push-failures-401",[4593],{"type":48,"value":4594},"Hub push failures (401)",{"type":42,"tag":51,"props":4596,"children":4597},{},[4598,4600,4605,4607,4612,4614,4619,4621,4627],{"type":48,"value":4599},"Verify: (1) job secrets include token (see directive #2), (2) script sets ",{"type":42,"tag":130,"props":4601,"children":4603},{"className":4602},[],[4604],{"type":48,"value":2033},{"type":48,"value":4606}," BEFORE creating the ",{"type":42,"tag":130,"props":4608,"children":4610},{"className":4609},[],[4611],{"type":48,"value":1994},{"type":48,"value":4613},", (3) ",{"type":42,"tag":130,"props":4615,"children":4617},{"className":4616},[],[4618],{"type":48,"value":755},{"type":48,"value":4620}," is set, (4) correct ",{"type":42,"tag":130,"props":4622,"children":4624},{"className":4623},[],[4625],{"type":48,"value":4626},"hub_model_id",{"type":48,"value":4628},", (5) token has write permissions.",{"type":42,"tag":266,"props":4630,"children":4632},{"id":4631},"job-timeout",[4633],{"type":48,"value":4634},"Job timeout",{"type":42,"tag":51,"props":4636,"children":4637},{},[4638,4640,4646],{"type":48,"value":4639},"Increase timeout (see directive #5 table), reduce epochs\u002Fdataset, or use checkpoint strategy with ",{"type":42,"tag":130,"props":4641,"children":4643},{"className":4642},[],[4644],{"type":48,"value":4645},"hub_strategy=\"every_save\"",{"type":48,"value":1498},{"type":42,"tag":266,"props":4648,"children":4650},{"id":4649},"keyerror-test-missing-test-split",[4651],{"type":48,"value":4652},"KeyError: 'test' (missing test split)",{"type":42,"tag":51,"props":4654,"children":4655},{},[4656,4658,4664,4666,4671],{"type":48,"value":4657},"The object detection training script handles this gracefully — it falls back to the ",{"type":42,"tag":130,"props":4659,"children":4661},{"className":4660},[],[4662],{"type":48,"value":4663},"validation",{"type":48,"value":4665}," split. Ensure you're using the latest ",{"type":42,"tag":130,"props":4667,"children":4669},{"className":4668},[],[4670],{"type":48,"value":1057},{"type":48,"value":1498},{"type":42,"tag":266,"props":4673,"children":4675},{"id":4674},"single-class-dataset-iteration-over-a-0-d-tensor",[4676],{"type":48,"value":4677},"Single-class dataset: \"iteration over a 0-d tensor\"",{"type":42,"tag":51,"props":4679,"children":4680},{},[4681,4687,4689,4694,4696,4702],{"type":42,"tag":130,"props":4682,"children":4684},{"className":4683},[],[4685],{"type":48,"value":4686},"torchmetrics.MeanAveragePrecision",{"type":48,"value":4688}," returns scalar (0-d) tensors for per-class metrics when there's only one class. The template ",{"type":42,"tag":130,"props":4690,"children":4692},{"className":4691},[],[4693],{"type":48,"value":1057},{"type":48,"value":4695}," handles this by calling ",{"type":42,"tag":130,"props":4697,"children":4699},{"className":4698},[],[4700],{"type":48,"value":4701},".unsqueeze(0)",{"type":48,"value":4703}," on these tensors. Ensure you're using the latest template.",{"type":42,"tag":266,"props":4705,"children":4707},{"id":4706},"poor-detection-performance-map-015",[4708],{"type":48,"value":4709},"Poor detection performance (mAP \u003C 0.15)",{"type":42,"tag":51,"props":4711,"children":4712},{},[4713],{"type":48,"value":4714},"Increase epochs (30-50), ensure 500+ images, check per-class mAP for imbalanced classes, try different learning rates (1e-5 to 1e-4), increase image size.",{"type":42,"tag":51,"props":4716,"children":4717},{},[4718,4720],{"type":48,"value":4719},"For comprehensive troubleshooting: see ",{"type":42,"tag":281,"props":4721,"children":4723},{"href":4722},"references\u002Freliability_principles.md",[4724],{"type":48,"value":4722},{"type":42,"tag":57,"props":4726,"children":4728},{"id":4727},"reference-files",[4729],{"type":48,"value":4730},"Reference files",{"type":42,"tag":69,"props":4732,"children":4733},{},[4734,4743,4752,4761,4770,4779,4789,4799,4808,4817,4827],{"type":42,"tag":73,"props":4735,"children":4736},{},[4737,4741],{"type":42,"tag":281,"props":4738,"children":4739},{"href":1057},[4740],{"type":48,"value":1057},{"type":48,"value":4742}," — Production-ready object detection training script",{"type":42,"tag":73,"props":4744,"children":4745},{},[4746,4750],{"type":42,"tag":281,"props":4747,"children":4748},{"href":1457},[4749],{"type":48,"value":1457},{"type":48,"value":4751}," — Production-ready image classification training script (supports timm models)",{"type":42,"tag":73,"props":4753,"children":4754},{},[4755,4759],{"type":42,"tag":281,"props":4756,"children":4757},{"href":1464},[4758],{"type":48,"value":1464},{"type":48,"value":4760}," — Production-ready SAM\u002FSAM2 segmentation training script (bbox & point prompts)",{"type":42,"tag":73,"props":4762,"children":4763},{},[4764,4768],{"type":42,"tag":281,"props":4765,"children":4766},{"href":4565},[4767],{"type":48,"value":4565},{"type":48,"value":4769}," — Validate dataset format for OD, classification, and SAM segmentation",{"type":42,"tag":73,"props":4771,"children":4772},{},[4773,4777],{"type":42,"tag":281,"props":4774,"children":4775},{"href":3212},[4776],{"type":48,"value":3212},{"type":48,"value":4778}," — Estimate training costs for any vision model (includes SAM\u002FSAM2)",{"type":42,"tag":73,"props":4780,"children":4781},{},[4782,4787],{"type":42,"tag":281,"props":4783,"children":4785},{"href":4784},"references\u002Fobject_detection_training_notebook.md",[4786],{"type":48,"value":4784},{"type":48,"value":4788}," — Object detection training workflow, augmentation strategies, and training patterns",{"type":42,"tag":73,"props":4790,"children":4791},{},[4792,4797],{"type":42,"tag":281,"props":4793,"children":4795},{"href":4794},"references\u002Fimage_classification_training_notebook.md",[4796],{"type":48,"value":4794},{"type":48,"value":4798}," — Image classification training workflow with ViT, preprocessing, and evaluation",{"type":42,"tag":73,"props":4800,"children":4801},{},[4802,4806],{"type":42,"tag":281,"props":4803,"children":4804},{"href":1494},[4805],{"type":48,"value":1494},{"type":48,"value":4807}," — SAM2 fine-tuning walkthrough with MicroMat dataset, DiceCE loss, and Trainer integration",{"type":42,"tag":73,"props":4809,"children":4810},{},[4811,4815],{"type":42,"tag":281,"props":4812,"children":4813},{"href":1487},[4814],{"type":48,"value":1487},{"type":48,"value":4816}," — Using timm models with HF Trainer (TimmWrapper, transforms, full example)",{"type":42,"tag":73,"props":4818,"children":4819},{},[4820,4825],{"type":42,"tag":281,"props":4821,"children":4823},{"href":4822},"references\u002Fhub_saving.md",[4824],{"type":48,"value":4822},{"type":48,"value":4826}," — Detailed Hub persistence guide and verification checklist",{"type":42,"tag":73,"props":4828,"children":4829},{},[4830,4834],{"type":42,"tag":281,"props":4831,"children":4832},{"href":4722},[4833],{"type":48,"value":4722},{"type":48,"value":4835}," — Failure prevention principles from production experience",{"type":42,"tag":57,"props":4837,"children":4839},{"id":4838},"external-links",[4840],{"type":48,"value":4841},"External links",{"type":42,"tag":69,"props":4843,"children":4844},{},[4845,4855,4865,4875,4885,4897,4909,4921,4931,4941,4951,4961,4971],{"type":42,"tag":73,"props":4846,"children":4847},{},[4848],{"type":42,"tag":281,"props":4849,"children":4852},{"href":4850,"rel":4851},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Ftasks\u002Fobject_detection",[285],[4853],{"type":48,"value":4854},"Transformers Object Detection Guide",{"type":42,"tag":73,"props":4856,"children":4857},{},[4858],{"type":42,"tag":281,"props":4859,"children":4862},{"href":4860,"rel":4861},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Ftasks\u002Fimage_classification",[285],[4863],{"type":48,"value":4864},"Transformers Image Classification Guide",{"type":42,"tag":73,"props":4866,"children":4867},{},[4868],{"type":42,"tag":281,"props":4869,"children":4872},{"href":4870,"rel":4871},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fdetr",[285],[4873],{"type":48,"value":4874},"DETR Model Documentation",{"type":42,"tag":73,"props":4876,"children":4877},{},[4878],{"type":42,"tag":281,"props":4879,"children":4882},{"href":4880,"rel":4881},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fvit",[285],[4883],{"type":48,"value":4884},"ViT Model Documentation",{"type":42,"tag":73,"props":4886,"children":4887},{},[4888,4895],{"type":42,"tag":281,"props":4889,"children":4892},{"href":4890,"rel":4891},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fguides\u002Fjobs",[285],[4893],{"type":48,"value":4894},"HF Jobs Guide",{"type":48,"value":4896}," — Main Jobs documentation",{"type":42,"tag":73,"props":4898,"children":4899},{},[4900,4907],{"type":42,"tag":281,"props":4901,"children":4904},{"href":4902,"rel":4903},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fen\u002Fjobs-configuration",[285],[4905],{"type":48,"value":4906},"HF Jobs Configuration",{"type":48,"value":4908}," — Hardware, secrets, timeouts, namespaces",{"type":42,"tag":73,"props":4910,"children":4911},{},[4912,4919],{"type":42,"tag":281,"props":4913,"children":4916},{"href":4914,"rel":4915},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Fguides\u002Fcli#hf-jobs",[285],[4917],{"type":48,"value":4918},"HF Jobs CLI Reference",{"type":48,"value":4920}," — Command line interface",{"type":42,"tag":73,"props":4922,"children":4923},{},[4924],{"type":42,"tag":281,"props":4925,"children":4928},{"href":4926,"rel":4927},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=object-detection",[285],[4929],{"type":48,"value":4930},"Object Detection Models",{"type":42,"tag":73,"props":4932,"children":4933},{},[4934],{"type":42,"tag":281,"props":4935,"children":4938},{"href":4936,"rel":4937},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-classification",[285],[4939],{"type":48,"value":4940},"Image Classification Models",{"type":42,"tag":73,"props":4942,"children":4943},{},[4944],{"type":42,"tag":281,"props":4945,"children":4948},{"href":4946,"rel":4947},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fsam2",[285],[4949],{"type":48,"value":4950},"SAM2 Model Documentation",{"type":42,"tag":73,"props":4952,"children":4953},{},[4954],{"type":42,"tag":281,"props":4955,"children":4958},{"href":4956,"rel":4957},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fsam",[285],[4959],{"type":48,"value":4960},"SAM Model Documentation",{"type":42,"tag":73,"props":4962,"children":4963},{},[4964],{"type":42,"tag":281,"props":4965,"children":4968},{"href":4966,"rel":4967},"https:\u002F\u002Fhuggingface.co\u002Fdatasets?task_categories=task_categories:object-detection",[285],[4969],{"type":48,"value":4970},"Object Detection Datasets",{"type":42,"tag":73,"props":4972,"children":4973},{},[4974],{"type":42,"tag":281,"props":4975,"children":4978},{"href":4976,"rel":4977},"https:\u002F\u002Fhuggingface.co\u002Fdatasets?task_categories=task_categories:image-classification",[285],[4979],{"type":48,"value":4980},"Image Classification Datasets",{"type":42,"tag":4982,"props":4983,"children":4984},"style",{},[4985],{"type":48,"value":4986},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4988,"total":5108},[4989,5008,5024,5036,5056,5078,5096],{"slug":4990,"name":4990,"fn":4991,"description":4992,"org":4993,"tags":4994,"stars":25,"repoUrl":26,"updatedAt":5007},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4995,4998,5001,5004],{"name":4996,"slug":4997,"type":15},"Accessibility","accessibility",{"name":4999,"slug":5000,"type":15},"Charts","charts",{"name":5002,"slug":5003,"type":15},"Data Visualization","data-visualization",{"name":5005,"slug":5006,"type":15},"Design","design","2026-06-30T19:00:57.102",{"slug":5009,"name":5009,"fn":5010,"description":5011,"org":5012,"tags":5013,"stars":25,"repoUrl":26,"updatedAt":5023},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5014,5017,5020],{"name":5015,"slug":5016,"type":15},"Agents","agents",{"name":5018,"slug":5019,"type":15},"Browser Automation","browser-automation",{"name":5021,"slug":5022,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":5025,"name":5025,"fn":5026,"description":5027,"org":5028,"tags":5029,"stars":25,"repoUrl":26,"updatedAt":5035},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5030,5031,5034],{"name":5018,"slug":5019,"type":15},{"name":5032,"slug":5033,"type":15},"Local Development","local-development",{"name":5021,"slug":5022,"type":15},"2026-04-06T18:41:17.526867",{"slug":5037,"name":5037,"fn":5038,"description":5039,"org":5040,"tags":5041,"stars":25,"repoUrl":26,"updatedAt":5055},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5042,5043,5046,5049,5052],{"name":5015,"slug":5016,"type":15},{"name":5044,"slug":5045,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":5047,"slug":5048,"type":15},"SDK","sdk",{"name":5050,"slug":5051,"type":15},"Serverless","serverless",{"name":5053,"slug":5054,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":5057,"name":5057,"fn":5058,"description":5059,"org":5060,"tags":5061,"stars":25,"repoUrl":26,"updatedAt":5077},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5062,5065,5068,5071,5074],{"name":5063,"slug":5064,"type":15},"Frontend","frontend",{"name":5066,"slug":5067,"type":15},"React","react",{"name":5069,"slug":5070,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":5072,"slug":5073,"type":15},"UI Components","ui-components",{"name":5075,"slug":5076,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":5079,"name":5079,"fn":5080,"description":5081,"org":5082,"tags":5083,"stars":25,"repoUrl":26,"updatedAt":5095},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5084,5085,5088,5091,5094],{"name":20,"slug":21,"type":15},{"name":5086,"slug":5087,"type":15},"Cost Optimization","cost-optimization",{"name":5089,"slug":5090,"type":15},"LLM","llm",{"name":5092,"slug":5093,"type":15},"Performance","performance",{"name":5075,"slug":5076,"type":15},"2026-04-06T18:40:44.377464",{"slug":5097,"name":5097,"fn":5098,"description":5099,"org":5100,"tags":5101,"stars":25,"repoUrl":26,"updatedAt":5107},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5102,5103,5106],{"name":5086,"slug":5087,"type":15},{"name":5104,"slug":5105,"type":15},"Database","database",{"name":5089,"slug":5090,"type":15},"2026-04-06T18:41:08.513425",600,{"items":5110,"total":5307},[5111,5132,5155,5172,5188,5205,5224,5236,5250,5264,5276,5291],{"slug":5112,"name":5112,"fn":5113,"description":5114,"org":5115,"tags":5116,"stars":5129,"repoUrl":5130,"updatedAt":5131},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5117,5120,5123,5126],{"name":5118,"slug":5119,"type":15},"Documents","documents",{"name":5121,"slug":5122,"type":15},"Healthcare","healthcare",{"name":5124,"slug":5125,"type":15},"Insurance","insurance",{"name":5127,"slug":5128,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":5133,"name":5133,"fn":5134,"description":5135,"org":5136,"tags":5137,"stars":5152,"repoUrl":5153,"updatedAt":5154},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5138,5141,5143,5146,5149],{"name":5139,"slug":5140,"type":15},".NET","dotnet",{"name":5142,"slug":5133,"type":15},"ASP.NET Core",{"name":5144,"slug":5145,"type":15},"Blazor","blazor",{"name":5147,"slug":5148,"type":15},"C#","csharp",{"name":5150,"slug":5151,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":5156,"name":5156,"fn":5157,"description":5158,"org":5159,"tags":5160,"stars":5152,"repoUrl":5153,"updatedAt":5171},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5161,5164,5167,5170],{"name":5162,"slug":5163,"type":15},"Apps SDK","apps-sdk",{"name":5165,"slug":5166,"type":15},"ChatGPT","chatgpt",{"name":5168,"slug":5169,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":5173,"name":5173,"fn":5174,"description":5175,"org":5176,"tags":5177,"stars":5152,"repoUrl":5153,"updatedAt":5187},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5178,5181,5184],{"name":5179,"slug":5180,"type":15},"API Development","api-development",{"name":5182,"slug":5183,"type":15},"CLI","cli",{"name":5185,"slug":5186,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":5189,"name":5189,"fn":5190,"description":5191,"org":5192,"tags":5193,"stars":5152,"repoUrl":5153,"updatedAt":5204},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5194,5197,5200,5201],{"name":5195,"slug":5196,"type":15},"Cloudflare","cloudflare",{"name":5198,"slug":5199,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":5044,"slug":5045,"type":15},{"name":5202,"slug":5203,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":5206,"name":5206,"fn":5207,"description":5208,"org":5209,"tags":5210,"stars":5152,"repoUrl":5153,"updatedAt":5223},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5211,5214,5217,5220],{"name":5212,"slug":5213,"type":15},"Productivity","productivity",{"name":5215,"slug":5216,"type":15},"Project Management","project-management",{"name":5218,"slug":5219,"type":15},"Strategy","strategy",{"name":5221,"slug":5222,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":5225,"name":5225,"fn":5226,"description":5227,"org":5228,"tags":5229,"stars":5152,"repoUrl":5153,"updatedAt":5235},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5230,5231,5233,5234],{"name":5005,"slug":5006,"type":15},{"name":5232,"slug":5225,"type":15},"Figma",{"name":5063,"slug":5064,"type":15},{"name":5168,"slug":5169,"type":15},"2026-04-12T05:06:47.939943",{"slug":5237,"name":5237,"fn":5238,"description":5239,"org":5240,"tags":5241,"stars":5152,"repoUrl":5153,"updatedAt":5249},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5242,5243,5246,5247,5248],{"name":5005,"slug":5006,"type":15},{"name":5244,"slug":5245,"type":15},"Design System","design-system",{"name":5232,"slug":5225,"type":15},{"name":5063,"slug":5064,"type":15},{"name":5072,"slug":5073,"type":15},"2026-05-10T05:59:52.971881",{"slug":5251,"name":5251,"fn":5252,"description":5253,"org":5254,"tags":5255,"stars":5152,"repoUrl":5153,"updatedAt":5263},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5256,5257,5258,5261,5262],{"name":5005,"slug":5006,"type":15},{"name":5244,"slug":5245,"type":15},{"name":5259,"slug":5260,"type":15},"Documentation","documentation",{"name":5232,"slug":5225,"type":15},{"name":5063,"slug":5064,"type":15},"2026-05-16T06:07:47.821474",{"slug":5265,"name":5265,"fn":5266,"description":5267,"org":5268,"tags":5269,"stars":5152,"repoUrl":5153,"updatedAt":5275},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5270,5271,5272,5273,5274],{"name":5005,"slug":5006,"type":15},{"name":5232,"slug":5225,"type":15},{"name":5063,"slug":5064,"type":15},{"name":5072,"slug":5073,"type":15},{"name":5150,"slug":5151,"type":15},"2026-05-16T06:07:40.583615",{"slug":5277,"name":5277,"fn":5278,"description":5279,"org":5280,"tags":5281,"stars":5152,"repoUrl":5153,"updatedAt":5290},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5282,5285,5286,5289],{"name":5283,"slug":5284,"type":15},"Animation","animation",{"name":5185,"slug":5186,"type":15},{"name":5287,"slug":5288,"type":15},"Creative","creative",{"name":5005,"slug":5006,"type":15},"2026-05-02T05:31:48.48485",{"slug":5292,"name":5292,"fn":5293,"description":5294,"org":5295,"tags":5296,"stars":5152,"repoUrl":5153,"updatedAt":5306},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5297,5298,5299,5302,5305],{"name":5287,"slug":5288,"type":15},{"name":5005,"slug":5006,"type":15},{"name":5300,"slug":5301,"type":15},"Image Generation","image-generation",{"name":5303,"slug":5304,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675]