Skip to content

Commit

Permalink
add psutil to minimal requires
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-x-c committed Apr 18, 2024
1 parent 7f74cf1 commit 8307d3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion data_juicer/utils/process_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import math
import subprocess

import psutil
from loguru import logger

from data_juicer import cuda_device_count, use_cuda
Expand All @@ -23,7 +24,6 @@ def get_min_cuda_memory():

def calculate_np(num_proc, op, op_name):
"""Calculate the optimum number of processes for the given OP"""
import psutil
if num_proc is None:
num_proc = psutil.cpu_count()
if use_cuda() and op._accelerator == 'cuda':
Expand Down
1 change: 1 addition & 0 deletions environments/minimal_requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ streamlit
spacy==3.5.0
multiprocess==0.70.12
dill==0.3.4
psutil

0 comments on commit 8307d3c

Please sign in to comment.