-
Notifications
You must be signed in to change notification settings - Fork 71
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
chore(weave): Wrap up loose ends with Annotations #3050
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=64b6f6a0f54fd358a645c91da68089ada39da9cd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet
|
||
# Handle Pydantic model | ||
if isinstance(field_schema, type) and issubclass(field_schema, BaseModel): | ||
data["field_schema"] = field_schema.model_json_schema() # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently don't support nested objects, we might want to throw with an actionable error mentioning they will have to create multiple specs. I will add a ticket to move as much of the human feedback UI to the Zod form, which will allow for nested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should allow the creation, but maybe in the UI there is a fallback that allows free-form json input or something
""" | ||
Validates a payload against this annotation spec's schema. | ||
|
||
Args: | ||
payload: The data to validate against the schema | ||
|
||
Returns: | ||
bool: True if validation succeeds, False otherwise | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think including the work "feedback" or in some way tying it to the feedback schema might make sense here, perhaps an example
json_schema
tofield_schema
Other followup notes for Griffin: