Skip to content

Commit

Permalink
fix: make new env var EDSNLP_MAX_CPU_WORKERS is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed May 21, 2024
1 parent d953be1 commit b6cf1da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion edsnlp/processing/multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ def execute_multiprocessing_backend(
and num_gpu_workers > 0
)

num_cpus = int(os.environ["EDSNLP_MAX_CPU_WORKERS"] or cpu_count())
num_cpus = int(os.environ.get("EDSNLP_MAX_CPU_WORKERS") or cpu_count())
num_devices = 0
if requires_gpu:
import torch
Expand Down

0 comments on commit b6cf1da

Please sign in to comment.