Skip to content

Commit 6488b44

Browse files
committed
clean up coreml install_requirements
1 parent 1f235f5 commit 6488b44

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

backends/apple/coreml/scripts/install_requirements.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ SCRIPT_DIR_PATH="$(
1010
pwd -P
1111
)"
1212

13+
# TODO(jathu): remove the need to fetch coremltools to build deps for coreml_executor_runner.
14+
# Keep this version in sync with: pyproject.toml
15+
COREMLTOOLS_VERSION="8.1"
16+
1317
red=`tput setaf 1`
1418
green=`tput setaf 2`
1519

@@ -24,7 +28,7 @@ rm -rf "$COREML_DIR_PATH/third-party"
2428
mkdir "$COREML_DIR_PATH/third-party"
2529

2630
echo "${green}ExecuTorch: Cloning coremltools."
27-
git clone --depth 1 --branch 8.1 "https://github.com/apple/coremltools.git" $COREMLTOOLS_DIR_PATH
31+
git clone --depth 1 --branch "${COREMLTOOLS_VERSION}" "https://github.com/apple/coremltools.git" $COREMLTOOLS_DIR_PATH
2832
cd $COREMLTOOLS_DIR_PATH
2933

3034
STATUS=$?
@@ -43,7 +47,7 @@ fi
4347

4448
mkdir "$COREMLTOOLS_DIR_PATH/build"
4549
cmake -S "$COREMLTOOLS_DIR_PATH" -B "$COREMLTOOLS_DIR_PATH/build"
46-
cmake --build "$COREMLTOOLS_DIR_PATH/build" --parallel
50+
cmake --build "$COREMLTOOLS_DIR_PATH/build" --parallel --target mlmodel
4751

4852
echo "${green}ExecuTorch: Cloning nlohmann."
4953
git clone https://github.com/nlohmann/json.git "$COREML_DIR_PATH/third-party/nlohmann_json"

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ dependencies=[
6767
"sympy",
6868
"tabulate",
6969
"typing-extensions",
70-
# macOS Only
70+
# Keep this version in sync with: ./backends/apple/coreml/scripts/install_requirements.sh
7171
"coremltools==8.1; platform_system == 'Darwin'",
7272
]
7373

0 commit comments

Comments
 (0)