[docs] Footgun: install
function should not fail when given a string.
#1091
Labels
documentation
Improvements or additions to documentation
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
andinstall("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 toinstall_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
The text was updated successfully, but these errors were encountered: