-
Notifications
You must be signed in to change notification settings - Fork 469
Description
Description
from guardrails.cli.hub.install import install is a footgun on two levels.
Current documentation
Right now, if one does from guardrails.cli.hub.install import install and install("hub://guardrails/nsfw_text"), the function will show, "Invalid URI! The package URI must start with 'hub://'". In reality, install is expecting a LIST of hub URIs, so the "hub://" is decomposed into ['h', 'u', 'b', ...].
Additionally, one should be using from guardrails.hub import install.
Suggested changes
First, we should detect if a string is passed and warn about using directly, second, we should rename the install CLI function to install_cli or something else. The actual command line instruction can be the same, guardrails hub install is good, but we should rename the def so people don't import it by mistake.
Checklist
- I have checked that this issue hasn't already been reported
- I have checked the latest version of the documentation to ensure this issue still exists
- For simple typos or fixes, I have considered submitting a pull request instead