Problem
Is your proposal tackling an existing problem or limitation?
- Yes, the problem is that when I am building tasks and want to add additional languages or model input types but can't because I can't monkey-patch additions because they're enums. Take for instance the following code:
from workrb.types import Language
class AfricanLanguages(Language):
SW = "sw"
This code doesn't work because Language is an enum.
For example, when looking at the function signatures of the base classification tasks and base ranking tasks:
@abstractmethod
def input_type(self) -> ModelInputType:
"""Input type for texts in the classification task."""
it's required for the return type to be a ModelInputType, but there's no way to add additional ModelInputTypes or Languages.
Proposal
Describe what you would like to see happen.
Open to other ideas, but my immediate thought is to simply remove the Enum from types so that individuals can then extend the enum classes and add an additional feature.
Alternatives
Have you considered other approaches? Briefly list them and why you did not choose them.
Additional Context
Links to related issues, PRs, docs, or external references.
Screenshots or small examples if useful.
Implementation
Problem
Is your proposal tackling an existing problem or limitation?
This code doesn't work because Language is an enum.
For example, when looking at the function signatures of the base classification tasks and base ranking tasks:
it's required for the return type to be a ModelInputType, but there's no way to add additional ModelInputTypes or Languages.
Proposal
Describe what you would like to see happen.
Open to other ideas, but my immediate thought is to simply remove the Enum from types so that individuals can then extend the enum classes and add an additional feature.
Type:
Area(s) of code: paths, modules, or APIs you expect to touch
Alternatives
Have you considered other approaches? Briefly list them and why you did not choose them.
Additional Context
Links to related issues, PRs, docs, or external references.
Screenshots or small examples if useful.
Implementation