Skip to content
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

Allow cls to be a string of type class name in DataStore._is_subclass() #803

Open
mylibrar opened this issue May 24, 2022 · 1 comment
Open

Comments

@mylibrar
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Currently DataStore._is_subclass(type_name, cls) require input argument cls to be an entry class. We also want it to support string of fully qualified name of the entry (e.g., "forte.data.ontology.top.Annotation").

Describe the solution you'd like
Maybe add some type checking for cls and convert it to a class using get_class() when it's a string.

@mylibrar mylibrar added this to the 0.4 milestone May 24, 2022
@mylibrar mylibrar changed the title Allow cls to be a string of type class name in DataStore._is_subclass Allow cls to be a string of type class name in DataStore._is_subclass() May 24, 2022
@hunterhector
Copy link
Member

@J007X this is a potential place for improving efficiency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants