<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLUpdateTask/init(forModelAt:trainingData:configuration:progressHandlers:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "c:objc(cs)MLUpdateTask(cm)updateTaskForModelAtURL:trainingData:configuration:progressHandlers:error:"
  },
  "title" : "init(forModelAt:trainingData:configuration:progressHandlers:)"
}
-->

# init(forModelAt:trainingData:configuration:progressHandlers:)

Creates a task that updates the model at the URL with the training data and configuration, and calls the progress handlers during and after the update.

```
convenience init(forModelAt modelURL: URL, trainingData: any MLBatchProvider, configuration: MLModelConfiguration?, progressHandlers: MLUpdateProgressHandlers) throws
```

## Parameters

`modelURL`

The location in the file system of a model file (*ModelName*`.mlmodelc`).

`trainingData`

The update data for the model, contained in a batch provider.

`configuration`

The model settings for an updated model object.

`progressHandlers`

The closures the task calls during the update process.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)