Skip to content

Commit 76f9900

Browse files
authored
chore: remove logger info for chipper since its private (#278)
Remove the logger info that user won't be able to see since chipper is only available in host API.
1 parent c4afe9f commit 76f9900

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## 0.7.11-dev2
1+
## 0.7.11-dev3
22

3+
* chore: remove logger info for chipper since its private
34
* fix: update broken slack invite link in chipper logger info
45
* enhancement: Improve error message when # images extracted doesn't match # page layouts.
56
* fix: use automatic mixed precision on GPU for Chipper

test_unstructured_inference/models/test_model.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@ def test_get_model(monkeypatch):
3535
assert isinstance(models.get_model("checkbox"), MockModel)
3636

3737

38-
def test_get_model_warns_on_chipper(monkeypatch, caplog):
39-
monkeypatch.setattr(
40-
models,
41-
"UnstructuredChipperModel",
42-
MockModel,
43-
)
44-
with mock.patch.object(models, "models", {}):
45-
models.get_model("chipper")
46-
assert caplog.records[0].levelname == "WARNING"
47-
48-
4938
def test_raises_invalid_model():
5039
with pytest.raises(models.UnknownModelException):
5140
models.get_model("fake_model")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.7.11-dev2" # pragma: no cover
1+
__version__ = "0.7.11-dev3" # pragma: no cover

unstructured_inference/models/base.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Dict, Optional
22

3-
from unstructured_inference.logger import logger
43
from unstructured_inference.models.chipper import MODEL_TYPES as CHIPPER_MODEL_TYPES
54
from unstructured_inference.models.chipper import UnstructuredChipperModel
65
from unstructured_inference.models.detectron2 import (
@@ -54,13 +53,6 @@ def get_model(model_name: Optional[str] = None, **kwargs) -> UnstructuredModel:
5453
model = UnstructuredYoloXModel()
5554
initialize_params = {**YOLOX_MODEL_TYPES[model_name], **kwargs}
5655
elif model_name in CHIPPER_MODEL_TYPES:
57-
logger.warning(
58-
"The Chipper model is currently in Beta and is not yet ready for production use. "
59-
"You can reach out to the Unstructured engineering team in the Unstructured "
60-
"community Slack if you have any feedback on the Chipper model. "
61-
"You can join the community Slack here: "
62-
"https://short.unstructured.io/pzw05l7",
63-
)
6456
model = UnstructuredChipperModel()
6557
initialize_params = {**CHIPPER_MODEL_TYPES[model_name], **kwargs}
6658
elif model_name == "super_gradients":

0 commit comments

Comments
 (0)