-
Notifications
You must be signed in to change notification settings - Fork 61
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
[PTDT-2863]: Feature schema attributes #1930
Conversation
from typing import TypedDict | ||
|
||
|
||
class FeatureSchemaAttribute(TypedDict): |
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.
Can we make this into a data class? We already use Pydantic and dataclasses, so adding another paradigm feels unnecessary. Also, I’ve found TypedDict has quirks that make it less reliable. Personally, I treat it as a temporary internal type.
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.
Done 👍
attributeValue: str | ||
|
||
|
||
FeatureSchemaAttriubte = Annotated[FeatureSchemaAttribute, Field()] |
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.
FeatureSchemaAttriubte - typo?
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.
Yes ty, fixed
def __post_init__(self): | ||
if self.attributes is not None: | ||
warnings.warn( | ||
"Attributes are an experimental feature and may change in the future." |
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.
can you use a std message as described here (for beta) https://labelbox.atlassian.net/wiki/spaces/ENG/pages/3178037250/SDK+Experimental+Features
Description
Add feature schema attribute support to the
Tool
andClassification
objects in the sdk.The sdk now supports feature schema attributes either using the
OntologyBuilder
or by passing in raw JSON containing the attributes.Test the following endpoints in the client:
Test the creation of ontologies using the ontology builder with nodes containing feature schema attributes
Testing script:
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
All Submissions
New Feature Submissions
Changes to Core Features