You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there are a few issues with the feature API:
Instance methods: the methods such as is_cat() should be class attributes, not instance methods, as they do not require processing and do not vary between instances
Validation: currently, validation is performed in the ProblemConfig.add_feature method. The responsibility to validate should belong to the feature
Naming: each class should have Feature at the end to make it clear that this is a custom object for representing features.
Each of these changes would break the existing API, so I am deferring these changes until the next major release. A good solution would use attrs to create dataclasses.
We should also consider whether using an existing API like bofire would be feasible.
The text was updated successfully, but these errors were encountered:
Currently, there are a few issues with the feature API:
is_cat()
should be class attributes, not instance methods, as they do not require processing and do not vary between instancesProblemConfig.add_feature
method. The responsibility to validate should belong to the featureFeature
at the end to make it clear that this is a custom object for representing features.Each of these changes would break the existing API, so I am deferring these changes until the next major release. A good solution would use
attrs
to create dataclasses.We should also consider whether using an existing API like bofire would be feasible.
The text was updated successfully, but these errors were encountered: