red1bluelost
commited on
Commit
·
75ece7c
1
Parent(s):
7b93847
Increases CPU utilization based on os count.
Browse files
evaluate_genericify_cpp.py
CHANGED
@@ -122,7 +122,8 @@ class EvaluateGenericifyCpp(evaluate.Metric):
|
|
122 |
k=[1, 10, 100],
|
123 |
):
|
124 |
"""Returns the scores"""
|
125 |
-
num_workers =
|
|
|
126 |
|
127 |
if os.getenv("HF_ALLOW_CODE_EVAL", default=0) != "1":
|
128 |
raise ValueError(_WARNING)
|
|
|
122 |
k=[1, 10, 100],
|
123 |
):
|
124 |
"""Returns the scores"""
|
125 |
+
num_workers = os.cpu_count()
|
126 |
+
num_workers = num_workers if not num_workers else 8
|
127 |
|
128 |
if os.getenv("HF_ALLOW_CODE_EVAL", default=0) != "1":
|
129 |
raise ValueError(_WARNING)
|