Skip to content

Commit

Permalink
Ignore LangChain deprecation warning. Ease sentiment tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmitsch committed Apr 20, 2024
1 parent 5cd5c64 commit 174ef84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ filterwarnings = [
"ignore:^.*The `construct` method is deprecated.*",
"ignore:^.*Skipping device Apple Paravirtual device that does not support Metal 2.0.*",
"ignore:^.*Pydantic V1 style `@validator` validators are deprecated.*",
"ignore:^.*was deprecated in langchain-community.*"
"ignore:^.*was deprecated in langchain-community.*",
"ignore:^.*was deprecated in LangChain 0.0.1.*"
]
markers = [
"external: interacts with a (potentially cost-incurring) third-party API",
Expand Down
2 changes: 1 addition & 1 deletion spacy_llm/tests/tasks/test_sentiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_sentiment_predict(cfg_string, request):
orig_config = Config().from_str(cfg)
nlp = spacy.util.load_model_from_config(orig_config, auto_fill=True)
if cfg_string != "ext_template_cfg_string":
assert nlp("This is horrible.")._.sentiment == 0.0
assert nlp("This is horrible.")._.sentiment <= 0.1
assert 0 < nlp("This is meh.")._.sentiment <= 0.5
assert nlp("This is perfect.")._.sentiment == 1.0

Expand Down

0 comments on commit 174ef84

Please sign in to comment.