Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Adjustments to the ComponentBase incoming:
1. Inclusion of a
_type: ClassVar[str] = "ComponentBase"
attributeMotivation: class attribute is required to determine a class' type during runtime, prior instantiation.
2. Inclusion of
__init__subclass__
hook to set instance attributetype
First Motivation: currently subclasses of
ComponentBase
are required to declare an instance attribute. This feels redundant as it has become standard for the type to always be the name of the class.Second Motivation: Instance attribute is required for serialization and deserialization, whereas class attribute is required to determine a class' type during runtime, prior instantiation.
3. Introduction of Global logger
4. Introduction of unified component-level logging
5. updated
ComponentBase.register_type()
to support registration of multiple types, without supplying a type_name (which will deprecate rapidly).example usage of deprecating tuple
@ComponentBase.register_type(LLMBase)
or now available
@ComponentBase.register_type([LLMBase, ParserBase])
6. Introduction of Intersection dynamic typing
Motivation: to enable dynamic typing based on Intersections of Parent Classes
7. Export
ComponentBase.register_model
andComponentBase.register_type()
classmethods to enable convenient method calling.example:
Work to be done:
1. Enable Union[ List[ Type[BaseModel] ], Type[BaseModel]] on ComponentBase.register_model
Motivation: To enable models to register themselves as a model or list of models ( in the case of a convergent class or mixins )
2. Aggregating
MODEL_REGISTRY
andTYPE_REGISTRY
into a single REGISTRY ( )Motivation: To reduce redundancy before we create static types to ensure consistency of model:type registration.
3. Implementing
_fields_contains_intersection
methodMotivation: to detect Intersection or IntersectionMetadata for dynamic processing. This is required so that we can determine if a type is rendered to its static form.
4. Updating ComponentBase logger implementation
Motivation: As a user, I want to inject a list of logging.handlers on a global or per ComponentBasis.
Beta Was this translation helpful? Give feedback.
All reactions