Skip to content

Commit 8e6e320

Browse files
authored
fix rmtree failure in coreml
Differential Revision: D83371990 Pull Request resolved: #14632
1 parent 6bfe337 commit 8e6e320

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backends/apple/coreml/compiler/coreml_preprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import logging
77

88
import shutil
9+
import tempfile
910
import uuid
1011
from dataclasses import asdict, dataclass
1112
from enum import Enum
@@ -415,7 +416,7 @@ def preprocess_model(
415416
mlmodel: ct.models.MLModel, model_type: MODEL_TYPE
416417
) -> PreprocessResult:
417418
identifier = "executorch_" + str(uuid.uuid4())
418-
dir_path: Path = Path("tmp") / identifier
419+
dir_path: Path = Path(tempfile.gettempdir()) / identifier
419420
model_dir_path: Path = dir_path / "lowered_module"
420421
model_spec: ct.proto.Model_pb2 = mlmodel.get_spec()
421422
logger.warning(

0 commit comments

Comments
 (0)