Skip to content

Commit

Permalink
* fixing issues in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
asofter committed Feb 14, 2024
1 parent 5d229ac commit 51c6ba5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
8 changes: 2 additions & 6 deletions llm_guard/transformers_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ def get_tokenizer_and_model_for_classification(
use_onnx = False

if use_onnx is False:
tf_model = transformers.AutoModelForSequenceClassification.from_pretrained(
model, device=device()
)
tf_model = transformers.AutoModelForSequenceClassification.from_pretrained(model)
LOGGER.debug("Initialized classification model", model=model, device=device())

return tf_tokenizer, tf_model
Expand Down Expand Up @@ -162,9 +160,7 @@ def _pipeline_ner(model: str, onnx_model: Optional[str] = None, use_onnx: bool =
)
LOGGER.debug("Initialized NER ONNX model", model=model, device=device())
else:
tf_model = transformers.AutoModelForTokenClassification.from_pretrained(
model, device=device()
)
tf_model = transformers.AutoModelForTokenClassification.from_pretrained(model)
LOGGER.debug("Initialized NER model", model=model, device=device())

return transformers.pipeline(
Expand Down
22 changes: 0 additions & 22 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,6 @@ plugins:
syntaxHighlightTheme: monokai
- mkdocs-jupyter
- git-revision-date-localized
- mkdocstrings:
default_handler: python
handlers:
python:
options:
docstring_style: google
show_source: false
show_bases: false
show_if_no_docstring: true
merge_init_into_class: true
show_root_toc_entry: false
show_inheritance: true # This is no longer a valid option
inherited_members: true # This might be the replacement?
# The below are now filters in the MD file
# https://mkdocstrings.github.io/python/usage/configuration/members/#filters
show_private: false # This is no longer a valid option
show_special_members: false # This is no longer a valid option
# Newly added options
annotations_path: brief
show_signature_annotations: true
separate_signature: true
signature_crossrefs: true


extra:
Expand Down

0 comments on commit 51c6ba5

Please sign in to comment.