Update rwkv.py import error (#10293)

I have updated the code to ensure consistent error handling for
ImportError. Instead of relying on ValueError as before, I've followed
the standard practice of raising ImportError while also including
detailed error messages. This modification improves code clarity and
explicitly indicates that any issues are related to module imports.
pull/10332/head
ParamdeepSinghShorthillsAI 1 year ago committed by GitHub
parent bce38b7163
commit 3cc242b591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -121,7 +121,7 @@ class RWKV(LLM, BaseModel):
values["pipeline"] = PIPELINE(values["client"], values["tokens_path"])
except ImportError:
raise ValueError(
raise ImportError(
"Could not import rwkv python package. "
"Please install it with `pip install rwkv`."
)

Loading…
Cancel
Save