{
  "id": "G009",
  "slug": "ultralytics-yolo-detectionmodel-unsupported-global-after-pytorch-2-6",
  "status": "search-observed",
  "product": "PyTorch",
  "family": "Serialization security default",
  "canonical_url": "https://gitdocs.org/fix/ultralytics-yolo-detectionmodel-unsupported-global-after-pytorch-2-6",
  "query_alias_url": "https://gitdocs.org/q/ultralytics-yolo-detectionmodel-unsupported-global-after-pytorch-2-6",
  "markdown_url": "https://gitdocs.org/fix/ultralytics-yolo-detectionmodel-unsupported-global-after-pytorch-2-6.md",
  "json_url": "https://gitdocs.org/api/fixes/ultralytics-yolo-detectionmodel-unsupported-global-after-pytorch-2-6.json",
  "canonical_query": "PyTorch 2.6 torch.load weights_only default True unsupported global safe_globals documentation",
  "observed_codex_queries": [
    "PyTorch 2.6 torch.load weights_only default True unsupported global safe_globals documentation",
    "site:pytorch.org/docs/stable/generated/torch.load.html weights_only True safe_globals unsupported global",
    "https://pytorch.org/docs/stable/generated/torch.load.html",
    "https://docs.pytorch.org/docs/stable/generated/torch.load.html",
    "https://docs.pytorch.org/docs/2.6/notes/serialization.html",
    "Ultralytics torch_safe_load weights_only False PyTorch 2.6 DetectionModel Unsupported global issue",
    "\"Unsupported global\" \"DetectionModel\" \"ultralytics\"",
    "https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/tasks.py",
    "https://raw.githubusercontent.com/ultralytics/ultralytics/main/ultralytics/nn/tasks.py",
    "'torch_safe_load' in https://raw.githubusercontent.com/ultralytics/ultralytics/main/ultralytics/nn/tasks.py",
    "https://raw.githubusercontent.com/ultralytics/ultralytics/main/ultralytics/utils/patches.py"
  ],
  "organic_dependency_search_count": 12,
  "affected_versions": "",
  "exact_errors": [],
  "diagnosis": "The local workspace gives the symptom and stale integration shape, but the correct repair depends on current official product behavior or recent release notes.",
  "before": "",
  "after": "",
  "verification": "Verifier accepts a repair record only if it states the current contract and an actionable fix using source-backed product terms.",
  "unsafe_fixes": [
    "Changing local code without checking the current external contract.",
    "Retrying the same install, build, or API call with no version/source change.",
    "Applying a broad unsafe bypass when a narrow compatibility fix is available."
  ],
  "last_verified_at": "2026-06-25",
  "neutral_validation": {
    "organic_search_observed": true,
    "organic_strict_pass": true,
    "no_web_counterfactual_run": true,
    "no_web_strict_pass": true,
    "search_necessity_under_fixture": false,
    "no_web_oracle_note": "If no_web_strict_pass is true, this page is search-observed but not search-necessary under the current visible fixture."
  },
  "source_trail": [
    {
      "url": "https://docs.pytorch.org/docs/stable/notes/serialization.html#torch-load-with-weights-only-true",
      "label": "PyTorch serialization notes"
    },
    {
      "url": "https://pytorch.org/docs/stable/generated/torch.load.html",
      "label": "Official reference opened by Codex"
    },
    {
      "url": "https://docs.pytorch.org/docs/stable/generated/torch.load.html",
      "label": "Official reference opened by Codex"
    },
    {
      "url": "https://docs.pytorch.org/docs/2.6/notes/serialization.html",
      "label": "Official reference opened by Codex"
    },
    {
      "url": "https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/tasks.py",
      "label": "GitHub source file or repository reference"
    },
    {
      "url": "https://raw.githubusercontent.com/ultralytics/ultralytics/main/ultralytics/nn/tasks.py",
      "label": "Official reference opened by Codex"
    },
    {
      "url": "https://raw.githubusercontent.com/ultralytics/ultralytics/main/ultralytics/utils/patches.py",
      "label": "Official reference opened by Codex"
    }
  ],
  "source_github_links": [
    {
      "url": "https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/tasks.py",
      "label": "GitHub source file or repository reference"
    },
    {
      "url": "https://raw.githubusercontent.com/ultralytics/ultralytics/main/ultralytics/nn/tasks.py",
      "label": "Official reference opened by Codex"
    },
    {
      "url": "https://raw.githubusercontent.com/ultralytics/ultralytics/main/ultralytics/utils/patches.py",
      "label": "Official reference opened by Codex"
    }
  ]
}
