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

API Client Updates #688

Merged
merged 35 commits into from
May 30, 2024

Conversation

CalebCourier
Copy link
Collaborator

@CalebCourier CalebCourier commented Mar 29, 2024

This PR contains various bug fixes and updates to enable the Guardrails Hub playground to integration with the guardrails-api heavy image as well as latest api integration changes.

A few of the more major changes are listed below:

  1. Remove unnecessary warning about process count.
    • The process count will only ever be set to 1 is the user does that intentionally so raising such a verbose warning seems gratuitous.
    • This warning would also clutter logs in any gunicorn process running guardrails since we must set the process count to 1 there.
  2. Escape validator names when constructing on fail actions.
    • We can include the / character in lxml tags which breaks the on-fail attribute of RAIL for namespaced hub validators.
    • Instead we can just replace / with _, i.e. on-fail-guardrails/regex_match -> on-fail-guardrails_regex_match
    • Here we check for both the original validator name and the escaped as a fallback.
  3. Adds moder auth to hub manifest class
  4. Passes serializeable metadata to the guardrails api (when applicable)
  5. Enables litellm support when using the guardrails api
  6. Enables streaming support when using the guardrails api

@CalebCourier CalebCourier changed the title Hub Playground Integration Fixes API Client Updates May 28, 2024
@CalebCourier CalebCourier marked this pull request as ready for review May 28, 2024 21:08
CalebCourier and others added 8 commits May 28, 2024 17:21
* Try to fix hub installs for notebooks

* remove poetry references

* install huggingface cli

* reduce to one notebook for debugging

* use bin processs

* install nltk

* show nltk

* which pip

* alter path, debug

* which python

* source in every step

* don't use poetry in script

* run all notebooks

* exit 1 on notebook failure

* remove double bar
@CalebCourier CalebCourier changed the base branch from main to feat/streaming-update May 30, 2024 17:42
@CalebCourier CalebCourier merged commit 6798b68 into feat/streaming-update May 30, 2024
20 checks passed
@CalebCourier CalebCourier deleted the hub-playground-integration-fixes branch May 30, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant