mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
Make warning visible in the logs.
This commit is contained in:
parent
e2c870c216
commit
b0f460a74c
@ -250,13 +250,10 @@ def download_weights(
|
|||||||
|
|
||||||
if auto_convert:
|
if auto_convert:
|
||||||
if not trust_remote_code:
|
if not trust_remote_code:
|
||||||
import warnings
|
logger.warning(
|
||||||
|
|
||||||
warnings.warn(
|
|
||||||
f"🚨🚨BREAKING CHANGE in 2.0🚨🚨: Safetensors conversion is disabled without `--trust-remote-code` because "
|
f"🚨🚨BREAKING CHANGE in 2.0🚨🚨: Safetensors conversion is disabled without `--trust-remote-code` because "
|
||||||
f"Pickle files are unsafe and can essentially contain remote code execution!"
|
f"Pickle files are unsafe and can essentially contain remote code execution!"
|
||||||
f"Please check for more information here: https://huggingface.co/docs/text-generation-inference/basic_tutorials/safety",
|
f"Please check for more information here: https://huggingface.co/docs/text-generation-inference/basic_tutorials/safety",
|
||||||
UserWarning,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.warning(
|
logger.warning(
|
||||||
|
Loading…
Reference in New Issue
Block a user