Skip to content

Commit bfa60a2

Browse files
committed
Add patch for category-encoders-2.5.1.post0
1 parent abf646a commit bfa60a2

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/category_encoders/hashing.py b/category_encoders/hashing.py
2+
index d366908..9b2ae78 100644
3+
--- a/category_encoders/hashing.py
4+
+++ b/category_encoders/hashing.py
5+
@@ -114,7 +114,10 @@ class HashingEncoder(util.BaseEncoder, util.UnsupervisedTransformerMixin):
6+
if platform.system == 'Windows':
7+
self.max_process = 1
8+
else:
9+
- self.max_process = int(math.ceil(multiprocessing.cpu_count() / 2))
10+
+ if sys.implementation.name == 'graalpy':
11+
+ self.max_process = __graalpython__.get_max_process_count()
12+
+ else:
13+
+ self.max_process = int(math.ceil(multiprocessing.cpu_count() / 2))
14+
if self.max_process < 1:
15+
self.max_process = 1
16+
elif self.max_process > 128:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[rules]]
2+
version = '== 2.5.1.post0'
3+
patch = 'category-encoders-2.5.1.post0.patch'

0 commit comments

Comments
 (0)