Skip to content

Commit

Permalink
don't fork with windows
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Mar 21, 2022
1 parent 779fe89 commit 4a4e5f0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
3 changes: 2 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ source:
sha256: 39f33cbfa7408fad08c01a46fa4d7c50b6b17b37f1d0a5bc7efbdd8128dab4ec
patches:
# backport huggingface/tokenizers#650
- patches/0001-Upgrade-pyo3-to-0.15.patch # [build_platform != target_platform]
- patches/0001-Upgrade-pyo3-to-0.15.patch # [build_platform != target_platform]
- patches/0002-don-t-try-to-use-fork-context-on-windows.patch # [win]

build:
number: 1
Expand Down
2 changes: 1 addition & 1 deletion recipe/patches/0001-Upgrade-pyo3-to-0.15.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3ee2156e974f2299b2dbd879d40050b9f2e50500 Mon Sep 17 00:00:00 2001
From: messense <[email protected]>
Date: Wed, 10 Mar 2021 10:45:50 +0800
Subject: [PATCH] Upgrade pyo3 to 0.15
Subject: [PATCH 1/2] Upgrade pyo3 to 0.15

Rebased-By: H. Vetinari <[email protected]>
---
Expand Down
25 changes: 25 additions & 0 deletions recipe/patches/0002-don-t-try-to-use-fork-context-on-windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 94425df68f5c232b7ac2edd9f7a368a628916e1c Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Mon, 21 Mar 2022 21:02:14 +1100
Subject: [PATCH 2/2] don't try to use fork context on windows

---
bindings/python/tests/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/python/tests/utils.py b/bindings/python/tests/utils.py
index b2b028d..40a4722 100644
--- a/bindings/python/tests/utils.py
+++ b/bindings/python/tests/utils.py
@@ -99,7 +99,7 @@ def doc_pipeline_bert_tokenizer(data_dir):


# On MacOS Python 3.8+ the default was modified to `spawn`, we need `fork` in tests.
-mp.set_start_method("fork")
+# mp.set_start_method("fork")


def multiprocessing_with_parallelism(tokenizer, enabled: bool):
--
2.35.1.windows.2

0 comments on commit 4a4e5f0

Please sign in to comment.