forked from apple/coremltools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·105 lines (90 loc) · 3.47 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/env python
#
# Copyright (c) 2017, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import importlib.util
import os
from setuptools import setup, find_packages
# Get the coremltools version string
coremltools_dir = os.path.join(os.path.dirname(__file__), "coremltools")
version_file = os.path.join(coremltools_dir, "version.py")
spec = importlib.util.spec_from_file_location("coremltools.version", version_file)
version_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(version_module)
__version__ = version_module.__version__
README = os.path.join(os.getcwd(), "README.md")
long_description = """coremltools
===========
`Core ML <http://developer.apple.com/documentation/coreml>`_
is an Apple framework that allows developers to easily integrate
machine learning (ML) models into apps. Core ML is available on iOS, iPadOS,
watchOS, macOS, and tvOS. Core ML introduces a public file format (.mlmodel)
for a broad set of ML methods including deep neural networks (convolutional
and recurrent), tree ensembles (boosted trees, random forest, decision trees),
and generalized linear models. Core ML models can be directly integrated into
apps within Xcode.
:code:`coremltools` is a python package for creating, examining, and testing models in
the .mlmodel format. In particular, it can be used to:
- Convert trained models from popular machine learning tools into Core ML format
(.mlmodel).
- Write models to Core ML format with a simple API.
- Making predictions using the Core ML framework (on select platforms) to
verify conversion.
More Information
----------------
- `coremltools user guide and examples <https://coremltools.readme.io/>`_
- `Core ML framework documentation <http://developer.apple.com/documentation/coreml>`_
- `Machine learning at Apple <https://developer.apple.com/machine-learning>`_
License
-------
Copyright (c) 2020, Apple Inc. All rights reserved.
Use of this source code is governed by the
`3-Clause BSD License <https://opensource.org/licenses/BSD-3-Clause>`_
that can be found in the LICENSE.txt file.
"""
setup(
name="coremltools",
version=__version__,
description="Community Tools for Core ML",
long_description=long_description,
author="Apple Inc.",
author_email="coremltools@apple.com",
url="https://github.com/apple/coremltools",
packages=find_packages(),
package_data={
"": [
"_core.*.so", # kmeans1d
"libcoremlpython.so",
"libmilstoragepython.so",
"libmodelpackage.so",
"LICENSE.txt",
"README.md",
]
},
install_requires=[
"numpy >= 1.14.5, < 2.0.0",
"protobuf >= 3.1.0, <= 4.0.0",
"sympy",
"tqdm",
"packaging",
"attrs>=21.3.0",
"cattrs",
"pyaml",
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
],
license="BSD",
)