Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[documentation] Unable to install guardrail package from hub after latest release #1166

Closed
JyotsanaS opened this issue Nov 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@JyotsanaS
Copy link

Getting 401 unauthorized as error message.

Tried with github cli after setting the token. I wasn't successful. Can anyone share steps/document to follow to download guardrails from hub?

@JyotsanaS JyotsanaS added the bug Something isn't working label Nov 15, 2024
@JyotsanaS JyotsanaS changed the title [bug] Unable to install guardrail package from hub after latest release [documentation] Unable to install guardrail package from hub after latest release Nov 15, 2024
@CalebCourier
Copy link
Collaborator

Hi @JyotsanaS,
The steps to install validators from the Guardrails Hub have not changed in the latest release. The only change regarding this behaviour is the requirement to have a free token configured with the cli.

If you are on guardrails-ai v0.6.0, or any version after 0.4.2, the steps are as follows:

  1. pip install guardrails-ai - We recommend using a fresh virtual environment if you are encountering issues.
  2. guardrails configure - This if where you will configure the token mentioned above which you can generate for free at https://hub.guardrailsai.com/keys
  3. guardrails hub install hub://guardrails/regex_match - This is just an example of an install command, you should be able to install any validators that are published to the hub at this point.

If you are still encountering an auth error after the above steps, could you please share some additional information about your local environment such as:

  1. Operating system: MacOS, Linux, Windows, etc.
  2. Python version
  3. Pip version
  4. Guardrails version: You can see the version number by running pip show guardrails-ai

It's also worth checking that the guardrails command is being sourced from the correct pip environment. Unix-like systems tend to resolve bin executables top down so if you have another version installed in a higher directory, it's possible the command line is trying to use this installation instead. You can verify the location of the guardrails executable by running which guardrails on Mac or Linux or where guardrails on Windows. If you are using a virtual environment, it should have the same parent directory as the pip executable (i.e. from which pip).

@JyotsanaS
Copy link
Author

It worked. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants