---
title: MLKey
framework: coreml
role: symbol
role_heading: Class
path: coreml/mlkey
---

# MLKey

An abstract base class for machine learning key types.

## Declaration

```swift
class MLKey
```

## Overview

Overview You don’t create use this class directly. Instead, use a class that inherits from this one, such as MLParameterKey or MLMetricKey.

## Topics

### Retrieving a key’s information

- [name](coreml/mlkey/name.md)
- [scope](coreml/mlkey/scope.md)

### Initializers

- [init(coder:)](coreml/mlkey/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [MLMetricKey](coreml/mlmetrickey.md)
- [MLParameterKey](coreml/mlparameterkey.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Supporting types

- [MLModelConfiguration](coreml/mlmodelconfiguration.md)
- [MLOptimizationHints](coreml/mloptimizationhints-swift.struct.md)
