pyobjc-framework-CoreML 10.2__tar.gz → 11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyobjc_framework_coreml-11.0/Lib/CoreML/__init__.py +120 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Lib/CoreML/_metadata.py +133 -2
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Lib/pyobjc_framework_CoreML.egg-info/PKG-INFO +5 -5
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Lib/pyobjc_framework_CoreML.egg-info/SOURCES.txt +7 -6
- pyobjc_framework_coreml-11.0/Lib/pyobjc_framework_CoreML.egg-info/pyobjc-build-info.txt +3 -0
- pyobjc_framework_coreml-11.0/Lib/pyobjc_framework_CoreML.egg-info/requires.txt +2 -0
- pyobjc_framework_coreml-11.0/Modules/_CoreML.m +67 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Modules/pyobjc-api.h +1 -1
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Modules/pyobjc-compat.h +80 -5
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PKG-INFO +5 -5
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlfeaturetype.py +2 -0
- pyobjc_framework_coreml-11.0/PyObjCTest/test_mlmodel_mlstate.py +21 -0
- pyobjc_framework_coreml-11.0/PyObjCTest/test_mlmodelasset.py +31 -0
- pyobjc_framework_coreml-11.0/PyObjCTest/test_mlstate.py +10 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/CoreML.fwinfo +11 -0
- pyobjc-framework-CoreML-10.2/metadata/raw/arm64-14.4.fwinfo → pyobjc_framework_coreml-11.0/metadata/raw/arm64-14.5.fwinfo +2 -2
- pyobjc-framework-CoreML-10.2/metadata/raw/arm64-13.0.fwinfo → pyobjc_framework_coreml-11.0/metadata/raw/arm64-15.0.fwinfo +2772 -653
- pyobjc-framework-CoreML-10.2/metadata/raw/x86_64-14.4.fwinfo → pyobjc_framework_coreml-11.0/metadata/raw/x86_64-14.5.fwinfo +2 -2
- pyobjc-framework-CoreML-10.2/metadata/raw/x86_64-13.0.fwinfo → pyobjc_framework_coreml-11.0/metadata/raw/x86_64-15.0.fwinfo +2772 -653
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/pyobjc_setup.py +121 -27
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/setup.py +1 -3
- pyobjc-framework-CoreML-10.2/Lib/CoreML/__init__.py +0 -58
- pyobjc-framework-CoreML-10.2/Lib/pyobjc_framework_CoreML.egg-info/requires.txt +0 -2
- pyobjc-framework-CoreML-10.2/Modules/_CoreML.m +0 -36
- pyobjc-framework-CoreML-10.2/PyObjCTest/test_mlmodelasset.py +0 -11
- pyobjc-framework-CoreML-10.2/metadata/raw/arm64-12.1.fwinfo +0 -4249
- pyobjc-framework-CoreML-10.2/metadata/raw/x86_64-12.1.fwinfo +0 -4249
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Lib/pyobjc_framework_CoreML.egg-info/dependency_links.txt +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Lib/pyobjc_framework_CoreML.egg-info/not-zip-safe +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Lib/pyobjc_framework_CoreML.egg-info/top_level.txt +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/License.txt +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/MANIFEST.in +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/Modules/_CoreML_protocols.m +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/__init__.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_coreml.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlallcomputedevices.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlbatchprovider.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlcomputedeviceprotocol.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlcomputeplan.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlcomputeplancost.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlcomputeplandeviceusage.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlcustomlayer.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlcustommodel.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mldictionaryfeatureprovider.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlfeaturedescription.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlfeatureprovider.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlfeaturevalue.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlfeaturevalue_mlimageconversion.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlimagesizeconstrainttype.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodel.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodel_mlmodelcompilation.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelcollection.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelconfiguration.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelerror.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelmetadatakeys.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructure.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureneuralnetwork.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureneuralnetworklayer.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructurepipeline.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogram.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogramargument.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogrambinding.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogramblock.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogramfunction.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogramnamedvaluetype.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogramoperation.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogramvalue.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmodelstructureprogramvaluetype.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmultiarray.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlmultiarrayshapeconstrainttype.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlpredictionoptions.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlreshapefrequencyhint.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mltask.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlupdateprogressevent.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlupdateprogresshandlers.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlupdatetask.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlwritable.py +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/metadata.ini +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/raw/arm64-12.3.fwinfo +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/raw/arm64-13.3.fwinfo +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/raw/x86_64-10.14.fwinfo +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/raw/x86_64-10.15.fwinfo +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/raw/x86_64-10.16.fwinfo +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/raw/x86_64-12.3.fwinfo +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/metadata/raw/x86_64-13.3.fwinfo +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/pyproject.toml +0 -0
- {pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/setup.cfg +0 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Python mapping for the CoreML framework.
|
|
3
|
+
|
|
4
|
+
This module does not contain docstrings for the wrapped code, check Apple's
|
|
5
|
+
documentation for details on how to use these functions and classes.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _setup():
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
import Foundation
|
|
13
|
+
import objc
|
|
14
|
+
from . import _metadata, _CoreML
|
|
15
|
+
|
|
16
|
+
dir_func, getattr_func = objc.createFrameworkDirAndGetattr(
|
|
17
|
+
name="CoreML",
|
|
18
|
+
frameworkIdentifier="com.apple.CoreML",
|
|
19
|
+
frameworkPath=objc.pathForFramework(
|
|
20
|
+
"/System/Library/Frameworks/CoreML.framework"
|
|
21
|
+
),
|
|
22
|
+
globals_dict=globals(),
|
|
23
|
+
inline_list=None,
|
|
24
|
+
parents=(
|
|
25
|
+
_CoreML,
|
|
26
|
+
Foundation,
|
|
27
|
+
),
|
|
28
|
+
metadict=_metadata.__dict__,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
globals()["__dir__"] = dir_func
|
|
32
|
+
globals()["__getattr__"] = getattr_func
|
|
33
|
+
|
|
34
|
+
for clsname in (
|
|
35
|
+
"MLComputePlan",
|
|
36
|
+
"MLComputePlanCost",
|
|
37
|
+
"MLComputePlanDeviceUsage",
|
|
38
|
+
"MLModelStructureNeuralNetwork",
|
|
39
|
+
"MLModelStructurePipeline",
|
|
40
|
+
"MLModelStructureProgram",
|
|
41
|
+
"MLModelStructureProgramArgument",
|
|
42
|
+
"MLModelStructureProgramBinding",
|
|
43
|
+
"MLModelStructureProgramBlock",
|
|
44
|
+
"MLModelStructureProgramFunction",
|
|
45
|
+
"MLModelStructureProgramNamedValueType",
|
|
46
|
+
"MLModelStructureProgramOperation",
|
|
47
|
+
"MLModelStructureProgramValue",
|
|
48
|
+
"MLModelStructureProgramValueType",
|
|
49
|
+
"MLState",
|
|
50
|
+
):
|
|
51
|
+
try:
|
|
52
|
+
objc.lookUpClass(clsname).__objc_final__ = True
|
|
53
|
+
except objc.error:
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
for cls, sel in (
|
|
57
|
+
("MLMetricKey", b"init"),
|
|
58
|
+
("MLMetricKey", b"new"),
|
|
59
|
+
("MLModelStructureProgramValue", b"init"),
|
|
60
|
+
("MLModelStructureProgramValue", b"new"),
|
|
61
|
+
("MLGPUComputeDevice", b"init"),
|
|
62
|
+
("MLGPUComputeDevice", b"new"),
|
|
63
|
+
("MLComputePlanDeviceUsage", b"init"),
|
|
64
|
+
("MLComputePlanDeviceUsage", b"new"),
|
|
65
|
+
("MLCPUComputeDevice", b"init"),
|
|
66
|
+
("MLCPUComputeDevice", b"new"),
|
|
67
|
+
("MLModelStructure", b"init"),
|
|
68
|
+
("MLModelStructure", b"new"),
|
|
69
|
+
("MLUpdateProgressHandlers", b"init"),
|
|
70
|
+
("MLUpdateProgressHandlers", b"new"),
|
|
71
|
+
("MLModelCollection", b"init"),
|
|
72
|
+
("MLModelCollection", b"new"),
|
|
73
|
+
("MLModelStructureProgramNamedValueType", b"init"),
|
|
74
|
+
("MLModelStructureProgramNamedValueType", b"new"),
|
|
75
|
+
("MLUpdateTask", b"init"),
|
|
76
|
+
("MLUpdateTask", b"new"),
|
|
77
|
+
("MLModelCollectionEntry", b"init"),
|
|
78
|
+
("MLModelCollectionEntry", b"new"),
|
|
79
|
+
("MLModelStructureProgramFunction", b"init"),
|
|
80
|
+
("MLModelStructureProgramFunction", b"new"),
|
|
81
|
+
("MLModelStructureProgram", b"init"),
|
|
82
|
+
("MLModelStructureProgram", b"new"),
|
|
83
|
+
("MLComputePlan", b"init"),
|
|
84
|
+
("MLComputePlan", b"new"),
|
|
85
|
+
("MLParameterKey", b"init"),
|
|
86
|
+
("MLParameterKey", b"new"),
|
|
87
|
+
("MLModelStructureProgramBinding", b"init"),
|
|
88
|
+
("MLModelStructureProgramBinding", b"new"),
|
|
89
|
+
("MLModelAsset", b"init"),
|
|
90
|
+
("MLModelAsset", b"new"),
|
|
91
|
+
("MLModelStructureProgramArgument", b"init"),
|
|
92
|
+
("MLModelStructureProgramArgument", b"new"),
|
|
93
|
+
("MLModelStructureProgramOperation", b"init"),
|
|
94
|
+
("MLModelStructureProgramOperation", b"new"),
|
|
95
|
+
("MLComputePlanCost", b"init"),
|
|
96
|
+
("MLComputePlanCost", b"new"),
|
|
97
|
+
("MLModelStructureNeuralNetwork", b"init"),
|
|
98
|
+
("MLModelStructureNeuralNetwork", b"new"),
|
|
99
|
+
("MLNeuralEngineComputeDevice", b"init"),
|
|
100
|
+
("MLNeuralEngineComputeDevice", b"new"),
|
|
101
|
+
("MLTask", b"init"),
|
|
102
|
+
("MLTask", b"new"),
|
|
103
|
+
("MLModelStructureNeuralNetworkLayer", b"init"),
|
|
104
|
+
("MLModelStructureNeuralNetworkLayer", b"new"),
|
|
105
|
+
("MLKey", b"init"),
|
|
106
|
+
("MLKey", b"new"),
|
|
107
|
+
("MLModelStructureProgramBlock", b"init"),
|
|
108
|
+
("MLModelStructureProgramBlock", b"new"),
|
|
109
|
+
("MLImageConstraint", b"init"),
|
|
110
|
+
("MLModelStructurePipeline", b"init"),
|
|
111
|
+
("MLModelStructurePipeline", b"new"),
|
|
112
|
+
("MLModelStructureProgramValueType", b"init"),
|
|
113
|
+
("MLModelStructureProgramValueType", b"new"),
|
|
114
|
+
):
|
|
115
|
+
objc.registerUnavailableMethod(cls, sel)
|
|
116
|
+
|
|
117
|
+
del sys.modules["CoreML._metadata"]
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
globals().pop("_setup")()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file is generated by objective.metadata
|
|
2
2
|
#
|
|
3
|
-
# Last update: Fri
|
|
3
|
+
# Last update: Fri Jun 28 13:35:34 2024
|
|
4
4
|
#
|
|
5
5
|
# flake8: noqa
|
|
6
6
|
|
|
@@ -31,13 +31,14 @@ else:
|
|
|
31
31
|
|
|
32
32
|
misc = {}
|
|
33
33
|
constants = """$MLFeatureValueImageOptionCropAndScale$MLFeatureValueImageOptionCropRect$MLModelAuthorKey$MLModelCollectionDidChangeNotification$MLModelCreatorDefinedKey$MLModelDescriptionKey$MLModelErrorDomain$MLModelLicenseKey$MLModelVersionStringKey$"""
|
|
34
|
-
enums = """$MLComputeUnitsAll@2$MLComputeUnitsCPUAndGPU@1$MLComputeUnitsCPUAndNeuralEngine@3$MLComputeUnitsCPUOnly@0$MLFeatureTypeDictionary@6$MLFeatureTypeDouble@2$MLFeatureTypeImage@4$MLFeatureTypeInt64@1$MLFeatureTypeInvalid@0$MLFeatureTypeMultiArray@5$MLFeatureTypeSequence@7$MLFeatureTypeString@3$MLImageSizeConstraintTypeEnumerated@2$MLImageSizeConstraintTypeRange@3$MLImageSizeConstraintTypeUnspecified@0$MLModelErrorCustomLayer@4$MLModelErrorCustomModel@5$MLModelErrorFeatureType@1$MLModelErrorGeneric@0$MLModelErrorIO@3$MLModelErrorModelCollection@10$MLModelErrorModelDecryption@9$MLModelErrorModelDecryptionKeyFetch@8$MLModelErrorParameters@7$MLModelErrorPredictionCancelled@11$MLModelErrorUpdate@6$MLMultiArrayDataTypeDouble@65600$MLMultiArrayDataTypeFloat@65568$MLMultiArrayDataTypeFloat16@65552$MLMultiArrayDataTypeFloat32@65568$MLMultiArrayDataTypeFloat64@65600$MLMultiArrayDataTypeInt32@131104$MLMultiArrayShapeConstraintTypeEnumerated@2$MLMultiArrayShapeConstraintTypeRange@3$MLMultiArrayShapeConstraintTypeUnspecified@1$MLReshapeFrequencyHintFrequent@0$MLReshapeFrequencyHintInfrequent@1$MLTaskStateCancelling@3$MLTaskStateCompleted@4$MLTaskStateFailed@5$MLTaskStateRunning@2$MLTaskStateSuspended@1$MLUpdateProgressEventEpochEnd@2$MLUpdateProgressEventMiniBatchEnd@4$MLUpdateProgressEventTrainingBegin@1$"""
|
|
34
|
+
enums = """$MLComputeUnitsAll@2$MLComputeUnitsCPUAndGPU@1$MLComputeUnitsCPUAndNeuralEngine@3$MLComputeUnitsCPUOnly@0$MLFeatureTypeDictionary@6$MLFeatureTypeDouble@2$MLFeatureTypeImage@4$MLFeatureTypeInt64@1$MLFeatureTypeInvalid@0$MLFeatureTypeMultiArray@5$MLFeatureTypeSequence@7$MLFeatureTypeState@8$MLFeatureTypeString@3$MLImageSizeConstraintTypeEnumerated@2$MLImageSizeConstraintTypeRange@3$MLImageSizeConstraintTypeUnspecified@0$MLModelErrorCustomLayer@4$MLModelErrorCustomModel@5$MLModelErrorFeatureType@1$MLModelErrorGeneric@0$MLModelErrorIO@3$MLModelErrorModelCollection@10$MLModelErrorModelDecryption@9$MLModelErrorModelDecryptionKeyFetch@8$MLModelErrorParameters@7$MLModelErrorPredictionCancelled@11$MLModelErrorUpdate@6$MLMultiArrayDataTypeDouble@65600$MLMultiArrayDataTypeFloat@65568$MLMultiArrayDataTypeFloat16@65552$MLMultiArrayDataTypeFloat32@65568$MLMultiArrayDataTypeFloat64@65600$MLMultiArrayDataTypeInt32@131104$MLMultiArrayShapeConstraintTypeEnumerated@2$MLMultiArrayShapeConstraintTypeRange@3$MLMultiArrayShapeConstraintTypeUnspecified@1$MLReshapeFrequencyHintFrequent@0$MLReshapeFrequencyHintInfrequent@1$MLSpecializationStrategyDefault@0$MLSpecializationStrategyFastPrediction@1$MLTaskStateCancelling@3$MLTaskStateCompleted@4$MLTaskStateFailed@5$MLTaskStateRunning@2$MLTaskStateSuspended@1$MLUpdateProgressEventEpochEnd@2$MLUpdateProgressEventMiniBatchEnd@4$MLUpdateProgressEventTrainingBegin@1$"""
|
|
35
35
|
misc.update(
|
|
36
36
|
{
|
|
37
37
|
"MLMultiArrayDataType": NewType("MLMultiArrayDataType", int),
|
|
38
38
|
"MLMultiArrayShapeConstraintType": NewType(
|
|
39
39
|
"MLMultiArrayShapeConstraintType", int
|
|
40
40
|
),
|
|
41
|
+
"MLSpecializationStrategy": NewType("MLSpecializationStrategy", int),
|
|
41
42
|
"MLImageSizeConstraintType": NewType("MLImageSizeConstraintType", int),
|
|
42
43
|
"MLTaskState": NewType("MLTaskState", int),
|
|
43
44
|
"MLUpdateProgressEvent": NewType("MLUpdateProgressEvent", int),
|
|
@@ -274,6 +275,34 @@ try:
|
|
|
274
275
|
b"predictionFromFeatures:options:error:",
|
|
275
276
|
{"arguments": {4: {"type_modifier": b"o"}}},
|
|
276
277
|
)
|
|
278
|
+
r(
|
|
279
|
+
b"MLModel",
|
|
280
|
+
b"predictionFromFeatures:usingState:error:",
|
|
281
|
+
{"arguments": {4: {"type_modifier": b"o"}}},
|
|
282
|
+
)
|
|
283
|
+
r(
|
|
284
|
+
b"MLModel",
|
|
285
|
+
b"predictionFromFeatures:usingState:options:completionHandler:",
|
|
286
|
+
{
|
|
287
|
+
"arguments": {
|
|
288
|
+
5: {
|
|
289
|
+
"callable": {
|
|
290
|
+
"retval": {"type": b"v"},
|
|
291
|
+
"arguments": {
|
|
292
|
+
0: {"type": b"^v"},
|
|
293
|
+
1: {"type": b"@"},
|
|
294
|
+
2: {"type": b"@"},
|
|
295
|
+
},
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
)
|
|
301
|
+
r(
|
|
302
|
+
b"MLModel",
|
|
303
|
+
b"predictionFromFeatures:usingState:options:error:",
|
|
304
|
+
{"arguments": {5: {"type_modifier": b"o"}}},
|
|
305
|
+
)
|
|
277
306
|
r(
|
|
278
307
|
b"MLModel",
|
|
279
308
|
b"predictionsFromBatch:error:",
|
|
@@ -284,11 +313,80 @@ try:
|
|
|
284
313
|
b"predictionsFromBatch:options:error:",
|
|
285
314
|
{"arguments": {4: {"type_modifier": b"o"}}},
|
|
286
315
|
)
|
|
316
|
+
r(
|
|
317
|
+
b"MLModelAsset",
|
|
318
|
+
b"functionNamesWithCompletionHandler:",
|
|
319
|
+
{
|
|
320
|
+
"arguments": {
|
|
321
|
+
2: {
|
|
322
|
+
"callable": {
|
|
323
|
+
"retval": {"type": b"v"},
|
|
324
|
+
"arguments": {
|
|
325
|
+
0: {"type": b"^v"},
|
|
326
|
+
1: {"type": b"@"},
|
|
327
|
+
2: {"type": b"@"},
|
|
328
|
+
},
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
)
|
|
334
|
+
r(
|
|
335
|
+
b"MLModelAsset",
|
|
336
|
+
b"modelAssetWithSpecificationData:blobMapping:error",
|
|
337
|
+
{"arguments": {4: {"type_modifier": b"o"}}},
|
|
338
|
+
)
|
|
339
|
+
r(
|
|
340
|
+
b"MLModelAsset",
|
|
341
|
+
b"modelAssetWithSpecificationData:blobMapping:error:",
|
|
342
|
+
{"arguments": {4: {"type_modifier": b"o"}}},
|
|
343
|
+
)
|
|
287
344
|
r(
|
|
288
345
|
b"MLModelAsset",
|
|
289
346
|
b"modelAssetWithSpecificationData:error:",
|
|
290
347
|
{"arguments": {3: {"type_modifier": b"o"}}},
|
|
291
348
|
)
|
|
349
|
+
r(
|
|
350
|
+
b"MLModelAsset",
|
|
351
|
+
b"modelAssetWithURL:error:",
|
|
352
|
+
{"arguments": {3: {"type_modifier": b"o"}}},
|
|
353
|
+
)
|
|
354
|
+
r(
|
|
355
|
+
b"MLModelAsset",
|
|
356
|
+
b"modelDescriptionOfFunctionNamed:completionHandler:",
|
|
357
|
+
{
|
|
358
|
+
"arguments": {
|
|
359
|
+
3: {
|
|
360
|
+
"callable": {
|
|
361
|
+
"retval": {"type": b"v"},
|
|
362
|
+
"arguments": {
|
|
363
|
+
0: {"type": b"^v"},
|
|
364
|
+
1: {"type": b"@"},
|
|
365
|
+
2: {"type": b"@"},
|
|
366
|
+
},
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
)
|
|
372
|
+
r(
|
|
373
|
+
b"MLModelAsset",
|
|
374
|
+
b"modelDescriptionWithCompletionHandler:",
|
|
375
|
+
{
|
|
376
|
+
"arguments": {
|
|
377
|
+
2: {
|
|
378
|
+
"callable": {
|
|
379
|
+
"retval": {"type": b"v"},
|
|
380
|
+
"arguments": {
|
|
381
|
+
0: {"type": b"^v"},
|
|
382
|
+
1: {"type": b"@"},
|
|
383
|
+
2: {"type": b"@"},
|
|
384
|
+
},
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
)
|
|
292
390
|
r(
|
|
293
391
|
b"MLModelCollection",
|
|
294
392
|
b"beginAccessingModelCollectionWithIdentifier:completionHandler:",
|
|
@@ -440,6 +538,20 @@ try:
|
|
|
440
538
|
)
|
|
441
539
|
r(b"MLPredictionOptions", b"setUsesCPUOnly:", {"arguments": {2: {"type": "Z"}}})
|
|
442
540
|
r(b"MLPredictionOptions", b"usesCPUOnly", {"retval": {"type": "Z"}})
|
|
541
|
+
r(
|
|
542
|
+
b"MLState",
|
|
543
|
+
b"getMultiArrayForStateNamed:handler:",
|
|
544
|
+
{
|
|
545
|
+
"arguments": {
|
|
546
|
+
3: {
|
|
547
|
+
"callable": {
|
|
548
|
+
"retval": {"type": b"v"},
|
|
549
|
+
"arguments": {0: {"type": b"^v"}, 1: {"type": b"@"}},
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
)
|
|
443
555
|
r(
|
|
444
556
|
b"MLUpdateProgressHandlers",
|
|
445
557
|
b"initForEvents:progressHandler:completionHandler:",
|
|
@@ -683,6 +795,25 @@ try:
|
|
|
683
795
|
)
|
|
684
796
|
finally:
|
|
685
797
|
objc._updatingMetadata(False)
|
|
798
|
+
|
|
799
|
+
objc.registerNewKeywordsFromSelector(
|
|
800
|
+
"MLArrayBatchProvider", b"initWithDictionary:error:"
|
|
801
|
+
)
|
|
802
|
+
objc.registerNewKeywordsFromSelector(
|
|
803
|
+
"MLArrayBatchProvider", b"initWithFeatureProviderArray:"
|
|
804
|
+
)
|
|
805
|
+
objc.registerNewKeywordsFromSelector(
|
|
806
|
+
"MLDictionaryFeatureProvider", b"initWithDictionary:error:"
|
|
807
|
+
)
|
|
808
|
+
objc.registerNewKeywordsFromSelector(
|
|
809
|
+
"MLMultiArray", b"initWithDataPointer:shape:dataType:strides:deallocator:error:"
|
|
810
|
+
)
|
|
811
|
+
objc.registerNewKeywordsFromSelector("MLMultiArray", b"initWithPixelBuffer:shape:")
|
|
812
|
+
objc.registerNewKeywordsFromSelector("MLMultiArray", b"initWithShape:dataType:error:")
|
|
813
|
+
objc.registerNewKeywordsFromSelector("MLMultiArray", b"initWithShape:dataType:strides:")
|
|
814
|
+
objc.registerNewKeywordsFromSelector(
|
|
815
|
+
"MLUpdateProgressHandlers", b"initForEvents:progressHandler:completionHandler:"
|
|
816
|
+
)
|
|
686
817
|
expressions = {}
|
|
687
818
|
|
|
688
819
|
# END OF FILE
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyobjc-framework-CoreML
|
|
3
|
-
Version:
|
|
3
|
+
Version: 11.0
|
|
4
4
|
Summary: Wrappers for the framework CoreML on macOS
|
|
5
5
|
Home-page: https://github.com/ronaldoussoren/pyobjc
|
|
6
6
|
Author: Ronald Oussoren
|
|
@@ -18,20 +18,20 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
|
18
18
|
Classifier: Programming Language :: Python
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.12
|
|
26
25
|
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
27
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
28
28
|
Classifier: Programming Language :: Objective C
|
|
29
29
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
30
30
|
Classifier: Topic :: Software Development :: User Interfaces
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.9
|
|
32
32
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
33
|
-
Requires-Dist: pyobjc-core>=
|
|
34
|
-
Requires-Dist: pyobjc-framework-Cocoa>=
|
|
33
|
+
Requires-Dist: pyobjc-core>=11.0
|
|
34
|
+
Requires-Dist: pyobjc-framework-Cocoa>=11.0
|
|
35
35
|
Project-URL: Documentation, https://pyobjc.readthedocs.io/en/latest/
|
|
36
36
|
Project-URL: Issue tracker, https://github.com/ronaldoussoren/pyobjc/issues
|
|
37
37
|
Project-URL: Repository, https://github.com/ronaldoussoren/pyobjc
|
|
@@ -9,6 +9,7 @@ Lib/pyobjc_framework_CoreML.egg-info/PKG-INFO
|
|
|
9
9
|
Lib/pyobjc_framework_CoreML.egg-info/SOURCES.txt
|
|
10
10
|
Lib/pyobjc_framework_CoreML.egg-info/dependency_links.txt
|
|
11
11
|
Lib/pyobjc_framework_CoreML.egg-info/not-zip-safe
|
|
12
|
+
Lib/pyobjc_framework_CoreML.egg-info/pyobjc-build-info.txt
|
|
12
13
|
Lib/pyobjc_framework_CoreML.egg-info/requires.txt
|
|
13
14
|
Lib/pyobjc_framework_CoreML.egg-info/top_level.txt
|
|
14
15
|
Modules/_CoreML.m
|
|
@@ -34,6 +35,7 @@ PyObjCTest/test_mlfeaturevalue_mlimageconversion.py
|
|
|
34
35
|
PyObjCTest/test_mlimagesizeconstrainttype.py
|
|
35
36
|
PyObjCTest/test_mlmodel.py
|
|
36
37
|
PyObjCTest/test_mlmodel_mlmodelcompilation.py
|
|
38
|
+
PyObjCTest/test_mlmodel_mlstate.py
|
|
37
39
|
PyObjCTest/test_mlmodelasset.py
|
|
38
40
|
PyObjCTest/test_mlmodelcollection.py
|
|
39
41
|
PyObjCTest/test_mlmodelconfiguration.py
|
|
@@ -56,6 +58,7 @@ PyObjCTest/test_mlmultiarray.py
|
|
|
56
58
|
PyObjCTest/test_mlmultiarrayshapeconstrainttype.py
|
|
57
59
|
PyObjCTest/test_mlpredictionoptions.py
|
|
58
60
|
PyObjCTest/test_mlreshapefrequencyhint.py
|
|
61
|
+
PyObjCTest/test_mlstate.py
|
|
59
62
|
PyObjCTest/test_mltask.py
|
|
60
63
|
PyObjCTest/test_mlupdateprogressevent.py
|
|
61
64
|
PyObjCTest/test_mlupdateprogresshandlers.py
|
|
@@ -63,16 +66,14 @@ PyObjCTest/test_mlupdatetask.py
|
|
|
63
66
|
PyObjCTest/test_mlwritable.py
|
|
64
67
|
metadata/CoreML.fwinfo
|
|
65
68
|
metadata/metadata.ini
|
|
66
|
-
metadata/raw/arm64-12.1.fwinfo
|
|
67
69
|
metadata/raw/arm64-12.3.fwinfo
|
|
68
|
-
metadata/raw/arm64-13.0.fwinfo
|
|
69
70
|
metadata/raw/arm64-13.3.fwinfo
|
|
70
|
-
metadata/raw/arm64-14.
|
|
71
|
+
metadata/raw/arm64-14.5.fwinfo
|
|
72
|
+
metadata/raw/arm64-15.0.fwinfo
|
|
71
73
|
metadata/raw/x86_64-10.14.fwinfo
|
|
72
74
|
metadata/raw/x86_64-10.15.fwinfo
|
|
73
75
|
metadata/raw/x86_64-10.16.fwinfo
|
|
74
|
-
metadata/raw/x86_64-12.1.fwinfo
|
|
75
76
|
metadata/raw/x86_64-12.3.fwinfo
|
|
76
|
-
metadata/raw/x86_64-13.0.fwinfo
|
|
77
77
|
metadata/raw/x86_64-13.3.fwinfo
|
|
78
|
-
metadata/raw/x86_64-14.
|
|
78
|
+
metadata/raw/x86_64-14.5.fwinfo
|
|
79
|
+
metadata/raw/x86_64-15.0.fwinfo
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#define PY_SSIZE_T_CLEAN
|
|
2
|
+
#include "Python.h"
|
|
3
|
+
#include "pyobjc-api.h"
|
|
4
|
+
|
|
5
|
+
#import <CoreML/CoreML.h>
|
|
6
|
+
#import <Foundation/Foundation.h>
|
|
7
|
+
|
|
8
|
+
/* We include the source code here instead of
|
|
9
|
+
* using the linker due to limitations in pyobjc-api.h
|
|
10
|
+
*/
|
|
11
|
+
#include "_CoreML_protocols.m"
|
|
12
|
+
|
|
13
|
+
static PyMethodDef mod_methods[] = {
|
|
14
|
+
{0, 0, 0, 0} /* sentinel */
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
static int mod_exec_module(PyObject* m)
|
|
18
|
+
{
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static struct PyModuleDef_Slot mod_slots[] = {
|
|
23
|
+
{
|
|
24
|
+
.slot = Py_mod_exec,
|
|
25
|
+
.value = (void*)mod_exec_module
|
|
26
|
+
},
|
|
27
|
+
#if PY_VERSION_HEX >= 0x030c0000
|
|
28
|
+
{
|
|
29
|
+
/* This extension does not use the CPython API other than initializing
|
|
30
|
+
* the module, hence is safe with subinterpreters and per-interpreter
|
|
31
|
+
* GILs
|
|
32
|
+
*/
|
|
33
|
+
.slot = Py_mod_multiple_interpreters,
|
|
34
|
+
.value = Py_MOD_PER_INTERPRETER_GIL_SUPPORTED,
|
|
35
|
+
},
|
|
36
|
+
#endif
|
|
37
|
+
#if PY_VERSION_HEX >= 0x030d0000
|
|
38
|
+
{
|
|
39
|
+
/* The code in this extension should be safe to use without the GIL */
|
|
40
|
+
.slot = Py_mod_gil,
|
|
41
|
+
.value = Py_MOD_GIL_NOT_USED,
|
|
42
|
+
},
|
|
43
|
+
#endif
|
|
44
|
+
{ /* Sentinel */
|
|
45
|
+
.slot = 0,
|
|
46
|
+
.value = 0
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
static struct PyModuleDef mod_module = {
|
|
51
|
+
.m_base = PyModuleDef_HEAD_INIT,
|
|
52
|
+
.m_name = "_CoreML",
|
|
53
|
+
.m_doc = NULL,
|
|
54
|
+
.m_size = 0,
|
|
55
|
+
.m_methods = mod_methods,
|
|
56
|
+
.m_slots = mod_slots,
|
|
57
|
+
.m_traverse = NULL,
|
|
58
|
+
.m_clear = NULL,
|
|
59
|
+
.m_free = NULL,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
PyObject* PyInit__CoreML(void);
|
|
63
|
+
|
|
64
|
+
PyObject* __attribute__((__visibility__("default"))) PyInit__CoreML(void)
|
|
65
|
+
{
|
|
66
|
+
return PyModuleDef_Init(&mod_module);
|
|
67
|
+
}
|
|
@@ -83,7 +83,7 @@ struct pyobjc_api {
|
|
|
83
83
|
PyObject* _Nullable (*_Nonnull unsupported_method_caller)(
|
|
84
84
|
PyObject* _Nonnull, PyObject* _Nonnull, PyObject* _Nonnull const* _Nonnull,
|
|
85
85
|
size_t);
|
|
86
|
-
void (*_Nonnull err_python_to_objc_gil)(PyGILState_STATE* _Nonnull state);
|
|
86
|
+
void (*_Nonnull err_python_to_objc_gil)(PyGILState_STATE* _Nonnull state) __attribute__((__noreturn__));
|
|
87
87
|
int (*_Nonnull simplify_sig)(const char* signature, char* buf, size_t buflen);
|
|
88
88
|
void (*_Nonnull free_c_array)(int, Py_buffer*);
|
|
89
89
|
int (*_Nonnull py_to_c_array)(BOOL, BOOL, const char* _Nonnull, PyObject* _Nonnull,
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
|
|
12
12
|
NS_ASSUME_NONNULL_BEGIN
|
|
13
13
|
|
|
14
|
+
#ifdef USE_STATIC_ANALYZER
|
|
15
|
+
#define CLANG_SUPPRESS [[clang::suppress]]
|
|
16
|
+
#else
|
|
17
|
+
#define CLANG_SUPPRESS
|
|
18
|
+
#endif
|
|
19
|
+
|
|
14
20
|
/*
|
|
15
21
|
*
|
|
16
22
|
* Start of compiler definitions
|
|
@@ -153,10 +159,6 @@ extern PyObject* _Nullable PyObject_VectorcallMethod(
|
|
|
153
159
|
|
|
154
160
|
extern int PyObjC_Cmp(PyObject* o1, PyObject* o2, int* result);
|
|
155
161
|
|
|
156
|
-
extern PyObject* _Nullable PyObjCBytes_InternFromString(const char* v);
|
|
157
|
-
extern PyObject* _Nullable PyObjCBytes_InternFromStringAndSize(const char* v,
|
|
158
|
-
Py_ssize_t l);
|
|
159
|
-
|
|
160
162
|
/*
|
|
161
163
|
* A micro optimization: when using Python 3.3 or later it
|
|
162
164
|
* is possible to access a 'char*' with an ASCII representation
|
|
@@ -238,7 +240,80 @@ _PyObjCTuple_GetItem(PyObject* tuple, Py_ssize_t idx)
|
|
|
238
240
|
PyGILState_Release(_GILState); \
|
|
239
241
|
} while (0)
|
|
240
242
|
|
|
241
|
-
|
|
243
|
+
#if PY_VERSION_HEX < 0x030a0000
|
|
244
|
+
|
|
245
|
+
static inline PyObject* Py_NewRef(PyObject* o)
|
|
246
|
+
{
|
|
247
|
+
Py_INCREF(o);
|
|
248
|
+
return o;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
static inline PyObject* Py_XNewRef(PyObject* o)
|
|
252
|
+
{
|
|
253
|
+
Py_XINCREF(o);
|
|
254
|
+
return o;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
#endif /* PY_VERSION_HEX < 0x030a0000 */
|
|
258
|
+
|
|
259
|
+
#if PY_VERSION_HEX < 0x030d0000
|
|
260
|
+
#define Py_BEGIN_CRITICAL_SECTION(value) { (void)(value);
|
|
261
|
+
#define Py_END_CRITICAL_SECTION() }
|
|
262
|
+
#define Py_EXIT_CRITICAL_SECTION() ((void)0)
|
|
263
|
+
|
|
264
|
+
#define Py_BEGIN_CRITICAL_SECTION2(value1, value2) { (void)(value1); (void)(value2);
|
|
265
|
+
#define Py_END_CRITICAL_SECTION2() }
|
|
266
|
+
#define Py_EXIT_CRITICAL_SECTION2() ((void)0)
|
|
267
|
+
|
|
268
|
+
#define PyObjC_ATOMIC
|
|
269
|
+
|
|
270
|
+
#else
|
|
271
|
+
|
|
272
|
+
#ifdef Py_GIL_DISABLED
|
|
273
|
+
#define Py_EXIT_CRITICAL_SECTION() PyCriticalSection_End(&_py_cs)
|
|
274
|
+
#define Py_EXIT_CRITICAL_SECTION2() PyCriticalSection2_End(&_py_cs2)
|
|
275
|
+
#define PyObjC_ATOMIC _Atomic
|
|
276
|
+
#else
|
|
277
|
+
#define Py_EXIT_CRITICAL_SECTION() ((void)0)
|
|
278
|
+
#define Py_EXIT_CRITICAL_SECTION2() ((void)0)
|
|
279
|
+
#define PyObjC_ATOMIC
|
|
280
|
+
#endif
|
|
281
|
+
|
|
282
|
+
#endif
|
|
283
|
+
|
|
284
|
+
#if PY_VERSION_HEX < 0x030d0000
|
|
285
|
+
static inline int PyDict_GetItemRef(PyObject *p, PyObject *key, PyObject * _Nonnull* _Nullable result)
|
|
286
|
+
{
|
|
287
|
+
*result = PyDict_GetItemWithError(p, key);
|
|
288
|
+
if (*result == NULL) {
|
|
289
|
+
if (PyErr_Occurred()) {
|
|
290
|
+
return -1;
|
|
291
|
+
} else {
|
|
292
|
+
return 0;
|
|
293
|
+
}
|
|
294
|
+
} else {
|
|
295
|
+
Py_INCREF(*result);
|
|
296
|
+
return 1;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
static inline PyObject* _Nullable PyList_GetItemRef(PyObject* l, Py_ssize_t i)
|
|
301
|
+
{
|
|
302
|
+
PyObject* result = PyList_GetItem(l, i);
|
|
303
|
+
Py_XINCREF(result);
|
|
304
|
+
return result;
|
|
305
|
+
}
|
|
306
|
+
#endif
|
|
307
|
+
|
|
308
|
+
#if PY_VERSION_HEX < 0x030c0000
|
|
309
|
+
static inline PyObject* PyType_GetDict(PyTypeObject* type)
|
|
310
|
+
{
|
|
311
|
+
PyObject* result = type->tp_dict;
|
|
312
|
+
Py_INCREF(result);
|
|
313
|
+
return result;
|
|
314
|
+
}
|
|
315
|
+
#endif
|
|
316
|
+
|
|
242
317
|
|
|
243
318
|
NS_ASSUME_NONNULL_END
|
|
244
319
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyobjc-framework-CoreML
|
|
3
|
-
Version:
|
|
3
|
+
Version: 11.0
|
|
4
4
|
Summary: Wrappers for the framework CoreML on macOS
|
|
5
5
|
Home-page: https://github.com/ronaldoussoren/pyobjc
|
|
6
6
|
Author: Ronald Oussoren
|
|
@@ -18,20 +18,20 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
|
18
18
|
Classifier: Programming Language :: Python
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
20
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.12
|
|
26
25
|
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
27
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
28
28
|
Classifier: Programming Language :: Objective C
|
|
29
29
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
30
30
|
Classifier: Topic :: Software Development :: User Interfaces
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.9
|
|
32
32
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
33
|
-
Requires-Dist: pyobjc-core>=
|
|
34
|
-
Requires-Dist: pyobjc-framework-Cocoa>=
|
|
33
|
+
Requires-Dist: pyobjc-core>=11.0
|
|
34
|
+
Requires-Dist: pyobjc-framework-Cocoa>=11.0
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
Wrappers for the "CoreML" framework on macOS.
|
{pyobjc-framework-CoreML-10.2 → pyobjc_framework_coreml-11.0}/PyObjCTest/test_mlfeaturetype.py
RENAMED
|
@@ -14,3 +14,5 @@ class TestMLFeatureType(TestCase):
|
|
|
14
14
|
self.assertEqual(CoreML.MLFeatureTypeImage, 4)
|
|
15
15
|
self.assertEqual(CoreML.MLFeatureTypeMultiArray, 5)
|
|
16
16
|
self.assertEqual(CoreML.MLFeatureTypeDictionary, 6)
|
|
17
|
+
self.assertEqual(CoreML.MLFeatureTypeSequence, 7)
|
|
18
|
+
self.assertEqual(CoreML.MLFeatureTypeState, 8)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from PyObjCTools.TestSupport import TestCase, min_os_level, expectedFailure
|
|
2
|
+
import CoreML
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class TestMLModel_MLState(TestCase):
|
|
6
|
+
@min_os_level("15.0")
|
|
7
|
+
def test_methods(self):
|
|
8
|
+
self.assertArgIsOut(CoreML.MLModel.predictionFromFeatures_usingState_error_, 2)
|
|
9
|
+
self.assertArgIsOut(
|
|
10
|
+
CoreML.MLModel.predictionFromFeatures_usingState_options_error_, 3
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
@expectedFailure
|
|
14
|
+
@min_os_level("15.0")
|
|
15
|
+
def test_methods16_0(self):
|
|
16
|
+
# XXX: Marked as 'macOS 16.0' in the headers.
|
|
17
|
+
self.assertArgIsBlock(
|
|
18
|
+
CoreML.MLModel.new().predictionFromFeatures_usingState_options_completionHandler_,
|
|
19
|
+
3,
|
|
20
|
+
b"v@@",
|
|
21
|
+
)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from PyObjCTools.TestSupport import TestCase, min_os_level
|
|
2
|
+
|
|
3
|
+
import CoreML
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TestMLModelAsset(TestCase):
|
|
7
|
+
@min_os_level("13.0")
|
|
8
|
+
def test_methods13_0(self):
|
|
9
|
+
self.assertArgIsOut(
|
|
10
|
+
CoreML.MLModelAsset.modelAssetWithSpecificationData_error_, 1
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
@min_os_level("15.0")
|
|
14
|
+
def test_methods15_0(self):
|
|
15
|
+
self.assertArgIsOut(CoreML.MLModelAsset.modelAssetWithURL_error_, 1)
|
|
16
|
+
|
|
17
|
+
self.assertArgIsBlock(
|
|
18
|
+
CoreML.MLModelAsset.modelDescriptionWithCompletionHandler_, 0, b"v@@"
|
|
19
|
+
)
|
|
20
|
+
self.assertArgIsBlock(
|
|
21
|
+
CoreML.MLModelAsset.modelDescriptionOfFunctionNamed_completionHandler_,
|
|
22
|
+
1,
|
|
23
|
+
b"v@@",
|
|
24
|
+
)
|
|
25
|
+
self.assertArgIsBlock(
|
|
26
|
+
CoreML.MLModelAsset.functionNamesWithCompletionHandler_, 0, b"v@@"
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
self.assertArgIsOut(
|
|
30
|
+
CoreML.MLModelAsset.modelAssetWithSpecificationData_blobMapping_error_, 2
|
|
31
|
+
)
|