-
-
Notifications
You must be signed in to change notification settings - Fork 210
[MNT] Remove redundant __init__ by adding ClassVar #1588
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
base: main
Are you sure you want to change the base?
Conversation
fkiraly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes a key part of the public API.
Please do not introduce breaking changes in refactors.
|
Hi @fkiraly !! from openml.tasks.task import (
OpenMLClassificationTask,
OpenMLRegressionTask,
OpenMLClusteringTask,
OpenMLLearningCurveTask,
TaskType,
)
def main():
# Classification (defaults estimation_procedure_id=1)
cls_task = OpenMLClassificationTask(
task_id=None,
task_type_id=TaskType.SUPERVISED_CLASSIFICATION,
task_type="Supervised Classification",
data_set_id=1,
target_name="class",
)
print("Classification est proc:", cls_task.estimation_procedure_id)
# Regression (defaults estimation_procedure_id=7)
reg_task = OpenMLRegressionTask(
task_id=None,
task_type_id=TaskType.SUPERVISED_REGRESSION,
task_type="Supervised Regression",
data_set_id=2,
target_name="target",
)
print("Regression est proc:", reg_task.estimation_procedure_id)
# Clustering (defaults estimation_procedure_id=17)
clu_task = OpenMLClusteringTask(
task_id=None,
task_type_id=TaskType.CLUSTERING,
task_type="Clustering",
data_set_id=3,
)
print("Clustering est proc:", clu_task.estimation_procedure_id)
# Learning curve (defaults estimation_procedure_id=13)
lc_task = OpenMLLearningCurveTask(
task_id=None,
task_type_id=TaskType.LEARNING_CURVE,
task_type="Learning Curve",
data_set_id=4,
target_name="class",
)
print("Learning curve est proc:", lc_task.estimation_procedure_id)
if __name__ == "__main__":
main() |
fkiraly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, two main requests:
- do not delete the variables from the docstring, they are still valid
- there are task specific variables which imo should remain with the specific task class
Fixes #1578