Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Fix modelbit component and support boolean WyvernFeature #6

Merged
merged 2 commits into from
Aug 9, 2023

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Aug 9, 2023

  1. The modelbit request schema we're enforcing will be the single argument format, where the single argument will be a list of feature values.
  2. support boolean in our FeatureMap
  • Does this PR have impact on local development experience? If yes, make sure you have a plan and add the documentations to address issues that come with the change
  • bump version
  • make a release
  • publish to pypi service

wyvern/wyvern_typing.py Outdated Show resolved Hide resolved
@wintonzheng wintonzheng force-pushed the shu/fix_modelbit_request_and_WyvernFeature branch from 6f32bfa to 1e79a99 Compare August 9, 2023 16:39
@wintonzheng wintonzheng force-pushed the shu/fix_modelbit_request_and_WyvernFeature branch from 1e79a99 to e5bcec8 Compare August 9, 2023 17:22
…we migrate BaseWyvernRequest to become a WyvernEntity
@@ -9,8 +11,17 @@ class BaseWyvernRequest(WyvernDataModel):
request_id: str
include_events: Optional[bool] = False

_identifier: Identifier = PrivateAttr()
Copy link
Contributor Author

@wintonzheng wintonzheng Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're adding these interfaces (_identifier, def __init__, and def generate_identifier) for BaseWyvernRequest so that it behaves exactly the same as WyvernEntity until we actually migrate BaseWyvernRequest to inherit WyvernEntity (which will be done in a separate PR.)

@@ -20,4 +20,4 @@
REQUEST_SCHEMA = TypeVar("REQUEST_SCHEMA", bound=BaseModel)
RESPONSE_SCHEMA = TypeVar("RESPONSE_SCHEMA", bound=BaseModel)

WyvernFeature = Union[float, str, List[float], None]
WyvernFeature = Union[bool, float, str, List[float], None]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the support for boolean in our feature map

@wintonzheng wintonzheng merged commit ccd2967 into main Aug 9, 2023
2 checks passed
@wintonzheng wintonzheng deleted the shu/fix_modelbit_request_and_WyvernFeature branch August 18, 2023 15:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants