Skip to content

Commit

Permalink
* set the default encoding of stdout to utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
HYLcool committed Dec 30, 2024
1 parent 6020a41 commit d464b79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions data_juicer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

from data_juicer.utils.availability_utils import _is_package_available

# set the default encoding to utf-8 explicitly
sys.stdout.reconfigure(encoding='utf-8')

ImageFile.LOAD_TRUNCATED_IMAGES = True

# For now, only INFO will be shown. Later the severity level will be changed
Expand Down
4 changes: 4 additions & 0 deletions data_juicer/ops/mapper/nlpcda_zh_mapper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from copy import deepcopy

from loguru import logger
Expand All @@ -8,6 +9,9 @@

from ..base_op import OPERATORS, Mapper

# set the default encoding to utf-8 explicitly
sys.stdout.reconfigure(encoding='utf-8')

nlpcda = LazyLoader('nlpcda', 'nlpcda')

OP_NAME = 'nlpcda_zh_mapper'
Expand Down

0 comments on commit d464b79

Please sign in to comment.