mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
25 lines
677 B
Python
25 lines
677 B
Python
# supress warnings and spew of logs from hugging face
|
|
import transformers
|
|
|
|
from .base import ( # noqa: F401
|
|
DummyShield,
|
|
OnViolationAction,
|
|
ShieldBase,
|
|
ShieldResponse,
|
|
TextShield,
|
|
)
|
|
from .code_scanner import CodeScannerShield # noqa: F401
|
|
from .contrib.third_party_shield import ThirdPartyShield # noqa: F401
|
|
from .llama_guard import LlamaGuardShield # noqa: F401
|
|
from .prompt_guard import PromptGuardShield # noqa: F401
|
|
from .shield_runner import SafetyException, ShieldRunnerMixin # noqa: F401
|
|
|
|
transformers.logging.set_verbosity_error()
|
|
|
|
import os
|
|
|
|
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
|
|
|
import warnings
|
|
|
|
warnings.filterwarnings("ignore")
|