import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _MLArrayBatchProvider } from "./MLArrayBatchProvider.js";
import type { _MLBatchProvider } from "./MLBatchProvider.js";
import type { _MLDictionaryFeatureProvider } from "./MLDictionaryFeatureProvider.js";
import type { _MLFeatureProvider } from "./MLFeatureProvider.js";
import type { _MLModelAsset } from "./MLModelAsset.js";
import type { _MLModelConfiguration } from "./MLModelConfiguration.js";
import type { _MLModelDescription } from "./MLModelDescription.js";
import type { _MLParameterKey } from "./MLParameterKey.js";
import type { _MLPredictionOptions } from "./MLPredictionOptions.js";
import type { _MLState } from "./MLState.js";
export declare class _MLModel extends _NSObject {
    static alloc(): _MLModel;
    static new(): _MLModel;
    init(): _MLModel;
    /** Construct a model with a default MLModelConfiguration object */
    static modelWithContentsOfURL$error$(url: _NSURL, error: NobjcObject | null): _MLModel | null;
    /**
     * Construct a model given the location of its on-disk representation. Returns nil on error.
     */
    static modelWithContentsOfURL$configuration$error$(url: _NSURL, configuration: _MLModelConfiguration, error: NobjcObject | null): _MLModel | null;
    /**
     * Construct a model asynchronously given the location of its on-disk representation and configuration. Model loading may take time when the model content is not immediately available (e.g. encrypted model). Use this factory method especially when the caller is on the main thread. @param url the location of its on-disk representation (.mlmodelc directory). @param configuration The model configuration @param handler When the model load completes successfully or unsuccessfully, the completion handler is invoked with a valid MLModel instance or NSError object.
     */
    static loadContentsOfURL$configuration$completionHandler$(url: _NSURL, configuration: _MLModelConfiguration, handler: ((model: _MLModel, error: _NSError) => void) | null): void;
    /**
     * Construct a model asynchronously from a compiled model asset. @param asset Compiled model asset derived from in-memory or on-disk Core ML model @param configuration Model configuration that hold options for loading a model @param handler When the model load completes successfully or unsuccessfully, the completion handler is invoked with a valid MLModel instance or NSError object.
     */
    static loadModelAsset$configuration$completionHandler$(asset: _MLModelAsset, configuration: _MLModelConfiguration, handler: ((model: _MLModel, error: _NSError) => void) | null): void;
    /**
     * Compile a .mlmodel for this device @param modelURL URL file path to .mlmodel file you wish to compile @param error Any errors are surfaced here @returns a URL to the compiled .mlmodelc directory if successful The model is compiled to a temporary location on disk You must move the compiled model to a permanent location if you wish to keep it @discussion The returned model can be loaded using: @code [MLModel modelWithContentsOfURL:error:] @endcode
     * @deprecated Use the asynchronous interface compileModelAtURL:completionHandler:error: instead.
     */
    static compileModelAtURL$error$(modelURL: _NSURL, error: NobjcObject | null): _NSURL | null;
    /**
     * Compile a .mlmodel or .mlpackage for this device. Perform the compilation asynchronously. @param modelURL URL file path to .mlmodel file you wish to compile @param handler When the model compilation completes successfully the completion handler is invoked with a valid URL to the compiled .mlmodelc directory. On failure, signified by nil compiledModelURL, the NSError object is populated. @discussion The model is compiled to a temporary location in the file system. You must move the compiled model to a permanent location if you wish to keep it. Then the model can be loaded using the returned URL: @code [MLModel modelWithContentsOfURL:error:] @endcode
     */
    static compileModelAtURL$completionHandler$(modelURL: _NSURL, handler: ((compiledModelURL: _NSURL, error: _NSError) => void) | null): void;
    /**
     * The list of available compute devices for CoreML. Use the method to get the list of compute devices that MLModel's prediction can use. Some compute devices on the hardware are exclusive to the domain ML frameworks such as Vision and SoundAnalysis and not available to CoreML. See also `MLComputeDevice.allComputeDevices`.
     */
    static availableComputeDevices(): _NSArray;
    /**
     * Run a prediction on a model synchronously. This is a convenience overload method of `prediction(from:options:)` that uses the default prediction options. - Parameters - input: The input features to make a prediction from. - error: The output parameter to be filled with error information on failure. - Returns: The output features from the prediction.
     */
    predictionFromFeatures$error$(input: _MLFeatureProvider, error: NobjcObject | null): _MLDictionaryFeatureProvider | null;
    /**
     * Run a prediction on a model synchronously - Parameters - input: The input features to make a prediction from. - options: Prediction options to modify how the prediction is run. - error: The output parameter to be filled with error information on failure. - Returns: The output features from the prediction.
     */
    predictionFromFeatures$options$error$(input: _MLFeatureProvider, options: _MLPredictionOptions, error: NobjcObject | null): _MLDictionaryFeatureProvider | null;
    /**
     * Run a prediction on a model asynchronously. This is a convenience overload method of `prediction(from:options:) async` that uses the default prediction options. - Parameters - input: The input features to make a prediction from. - completionHandler: A block that will be invoked once the prediction has completed successfully or unsuccessfully. On success, it is invoked with a valid model output. On failure, it is invoked with a nil output and NSError
     */
    predictionFromFeatures$completionHandler$(input: _MLFeatureProvider, completionHandler: ((output: _MLFeatureProvider, error: _NSError) => void) | null): void;
    /**
     * Run a prediction on a model asynchronously. - Parameters - input: The input features to make a prediction from. - options: Prediction options to modify how the prediction is run. - completionHandler: A block that will be invoked once the prediction has completed successfully or unsuccessfully. On success, it is invoked with a valid model output. On failure, it is invoked with a nil output and NSError
     */
    predictionFromFeatures$options$completionHandler$(input: _MLFeatureProvider, options: _MLPredictionOptions, completionHandler: ((output: _MLFeatureProvider, error: _NSError) => void) | null): void;
    /** Batch prediction without explicit options */
    predictionsFromBatch$error$(inputBatch: _MLBatchProvider, error: NobjcObject | null): _MLArrayBatchProvider | null;
    /** Batch prediction with explicit options */
    predictionsFromBatch$options$error$(inputBatch: _MLBatchProvider, options: _MLPredictionOptions, error: NobjcObject | null): _MLArrayBatchProvider | null;
    /** Provides value for the given parameter. Returns nil on error. */
    parameterValueForKey$error$(key: _MLParameterKey, error: NobjcObject | null): NobjcObject | null;
    /**
     * Creates a new state object. Core ML framework will allocate the state buffers declared in the model. The allocated state buffers are initialized to zeros. To initialize with different values, use `.withMultiArray(for:)` to get the mutable `MLMultiArray`-view to the state buffer. It returns an empty state when the model is stateless. One can use the empty state with stateful prediction functions such as `prediction(from:using:)` and those predictions will be stateless. This simplifies the call site which may or may not use a stateful model. ```swift // Create state that contains two state buffers: s1 and s2. // Then, initialize s1 to 1.0 and s2 to 2.0. let state = model.newState() state.withMultiArray(for: "s1") { stateMultiArray in stateMultiArray[0] = 1.0 } state.withMultiArray(for: "s2") { stateMultiArray in stateMultiArray[0] = 2.0 } ```
     */
    newState(): _MLState;
    /**
     * Run a stateful prediction synchronously. Use this method to run predictions on a stateful model. ```swift let state = model.newState() let prediction = try model.prediction(from: inputFeatures, using: state) ``` - Parameters: - inputFeatures: The input features as declared in the model description. - state: The state object created by `newState()` method. - error: The output parameter to receive an error information on failure.
     */
    predictionFromFeatures$usingState$error$(inputFeatures: _MLFeatureProvider, state: _MLState, error: NobjcObject | null): _MLDictionaryFeatureProvider | null;
    /**
     * Run a stateful prediction synchronously with options. Use this method to run predictions on a stateful model. ```swift let state = model.newState() let prediction = try model.prediction(from: inputFeatures, using: state, options: predictionOptions) ``` - Parameters: - inputFeatures: The input features as declared in the model description. - state: The state object created by `newState()` method. - options: The prediction options. - error: The output parameter to receive an error information on failure.
     */
    predictionFromFeatures$usingState$options$error$(inputFeatures: _MLFeatureProvider, state: _MLState, options: _MLPredictionOptions, error: NobjcObject | null): _MLDictionaryFeatureProvider | null;
    /**
     * Run a stateful prediction asynchronously. Use this method to run predictions on a stateful model. Do not request a prediction while another prediction that shares the same state is in-flight, otherwise the behavior is undefined. ```swift let state = model.newState() let prediction = try await model.prediction(from: inputFeatures, using: state) ``` - Parameters - input: The input features to make a prediction from. - state: The state object created by `newState()` method. - options: Prediction options to modify how the prediction is run. - completionHandler: A block that will be invoked once the prediction has completed successfully or unsuccessfully. On success, it is invoked with a valid model output. On failure, it is invoked with a nil output and NSError
     */
    predictionFromFeatures$usingState$options$completionHandler$(inputFeatures: _MLFeatureProvider, state: _MLState, options: _MLPredictionOptions, completionHandler: ((output: _MLFeatureProvider, error: _NSError) => void) | null): void;
    /** A model holds a description of its required inputs and expected outputs. */
    modelDescription(): _MLModelDescription;
    /** The load-time parameters used to instantiate this MLModel object. */
    configuration(): _MLModelConfiguration;
}
