Conversation
Tim-Kerr
commented
Dec 17, 2024
vbrodsky
reviewed
Dec 17, 2024
| from typing import TypedDict | ||
|
|
||
|
|
||
| class FeatureSchemaAttribute(TypedDict): |
Contributor
There was a problem hiding this comment.
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.
| attributeValue: str | ||
|
|
||
|
|
||
| FeatureSchemaAttriubte = Annotated[FeatureSchemaAttribute, Field()] |
Contributor
There was a problem hiding this comment.
FeatureSchemaAttriubte - typo?
vbrodsky
reviewed
Dec 17, 2024
| def __post_init__(self): | ||
| if self.attributes is not None: | ||
| warnings.warn( | ||
| "Attributes are an experimental feature and may change in the future." |
Contributor
There was a problem hiding this comment.
can you use a std message as described here (for beta) https://labelbox.atlassian.net/wiki/spaces/ENG/pages/3178037250/SDK+Experimental+Features
vbrodsky
previously approved these changes
Dec 17, 2024
vbrodsky
approved these changes
Dec 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add feature schema attribute support to the
ToolandClassificationobjects in the sdk.The sdk now supports feature schema attributes either using the
OntologyBuilderor 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