[MNT] Remove redundant __init__ by adding ClassVar#1588
Open
Omswastik-11 wants to merge 12 commits intoopenml:mainfrom
Open
[MNT] Remove redundant __init__ by adding ClassVar#1588Omswastik-11 wants to merge 12 commits intoopenml:mainfrom
Omswastik-11 wants to merge 12 commits intoopenml:mainfrom
Conversation
fkiraly
requested changes
Jan 1, 2026
Collaborator
fkiraly
left a comment
There was a problem hiding this comment.
This changes a key part of the public API.
Please do not introduce breaking changes in refactors.
Contributor
Author
|
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
reviewed
Jan 1, 2026
fkiraly
reviewed
Jan 1, 2026
fkiraly
requested changes
Jan 1, 2026
Collaborator
fkiraly
left a comment
There was a problem hiding this comment.
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1588 +/- ##
==========================================
+ Coverage 52.04% 52.09% +0.05%
==========================================
Files 36 36
Lines 4333 4338 +5
==========================================
+ Hits 2255 2260 +5
Misses 2078 2078 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1578