Skip to content

Commit

Permalink
TLDR-462 -- style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raxtemur committed Oct 26, 2023
1 parent 70f6840 commit cb54c52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _unpickle(self) -> None:
with gzip.open(self.path) as file:
self._classifier, parameters = pickle.load(file)
self._feature_extractor = ParagraphFeatureExtractor(**parameters, config=self.config)

if self.config.get("on_gpu", False):
self._classifier.set_params(predictor="gpu_predictor", tree_method="auto", n_gpus=1, gpu_id=0)
self._classifier.get_booster().set_param(self._classifier.get_params())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def __init__(self, *, config: dict) -> None:
"""
super().__init__(config=config)
self.scew_corrector = SkewCorrector()
self.column_orientation_classifier = ColumnsOrientationClassifier(on_gpu=self.config.get("on_gpu", False), checkpoint_path=get_config()["resources_path"], config=config)
self.column_orientation_classifier = ColumnsOrientationClassifier(on_gpu=self.config.get("on_gpu", False),
checkpoint_path=get_config()["resources_path"], config=config)
self.binarizer = AdaptiveBinarizer()
self.ocr = OCRLineExtractor(config=config)
self.logger = config.get("logger", logging.getLogger())
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/test_my_gpu_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from dedocutils.preprocessing import SkewCorrector

from dedoc.metadata_extractors.concrete_metadata_extractors.base_metadata_extractor import BaseMetadataExtractor
from dedoc.readers.pdf_reader.pdf_image_reader.columns_orientation_classifier.columns_orientation_classifier import ColumnsOrientationClassifier
from dedoc.readers.txt_reader.raw_text_reader import RawTextReader
from dedoc.structure_extractors.concrete_structure_extractors.law_structure_excractor import LawStructureExtractor
from dedoc.readers.pdf_reader.pdf_image_reader.columns_orientation_classifier.columns_orientation_classifier import ColumnsOrientationClassifier
from tests.api_tests.abstract_api_test import AbstractTestApiDocReader
from tests.test_utils import get_test_config

Expand Down

0 comments on commit cb54c52

Please sign in to comment.